From 8a48515b3ab79e9170c2d0a4b1ed5228c2f9e2b4 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Sat, 4 May 2024 01:06:30 +0800 Subject: [PATCH 01/16] pkp/pkp-lib#9890 Add Issues icon from the primary navigation link --- classes/template/TemplateManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/template/TemplateManager.php b/classes/template/TemplateManager.php index 98984d5db1f..a71ab74d1f9 100644 --- a/classes/template/TemplateManager.php +++ b/classes/template/TemplateManager.php @@ -138,6 +138,7 @@ public function setupBackendPage() 'name' => __('editor.navigation.issues'), 'url' => $router->url($request, null, 'manageIssues'), 'isCurrent' => $request->getRequestedPage() === 'manageIssues', + 'icon' => 'Issues' ]; $index = false; if(Config::getVar('features', 'enable_new_submission_listing')) { From dcfc613e4b3052c0a05338d00f2dca9ed5a1a58a Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Sat, 25 May 2024 00:07:17 +0800 Subject: [PATCH 02/16] pkp/pkp-lib#9890 Add icons for Payments and Institutions links --- classes/template/TemplateManager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/template/TemplateManager.php b/classes/template/TemplateManager.php index a71ab74d1f9..9067a1b5bf7 100644 --- a/classes/template/TemplateManager.php +++ b/classes/template/TemplateManager.php @@ -175,6 +175,7 @@ public function setupBackendPage() 'name' => __('common.payments'), 'url' => $router->url($request, null, 'payments'), 'isCurrent' => $request->getRequestedPage() === 'payments', + 'icon' => 'Payment' ]; $index = array_search('settings', array_keys($menu)); @@ -191,6 +192,7 @@ public function setupBackendPage() 'name' => __('institution.institutions'), 'url' => $router->url($request, null, 'management', 'settings', ['institutions']), 'isCurrent' => $request->getRequestedPage() === 'management' && in_array('institutions', $request->getRequestedArgs()), + 'icon' => 'Institutes' ]; $paymentsIndex = array_search('payments', array_keys($menu)); $menu = array_slice($menu, 0, $paymentsIndex, true) + From d248c30c6e0fc396e7f52daeb541daa452d8b7d0 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Thu, 12 Sep 2024 02:21:26 +0800 Subject: [PATCH 03/16] pkp/pkp-lib#9890 Fix hidden height on screen-reader only table in statistics issues page --- templates/stats/issues.tpl | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/templates/stats/issues.tpl b/templates/stats/issues.tpl index 999a4c02534..d83d93bcdec 100644 --- a/templates/stats/issues.tpl +++ b/templates/stats/issues.tpl @@ -87,23 +87,25 @@ - - - - - - - - - - - - - - - - -
{translate key="stats.downloads.timelineInterval"}{translate key="stats.views.timelineInterval"}
{translate key="common.date"}{translate key="stats.downloads"}{translate key="stats.views"}
{{ segment.label }}{{ segment.value }}
+
+ + + + + + + + + + + + + + + + +
{translate key="stats.downloads.timelineInterval"}{translate key="stats.views.timelineInterval"}
{translate key="common.date"}{translate key="stats.downloads"}{translate key="stats.views"}
{{ segment.label }}{{ segment.value }}
+
From 78e5aad22c40e1da27f2fa93987a0f12ac115ce2 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Thu, 12 Sep 2024 03:54:58 +0800 Subject: [PATCH 04/16] pkp/pkp-lib#9890 Update cypress tests related to sidemenu navigation --- .../tests/data/10-ApplicationSetup/20-CreateContext.cy.js | 6 +++--- .../data/10-ApplicationSetup/50-CreateCategories.cy.js | 2 +- .../tests/data/10-ApplicationSetup/50-CreateIssues.cy.js | 2 +- .../data/10-ApplicationSetup/50-CreateSections.cy.js | 2 +- cypress/tests/integration/Statistics.cy.js | 2 +- cypress/tests/integration/SubmissionWizard.cy.js | 8 ++++---- cypress/tests/integration/Subscriptions.cy.js | 8 ++++---- .../tests/integration/Y_NativeXmlImportExportIssue.cy.js | 4 ++-- cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js | 4 ++-- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index 4d45190b0fb..264f3511cdc 100644 --- a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js @@ -60,7 +60,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('.app__nav a').contains('Administration').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Administration').click(); cy.get('a').contains('Hosted Journals').click(); cy.get('a[class=show_extras]').click(); cy.contains('Settings wizard').click(); @@ -98,7 +98,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('.app__nav a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); cy.get('input[name="abbreviation-en"]').type('J Pub Know', {delay: 0}); cy.get('input[name="acronym-en"]').type(Cypress.env('contextAcronyms')['en'], {delay: 0}); @@ -123,7 +123,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('.app__nav a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); cy.get('button[id="contact-button"]').click(); // Submit the form with required fields missing. diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js index 85263b92028..05965c01a8d 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js @@ -12,7 +12,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('.app__nav a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); cy.get('button[id="categories-button"]').click(); // Create an Applied Science category diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js index 27a416a5d8c..65bba596dad 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js @@ -12,7 +12,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('.app__nav a').contains('Issues').first().click(); + cy.get('nav div[data-pc-section="header"] a').contains('Issues').first().click(); cy.get('a[id^=component-grid-issues-futureissuegrid-addIssue-button-]').click(); cy.wait(1000); // Avoid occasional failure due to form init taking time cy.get('input[name="volume"]').type('1', {delay: 0}); diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js index 6ae76e70044..7ead5a8b529 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js @@ -12,7 +12,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('.app__nav a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); cy.get('button[id="sections-button"]').click(); // Edit Articles section to add section editors diff --git a/cypress/tests/integration/Statistics.cy.js b/cypress/tests/integration/Statistics.cy.js index 38492d14bd4..99266a2bd6d 100644 --- a/cypress/tests/integration/Statistics.cy.js +++ b/cypress/tests/integration/Statistics.cy.js @@ -16,7 +16,7 @@ describe('Statistics Tests', function() { it('Check statistics', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__nav a:contains("Articles")').click(); + cy.get('nav div[data-pc-section="header"] a:contains("Articles")').click(); cy.checkGraph( 'Total abstract views by date', 'Abstract Views', diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 3026c907bee..9650551a542 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -84,7 +84,7 @@ describe('Submission Wizard', function() { // Make all sections editor-restricted cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__navGroup:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer a.show_extras') .each(($showExtras) => { @@ -109,7 +109,7 @@ describe('Submission Wizard', function() { // Make Articles inactive and leave Reviews editor-restricted cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__navGroup:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles") input').check(); cy.get('[role="dialog"] button:contains("OK")').click(); @@ -124,7 +124,7 @@ describe('Submission Wizard', function() { // Make Reviews not editor-restricted cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__navGroup:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Reviews")') .then(($tr) => { @@ -150,7 +150,7 @@ describe('Submission Wizard', function() { // Reactivate Articles section to restore test data conditions cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__navGroup:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles")') .then(($tr) => { diff --git a/cypress/tests/integration/Subscriptions.cy.js b/cypress/tests/integration/Subscriptions.cy.js index 0310b331650..3409500bfbf 100644 --- a/cypress/tests/integration/Subscriptions.cy.js +++ b/cypress/tests/integration/Subscriptions.cy.js @@ -38,7 +38,7 @@ describe('Subscription tests', function() { cy.get('#access [role="status"]').contains('Saved'); // Configure an issue for subscription. - cy.get('.app__nav a:contains("Issues")').first().click(); + cy.get('nav div[data-pc-section="header"] a:contains("Issues")').first().click(); cy.get('button:contains("Back Issues")').click(); cy.get('a:contains("Vol. 1 No. 2 (2014)")').click(); cy.get('[role="dialog"] a:contains("Access")').click(); @@ -47,7 +47,7 @@ describe('Subscription tests', function() { cy.get('div:contains("Your changes have been saved.")'); // Set up subscription policies - cy.get('.app__nav a:contains("Payments")').click(); + cy.get('nav div[data-pc-section="header"] a:contains("Payments")').click(); cy.get('a[name=subscriptionPolicies]').click(); cy.get('input[id^="subscriptionName-"]').type('Sebastiano Mortensen', {delay: 0}); cy.get('input[id^="subscriptionEmail-"]').type('smortensen@mailinator.com', {delay: 0}); @@ -79,7 +79,7 @@ describe('Subscription tests', function() { cy.login('dbarnes', null, 'publicknowledge'); // Create a reader user for the subscription - cy.get('.app__nav a:contains("Users & Roles")').click(); + cy.get('nav div[data-pc-section="header"] a:contains("Users & Roles")').click(); cy.createUser({ 'username': 'reader', 'givenName': 'Rea', @@ -105,7 +105,7 @@ describe('Subscription tests', function() { cy.login('dbarnes', null, 'publicknowledge'); // Set up an individual subscription type - cy.get('.app__nav a:contains("Payments")').click(); + cy.get('nav div[data-pc-section="header"] a:contains("Payments")').click(); cy.get('a[name="subscriptionTypes"]').click(); cy.get('a:contains("Create New Subscription Type")').click(); cy.wait(1000); // Form initialization problem diff --git a/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js b/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js index ade7ba889f2..4c2943e0ad6 100644 --- a/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js +++ b/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js @@ -15,7 +15,7 @@ describe('Data suite tests', function() { cy.get('li.profile a:contains("' + username + '")').click(); cy.get('li.profile a:contains("Dashboard")').click(); - cy.get('.app__nav a').contains('Tools').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Tools').click(); cy.get('a:contains("Native XML Plugin")').click(); cy.get('a:contains("Export Issues")').click(); cy.waitJQuery({timeout:20000}); @@ -43,7 +43,7 @@ describe('Data suite tests', function() { cy.get('li.profile a:contains("' + username + '")').click(); cy.get('li.profile a:contains("Dashboard")').click(); - cy.get('.app__nav a').contains('Tools').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Tools').click(); // The a:contains(...) syntax ensures that it will wait for the // tab to load. Do not convert to cy.get('a').contains('Native XML Plugin') cy.get('a:contains("Native XML Plugin")').click(); diff --git a/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js b/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js index 1b49ee62aa2..31d2e4c2a2c 100644 --- a/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js +++ b/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js @@ -359,7 +359,7 @@ describe('Article View Metadata - DC Plugin', function() { cy.get('a').contains('Dashboard').click(); // Enable metadata settings - cy.get('.app__nav a').contains('Workflow').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Workflow').click(); cy.get('button').contains('Metadata').click(); cy.get('span').contains('Enable coverage metadata').prev('input[type="checkbox"]').check(); cy.get('span').contains('Enable type metadata').prev('input[type="checkbox"]').check(); @@ -372,7 +372,7 @@ describe('Article View Metadata - DC Plugin', function() { cy.checkDoiConfig(['publication', 'issue', 'representation']); // After configuration, go to submissions - cy.get('.app__nav a').contains('Submissions').click(); + cy.get('nav div[data-pc-section="header"] a').contains('Submissions').click(); // Create a new submission cy.getCsrfToken(); From 5b9d0f78c805f009c2fda557d7b8469cc078e39e Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Thu, 12 Sep 2024 18:31:10 +0800 Subject: [PATCH 05/16] pkp/pkp-lib#9890 Update selector when targetting sidenav items in cypress testing --- .../data/10-ApplicationSetup/20-CreateContext.cy.js | 8 +++++--- .../10-ApplicationSetup/50-CreateCategories.cy.js | 3 ++- .../data/10-ApplicationSetup/50-CreateIssues.cy.js | 2 +- .../data/10-ApplicationSetup/50-CreateSections.cy.js | 3 ++- cypress/tests/integration/Statistics.cy.js | 3 ++- cypress/tests/integration/SubmissionWizard.cy.js | 12 ++++++++---- cypress/tests/integration/Subscriptions.cy.js | 9 +++++---- .../integration/Y_NativeXmlImportExportIssue.cy.js | 4 ++-- .../tests/integration/Z_ArticleViewDCMetadata.cy.js | 5 +++-- 9 files changed, 30 insertions(+), 19 deletions(-) diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index 264f3511cdc..9468de85682 100644 --- a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js @@ -60,7 +60,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Administration').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Administration').click(); cy.get('a').contains('Hosted Journals').click(); cy.get('a[class=show_extras]').click(); cy.contains('Settings wizard').click(); @@ -98,7 +98,8 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('input[name="abbreviation-en"]').type('J Pub Know', {delay: 0}); cy.get('input[name="acronym-en"]').type(Cypress.env('contextAcronyms')['en'], {delay: 0}); @@ -123,7 +124,8 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('button[id="contact-button"]').click(); // Submit the form with required fields missing. diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js index 05965c01a8d..d4dbbdd3856 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js @@ -12,7 +12,8 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('button[id="categories-button"]').click(); // Create an Applied Science category diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js index 65bba596dad..c1642fd6b4e 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js @@ -12,7 +12,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Issues').first().click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Issues').click(); cy.get('a[id^=component-grid-issues-futureissuegrid-addIssue-button-]').click(); cy.wait(1000); // Avoid occasional failure due to form init taking time cy.get('input[name="volume"]').type('1', {delay: 0}); diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js index 7ead5a8b529..58f163b99de 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js @@ -12,7 +12,8 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Journal').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('button[id="sections-button"]').click(); // Edit Articles section to add section editors diff --git a/cypress/tests/integration/Statistics.cy.js b/cypress/tests/integration/Statistics.cy.js index 99266a2bd6d..3f8f465fd0e 100644 --- a/cypress/tests/integration/Statistics.cy.js +++ b/cypress/tests/integration/Statistics.cy.js @@ -16,7 +16,8 @@ describe('Statistics Tests', function() { it('Check statistics', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a:contains("Articles")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Statistics').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Articles').click({ force: true }); cy.checkGraph( 'Total abstract views by date', 'Abstract Views', diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 9650551a542..9d9a8563b4f 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -84,7 +84,8 @@ describe('Submission Wizard', function() { // Make all sections editor-restricted cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer a.show_extras') .each(($showExtras) => { @@ -109,7 +110,8 @@ describe('Submission Wizard', function() { // Make Articles inactive and leave Reviews editor-restricted cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles") input').check(); cy.get('[role="dialog"] button:contains("OK")').click(); @@ -124,7 +126,8 @@ describe('Submission Wizard', function() { // Make Reviews not editor-restricted cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Reviews")') .then(($tr) => { @@ -150,7 +153,8 @@ describe('Submission Wizard', function() { // Reactivate Articles section to restore test data conditions cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"]:contains("Settings") a:contains("Journal")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles")') .then(($tr) => { diff --git a/cypress/tests/integration/Subscriptions.cy.js b/cypress/tests/integration/Subscriptions.cy.js index 3409500bfbf..bd0764fba9e 100644 --- a/cypress/tests/integration/Subscriptions.cy.js +++ b/cypress/tests/integration/Subscriptions.cy.js @@ -38,7 +38,7 @@ describe('Subscription tests', function() { cy.get('#access [role="status"]').contains('Saved'); // Configure an issue for subscription. - cy.get('nav div[data-pc-section="header"] a:contains("Issues")').first().click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Issues').click(); cy.get('button:contains("Back Issues")').click(); cy.get('a:contains("Vol. 1 No. 2 (2014)")').click(); cy.get('[role="dialog"] a:contains("Access")').click(); @@ -47,7 +47,7 @@ describe('Subscription tests', function() { cy.get('div:contains("Your changes have been saved.")'); // Set up subscription policies - cy.get('nav div[data-pc-section="header"] a:contains("Payments")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Payments').click(); cy.get('a[name=subscriptionPolicies]').click(); cy.get('input[id^="subscriptionName-"]').type('Sebastiano Mortensen', {delay: 0}); cy.get('input[id^="subscriptionEmail-"]').type('smortensen@mailinator.com', {delay: 0}); @@ -79,7 +79,8 @@ describe('Subscription tests', function() { cy.login('dbarnes', null, 'publicknowledge'); // Create a reader user for the subscription - cy.get('nav div[data-pc-section="header"] a:contains("Users & Roles")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Users & Roles').click({ force: true }); cy.createUser({ 'username': 'reader', 'givenName': 'Rea', @@ -105,7 +106,7 @@ describe('Subscription tests', function() { cy.login('dbarnes', null, 'publicknowledge'); // Set up an individual subscription type - cy.get('nav div[data-pc-section="header"] a:contains("Payments")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Payments').click(); cy.get('a[name="subscriptionTypes"]').click(); cy.get('a:contains("Create New Subscription Type")').click(); cy.wait(1000); // Form initialization problem diff --git a/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js b/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js index 4c2943e0ad6..8e273fb2ee1 100644 --- a/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js +++ b/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js @@ -15,7 +15,7 @@ describe('Data suite tests', function() { cy.get('li.profile a:contains("' + username + '")').click(); cy.get('li.profile a:contains("Dashboard")').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Tools').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Tools').click(); cy.get('a:contains("Native XML Plugin")').click(); cy.get('a:contains("Export Issues")').click(); cy.waitJQuery({timeout:20000}); @@ -43,7 +43,7 @@ describe('Data suite tests', function() { cy.get('li.profile a:contains("' + username + '")').click(); cy.get('li.profile a:contains("Dashboard")').click(); - cy.get('nav div[data-pc-section="header"] a').contains('Tools').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Tools').click(); // The a:contains(...) syntax ensures that it will wait for the // tab to load. Do not convert to cy.get('a').contains('Native XML Plugin') cy.get('a:contains("Native XML Plugin")').click(); diff --git a/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js b/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js index 31d2e4c2a2c..49d86af8db0 100644 --- a/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js +++ b/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js @@ -359,7 +359,8 @@ describe('Article View Metadata - DC Plugin', function() { cy.get('a').contains('Dashboard').click(); // Enable metadata settings - cy.get('nav div[data-pc-section="header"] a').contains('Workflow').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Workflow').click({ force: true }); cy.get('button').contains('Metadata').click(); cy.get('span').contains('Enable coverage metadata').prev('input[type="checkbox"]').check(); cy.get('span').contains('Enable type metadata').prev('input[type="checkbox"]').check(); @@ -372,7 +373,7 @@ describe('Article View Metadata - DC Plugin', function() { cy.checkDoiConfig(['publication', 'issue', 'representation']); // After configuration, go to submissions - cy.get('nav div[data-pc-section="header"] a').contains('Submissions').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Submissions').click(); // Create a new submission cy.getCsrfToken(); From 8fb017514fa728bc0d722a6e0d8f8ed4b39dd26d Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Thu, 12 Sep 2024 18:50:54 +0800 Subject: [PATCH 06/16] pkp/pkp-lib#9890 Update cypress test for clicking Settings > Users & Roles link --- cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js index 3c17e781d89..1331e389d4f 100644 --- a/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js @@ -12,7 +12,8 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a:contains("admin"):visible').click(); cy.get('a:contains("Dashboard")').click(); - cy.get('a:contains("Users & Roles")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Users & Roles').click({ force: true }); var users = [ { From c51af789e3fb9ee2b446728c183d795efca995da Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 00:30:32 +0800 Subject: [PATCH 07/16] pkp/pkp-lib#9890 Update click events on cypress test that are related to sidenav --- cypress/tests/integration/Doi.cy.js | 2 +- cypress/tests/integration/DoiCrossref.cy.js | 3 ++- cypress/tests/integration/SubmissionWizard.cy.js | 2 +- cypress/tests/integration/Subscriptions.cy.js | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cypress/tests/integration/Doi.cy.js b/cypress/tests/integration/Doi.cy.js index a9f4863513b..96f0cc6d0a6 100644 --- a/cypress/tests/integration/Doi.cy.js +++ b/cypress/tests/integration/Doi.cy.js @@ -22,7 +22,7 @@ describe('DOI tests', function() { }; const goToDoiPage = (itemType = 'submission') => { - cy.get('a:contains("DOIs")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('DOIs').click(); cy.get(`button#${itemType}-doi-management-button`).click(); }; diff --git a/cypress/tests/integration/DoiCrossref.cy.js b/cypress/tests/integration/DoiCrossref.cy.js index 2b3e46dcb21..66820f208c7 100644 --- a/cypress/tests/integration/DoiCrossref.cy.js +++ b/cypress/tests/integration/DoiCrossref.cy.js @@ -13,7 +13,8 @@ describe('Crossref tests', function () { it('Check Crossref Configuration', function () { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('a:contains("Website")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Website').click({ force: true }); cy.waitJQuery(); cy.get('button#plugins-button').click(); diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 9d9a8563b4f..d80c19f9fca 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -376,7 +376,7 @@ describe('Submission Wizard', function() { }); // Add missing data - cy.get('.pkpSteps button:contains("Details")').click(); + cy.get('.pkpSteps button:contains("Details")').click({ force: true }); cy.setTinyMceContent('titleAbstract-title-control-en', submission.title); cy.setTinyMceContent('titleAbstract-abstract-control-en', submission.abstract); cy.get('#titleAbstract-keywords-control-en').type(submission.keywords, {delay: 0}); diff --git a/cypress/tests/integration/Subscriptions.cy.js b/cypress/tests/integration/Subscriptions.cy.js index bd0764fba9e..1e2e50eab52 100644 --- a/cypress/tests/integration/Subscriptions.cy.js +++ b/cypress/tests/integration/Subscriptions.cy.js @@ -19,7 +19,8 @@ describe('Subscription tests', function() { it('Configures subscriptions', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('a:contains("Distribution")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Distribution').click({ force: true }); // Payment settings cy.get('button#payments-button').click(); From 9f512c95b7e03cf500c24f77fb93822247c0cddd Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 00:54:10 +0800 Subject: [PATCH 08/16] pkp/pkp-lib#9890 Update more of the cypress test that relates to SideNav items --- cypress/tests/integration/DoiCrossref.cy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cypress/tests/integration/DoiCrossref.cy.js b/cypress/tests/integration/DoiCrossref.cy.js index 66820f208c7..a9faa2e0bd4 100644 --- a/cypress/tests/integration/DoiCrossref.cy.js +++ b/cypress/tests/integration/DoiCrossref.cy.js @@ -24,7 +24,7 @@ describe('Crossref tests', function () { cy.get('input[id^=select-cell-crossrefplugin]').should('be.checked'); // Crossref is enabled as DOI registration agency. - cy.get('a:contains("Distribution")').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Distribution').click({ force: true }); cy.get('button#dois-button').click(); cy.get( '#doiSetup input[name="enabledDoiTypes"][value="representation"]' @@ -82,7 +82,8 @@ describe('Crossref tests', function () { }); cy.log('Deselect Crossref as registered agency for downstream tests'); - cy.get('a:contains("Distribution")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Distribution').click({ force: true }); cy.get('button#dois-button').click(); cy.get('button#doisRegistration-button').click(); cy.get('select#doiRegistrationSettings-registrationAgency-control').select( From 1178c176dcb10d797ac594a379d18e65c63fdb8b Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 02:26:24 +0800 Subject: [PATCH 09/16] pkp/pkp-lib#9890 Set {force: true} when clicking on SubmissionWizard - cypress test --- cypress/tests/integration/SubmissionWizard.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index d80c19f9fca..ea054d49745 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -384,7 +384,7 @@ describe('Submission Wizard', function() { cy.get('#titleAbstract-keywords-control-en').type('{downarrow}{enter}', {delay: 0}); cy.get('#citations-citationsRaw-control').type(submission.citations); - cy.get('.pkpSteps button:contains("Upload Files")').click(); + cy.get('.pkpSteps button:contains("Upload Files")').click({ force: true }); cy.uploadSubmissionFiles([ { 'file': 'dummy.pdf', @@ -583,7 +583,7 @@ describe('Submission Wizard', function() { // Add missing data cy.get('.pkpSteps button:contains("Details")').click(); cy.setTinyMceContent('titleAbstract-title-control-fr_CA', submission.title.fr_CA); - cy.get('.pkpSteps button:contains("Contributors")').click(); + cy.get('.pkpSteps button:contains("Contributors")').click({ force: true }); cy.get('.listPanel__itemTitle:contains("Carlo Corino")') .parents('.listPanel__item') .find('button:contains("Edit")') From 2485cc06a537d160ff8bf99ebce747ead12ebb73 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 03:05:21 +0800 Subject: [PATCH 10/16] pkp/pkp-lib#9890 Additional force click events on SubmissionWizard cypress testing --- cypress/tests/integration/SubmissionWizard.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index ea054d49745..7140173a2f7 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -408,7 +408,7 @@ describe('Submission Wizard', function() { }); // All errors should be gone and submit should be allowed. - cy.get('.pkpSteps button:contains("Review")').click(); + cy.get('.pkpSteps button:contains("Review")').click({ force: true }); cy.get('*:contains("There are one or more problems")').should('not.exist'); cy.get('button:contains("Submit")').should('be.enabled'); cy.get('*:contains("You must upload at least one Article Text file.")').should('not.exist'); From 55222574b360863124ecc60655d72e2de8f11f10 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 15:03:45 +0800 Subject: [PATCH 11/16] pkp/pkp-lib#9890 Fix intermittent hidden wizard step buttons when running cypress tests for SubmissionWizard --- cypress/tests/integration/SubmissionWizard.cy.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 7140173a2f7..0e76abdf1a6 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -394,7 +394,7 @@ describe('Submission Wizard', function() { } ]); - cy.get('.pkpSteps button:contains("For the Editors")').click(); + cy.get('.pkpSteps button:contains("For the Editors")').click({ force: true }); Object.keys(submission.metadata.autosuggest).forEach(field => { cy.get('#forTheEditors-' + field + '-control-en').type(submission.metadata.autosuggest[field], {delay: 0}); cy.get('li:contains("' + submission.metadata.autosuggest[field] + '")'); @@ -581,7 +581,7 @@ describe('Submission Wizard', function() { .contains('Social Sciences > Sociology'); // Add missing data - cy.get('.pkpSteps button:contains("Details")').click(); + cy.get('.pkpSteps button:contains("Details")').click({ force: true }); cy.setTinyMceContent('titleAbstract-title-control-fr_CA', submission.title.fr_CA); cy.get('.pkpSteps button:contains("Contributors")').click({ force: true }); cy.get('.listPanel__itemTitle:contains("Carlo Corino")') @@ -591,13 +591,13 @@ describe('Submission Wizard', function() { cy.get('input[name="givenName-fr_CA"]').type('Carlo', {delay: 0}); cy.get('input[name="familyName-fr_CA"]').type('Carlo', {delay: 0}); cy.get('[role=dialog]').find('button:contains("Save")').click(); - cy.get('.pkpSteps button:contains("For the Editors")').click(); + cy.get('.pkpSteps button:contains("For the Editors")').click({ force: true }); cy.get('#forTheEditors-subjects-control-fr_CA').type('Sociologie française', {delay: 0}); cy.get('li:contains("Sociologie française")'); cy.get('#forTheEditors-subjects-control-fr_CA').type('{downarrow}{enter}', {delay: 0}); // Should be able to submit! - cy.get('.pkpSteps button:contains("Review")').click(); + cy.get('.pkpSteps button:contains("Review")').click({ force: true }); cy.get('button:contains("Submit")').click(); cy.contains('The submission, ' + submission.title.en + ', will be submitted to Journal of Public Knowledge for editorial review.'); // delay is needed so previous changes gets pushed, before the submit should be triggered From 6e059db8bf001c61d22dc28a6beb6678d397f60c Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 18:58:29 +0800 Subject: [PATCH 12/16] pkp/pkp-lib#9890 Update target selector for nav items --- .../data/10-ApplicationSetup/20-CreateContext.cy.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index 9468de85682..f5dbe599801 100644 --- a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js @@ -60,7 +60,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Administration').click(); + cy.get('nav').contains('Administration').click(); cy.get('a').contains('Hosted Journals').click(); cy.get('a[class=show_extras]').click(); cy.contains('Settings wizard').click(); @@ -98,7 +98,9 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); + cy.get('nav').contains('Settings').click(); + // Ensure 'Journal' click despite submenu animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('input[name="abbreviation-en"]').type('J Pub Know', {delay: 0}); @@ -124,8 +126,9 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure 'Journal' click despite submenu animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('button[id="contact-button"]').click(); // Submit the form with required fields missing. From 5ecb45c9897bc5913167193fdc29e839606125c2 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 20:03:26 +0800 Subject: [PATCH 13/16] pkp/pkp-lib#9890 Update target selector for nav items in cypress tests --- .../20-CreateContext.cy.js | 4 ++-- .../10-ApplicationSetup/40-CreateUsers.cy.js | 5 +++-- .../50-CreateCategories.cy.js | 5 +++-- .../10-ApplicationSetup/50-CreateIssues.cy.js | 2 +- .../50-CreateSections.cy.js | 5 +++-- cypress/tests/integration/Doi.cy.js | 2 +- cypress/tests/integration/DoiCrossref.cy.js | 13 +++++++----- cypress/tests/integration/Statistics.cy.js | 5 +++-- .../tests/integration/SubmissionWizard.cy.js | 20 +++++++++++-------- cypress/tests/integration/Subscriptions.cy.js | 16 ++++++++------- .../Y_NativeXmlImportExportIssue.cy.js | 4 ++-- .../integration/Z_ArticleViewDCMetadata.cy.js | 7 ++++--- 12 files changed, 51 insertions(+), 37 deletions(-) diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index f5dbe599801..6e2a9b60262 100644 --- a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js @@ -99,7 +99,7 @@ describe('Data suite tests', function() { cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); cy.get('nav').contains('Settings').click(); - // Ensure 'Journal' click despite submenu animation + // Ensure submenu item click despite animation cy.get('nav').contains('Journal').click({ force: true }); cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); @@ -127,7 +127,7 @@ describe('Data suite tests', function() { cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); cy.get('nav').contains('Settings').click(); - // Ensure 'Journal' click despite submenu animation + // Ensure submenu item click despite animation cy.get('nav').contains('Journal').click({ force: true }); cy.get('button[id="contact-button"]').click(); diff --git a/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js index 1331e389d4f..6220e9a32b9 100644 --- a/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js @@ -12,8 +12,9 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a:contains("admin"):visible').click(); cy.get('a:contains("Dashboard")').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Users & Roles').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Users & Roles').click({ force: true }); var users = [ { diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js index d4dbbdd3856..f6f02d746d1 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js @@ -12,8 +12,9 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('button[id="categories-button"]').click(); // Create an Applied Science category diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js index c1642fd6b4e..86a095c2812 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateIssues.cy.js @@ -12,7 +12,7 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Issues').click(); + cy.get('nav').contains('Issues').click(); cy.get('a[id^=component-grid-issues-futureissuegrid-addIssue-button-]').click(); cy.wait(1000); // Avoid occasional failure due to form init taking time cy.get('input[name="volume"]').type('1', {delay: 0}); diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js index 58f163b99de..8f099952bb9 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateSections.cy.js @@ -12,8 +12,9 @@ describe('Data suite tests', function() { cy.login('admin', 'admin'); cy.get('a').contains('admin').click(); cy.get('a').contains('Dashboard').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('button[id="sections-button"]').click(); // Edit Articles section to add section editors diff --git a/cypress/tests/integration/Doi.cy.js b/cypress/tests/integration/Doi.cy.js index 96f0cc6d0a6..18b2dfecf59 100644 --- a/cypress/tests/integration/Doi.cy.js +++ b/cypress/tests/integration/Doi.cy.js @@ -22,7 +22,7 @@ describe('DOI tests', function() { }; const goToDoiPage = (itemType = 'submission') => { - cy.get('nav div[data-pc-section="header"] a span').contains('DOIs').click(); + cy.get('nav').contains('DOIs').click(); cy.get(`button#${itemType}-doi-management-button`).click(); }; diff --git a/cypress/tests/integration/DoiCrossref.cy.js b/cypress/tests/integration/DoiCrossref.cy.js index a9faa2e0bd4..c760ced4a6d 100644 --- a/cypress/tests/integration/DoiCrossref.cy.js +++ b/cypress/tests/integration/DoiCrossref.cy.js @@ -13,8 +13,9 @@ describe('Crossref tests', function () { it('Check Crossref Configuration', function () { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Website').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Website').click({ force: true }); cy.waitJQuery(); cy.get('button#plugins-button').click(); @@ -24,7 +25,8 @@ describe('Crossref tests', function () { cy.get('input[id^=select-cell-crossrefplugin]').should('be.checked'); // Crossref is enabled as DOI registration agency. - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Distribution').click({ force: true }); + // Ensure submenu item click despite animation + cy.get('nav').contains('Distribution').click({ force: true }); cy.get('button#dois-button').click(); cy.get( '#doiSetup input[name="enabledDoiTypes"][value="representation"]' @@ -82,8 +84,9 @@ describe('Crossref tests', function () { }); cy.log('Deselect Crossref as registered agency for downstream tests'); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Distribution').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Distribution').click({ force: true }); cy.get('button#dois-button').click(); cy.get('button#doisRegistration-button').click(); cy.get('select#doiRegistrationSettings-registrationAgency-control').select( diff --git a/cypress/tests/integration/Statistics.cy.js b/cypress/tests/integration/Statistics.cy.js index 3f8f465fd0e..d48cc31898b 100644 --- a/cypress/tests/integration/Statistics.cy.js +++ b/cypress/tests/integration/Statistics.cy.js @@ -16,8 +16,9 @@ describe('Statistics Tests', function() { it('Check statistics', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Statistics').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Articles').click({ force: true }); + cy.get('nav').contains('Statistics').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Articles').click({ force: true }); cy.checkGraph( 'Total abstract views by date', 'Abstract Views', diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 0e76abdf1a6..2f018b4ad42 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -84,8 +84,9 @@ describe('Submission Wizard', function() { // Make all sections editor-restricted cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer a.show_extras') .each(($showExtras) => { @@ -110,8 +111,9 @@ describe('Submission Wizard', function() { // Make Articles inactive and leave Reviews editor-restricted cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles") input').check(); cy.get('[role="dialog"] button:contains("OK")').click(); @@ -126,8 +128,9 @@ describe('Submission Wizard', function() { // Make Reviews not editor-restricted cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Reviews")') .then(($tr) => { @@ -153,8 +156,9 @@ describe('Submission Wizard', function() { // Reactivate Articles section to restore test data conditions cy.logout(); cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles")') .then(($tr) => { diff --git a/cypress/tests/integration/Subscriptions.cy.js b/cypress/tests/integration/Subscriptions.cy.js index 1e2e50eab52..3f38bab5b81 100644 --- a/cypress/tests/integration/Subscriptions.cy.js +++ b/cypress/tests/integration/Subscriptions.cy.js @@ -19,8 +19,9 @@ describe('Subscription tests', function() { it('Configures subscriptions', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Distribution').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Distribution').click({ force: true }); // Payment settings cy.get('button#payments-button').click(); @@ -39,7 +40,7 @@ describe('Subscription tests', function() { cy.get('#access [role="status"]').contains('Saved'); // Configure an issue for subscription. - cy.get('nav div[data-pc-section="header"] a span').contains('Issues').click(); + cy.get('nav').contains('Issues').click(); cy.get('button:contains("Back Issues")').click(); cy.get('a:contains("Vol. 1 No. 2 (2014)")').click(); cy.get('[role="dialog"] a:contains("Access")').click(); @@ -48,7 +49,7 @@ describe('Subscription tests', function() { cy.get('div:contains("Your changes have been saved.")'); // Set up subscription policies - cy.get('nav div[data-pc-section="header"] a span').contains('Payments').click(); + cy.get('nav').contains('Payments').click(); cy.get('a[name=subscriptionPolicies]').click(); cy.get('input[id^="subscriptionName-"]').type('Sebastiano Mortensen', {delay: 0}); cy.get('input[id^="subscriptionEmail-"]').type('smortensen@mailinator.com', {delay: 0}); @@ -80,8 +81,9 @@ describe('Subscription tests', function() { cy.login('dbarnes', null, 'publicknowledge'); // Create a reader user for the subscription - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Users & Roles').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Users & Roles').click({ force: true }); cy.createUser({ 'username': 'reader', 'givenName': 'Rea', @@ -107,7 +109,7 @@ describe('Subscription tests', function() { cy.login('dbarnes', null, 'publicknowledge'); // Set up an individual subscription type - cy.get('nav div[data-pc-section="header"] a span').contains('Payments').click(); + cy.get('nav').contains('Payments').click(); cy.get('a[name="subscriptionTypes"]').click(); cy.get('a:contains("Create New Subscription Type")').click(); cy.wait(1000); // Form initialization problem diff --git a/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js b/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js index 8e273fb2ee1..72dda0b07cc 100644 --- a/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js +++ b/cypress/tests/integration/Y_NativeXmlImportExportIssue.cy.js @@ -15,7 +15,7 @@ describe('Data suite tests', function() { cy.get('li.profile a:contains("' + username + '")').click(); cy.get('li.profile a:contains("Dashboard")').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Tools').click(); + cy.get('nav').contains('Tools').click(); cy.get('a:contains("Native XML Plugin")').click(); cy.get('a:contains("Export Issues")').click(); cy.waitJQuery({timeout:20000}); @@ -43,7 +43,7 @@ describe('Data suite tests', function() { cy.get('li.profile a:contains("' + username + '")').click(); cy.get('li.profile a:contains("Dashboard")').click(); - cy.get('nav div[data-pc-section="header"] a span').contains('Tools').click(); + cy.get('nav').contains('Tools').click(); // The a:contains(...) syntax ensures that it will wait for the // tab to load. Do not convert to cy.get('a').contains('Native XML Plugin') cy.get('a:contains("Native XML Plugin")').click(); diff --git a/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js b/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js index 49d86af8db0..f4d3aec852b 100644 --- a/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js +++ b/cypress/tests/integration/Z_ArticleViewDCMetadata.cy.js @@ -359,8 +359,9 @@ describe('Article View Metadata - DC Plugin', function() { cy.get('a').contains('Dashboard').click(); // Enable metadata settings - cy.get('nav div[data-pc-section="header"] a span').contains('Settings').click(); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Workflow').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Workflow').click({ force: true }); cy.get('button').contains('Metadata').click(); cy.get('span').contains('Enable coverage metadata').prev('input[type="checkbox"]').check(); cy.get('span').contains('Enable type metadata').prev('input[type="checkbox"]').check(); @@ -373,7 +374,7 @@ describe('Article View Metadata - DC Plugin', function() { cy.checkDoiConfig(['publication', 'issue', 'representation']); // After configuration, go to submissions - cy.get('nav div[data-pc-section="header"] a span').contains('Submissions').click(); + cy.get('nav').contains('Submissions').click(); // Create a new submission cy.getCsrfToken(); From 50e00dcd1a8a9f416d50ce0ce0d149e4bb4d207d Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 20:32:20 +0800 Subject: [PATCH 14/16] pkp/pkp-lib#9890 Remove excess cypress click script for CreateContext file --- cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js | 1 - 1 file changed, 1 deletion(-) diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index 6e2a9b60262..43a3b7a6615 100644 --- a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js @@ -101,7 +101,6 @@ describe('Data suite tests', function() { cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation cy.get('nav').contains('Journal').click({ force: true }); - cy.get('nav div[data-pc-section="itemcontent"] a span').contains('Journal').click({ force: true }); cy.get('input[name="abbreviation-en"]').type('J Pub Know', {delay: 0}); cy.get('input[name="acronym-en"]').type(Cypress.env('contextAcronyms')['en'], {delay: 0}); From b6ad095bd3b06758ebcad4a6e35c649b9579783c Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Wed, 18 Sep 2024 19:34:31 +0800 Subject: [PATCH 15/16] pkp/pkp-lib#9890 Undo {force: true} updates when clicking buttons on SubmissionWizard cypress test --- .../tests/integration/SubmissionWizard.cy.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 2f018b4ad42..19f4d5b2179 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -86,7 +86,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click({ force: true }); + cy.get('nav').contains('Journal').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer a.show_extras') .each(($showExtras) => { @@ -113,7 +113,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click({ force: true }); + cy.get('nav').contains('Journal').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles") input').check(); cy.get('[role="dialog"] button:contains("OK")').click(); @@ -130,7 +130,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click({ force: true }); + cy.get('nav').contains('Journal').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Reviews")') .then(($tr) => { @@ -158,7 +158,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click({ force: true }); + cy.get('nav').contains('Journal').click(); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles")') .then(($tr) => { @@ -380,7 +380,7 @@ describe('Submission Wizard', function() { }); // Add missing data - cy.get('.pkpSteps button:contains("Details")').click({ force: true }); + cy.get('.pkpSteps button:contains("Details")').click(); cy.setTinyMceContent('titleAbstract-title-control-en', submission.title); cy.setTinyMceContent('titleAbstract-abstract-control-en', submission.abstract); cy.get('#titleAbstract-keywords-control-en').type(submission.keywords, {delay: 0}); @@ -388,7 +388,7 @@ describe('Submission Wizard', function() { cy.get('#titleAbstract-keywords-control-en').type('{downarrow}{enter}', {delay: 0}); cy.get('#citations-citationsRaw-control').type(submission.citations); - cy.get('.pkpSteps button:contains("Upload Files")').click({ force: true }); + cy.get('.pkpSteps button:contains("Upload Files")').click(); cy.uploadSubmissionFiles([ { 'file': 'dummy.pdf', @@ -398,7 +398,7 @@ describe('Submission Wizard', function() { } ]); - cy.get('.pkpSteps button:contains("For the Editors")').click({ force: true }); + cy.get('.pkpSteps button:contains("For the Editors")').click(); Object.keys(submission.metadata.autosuggest).forEach(field => { cy.get('#forTheEditors-' + field + '-control-en').type(submission.metadata.autosuggest[field], {delay: 0}); cy.get('li:contains("' + submission.metadata.autosuggest[field] + '")'); @@ -412,7 +412,7 @@ describe('Submission Wizard', function() { }); // All errors should be gone and submit should be allowed. - cy.get('.pkpSteps button:contains("Review")').click({ force: true }); + cy.get('.pkpSteps button:contains("Review")').click(); cy.get('*:contains("There are one or more problems")').should('not.exist'); cy.get('button:contains("Submit")').should('be.enabled'); cy.get('*:contains("You must upload at least one Article Text file.")').should('not.exist'); @@ -585,9 +585,9 @@ describe('Submission Wizard', function() { .contains('Social Sciences > Sociology'); // Add missing data - cy.get('.pkpSteps button:contains("Details")').click({ force: true }); + cy.get('.pkpSteps button:contains("Details")').click(); cy.setTinyMceContent('titleAbstract-title-control-fr_CA', submission.title.fr_CA); - cy.get('.pkpSteps button:contains("Contributors")').click({ force: true }); + cy.get('.pkpSteps button:contains("Contributors")').click(); cy.get('.listPanel__itemTitle:contains("Carlo Corino")') .parents('.listPanel__item') .find('button:contains("Edit")') @@ -595,13 +595,13 @@ describe('Submission Wizard', function() { cy.get('input[name="givenName-fr_CA"]').type('Carlo', {delay: 0}); cy.get('input[name="familyName-fr_CA"]').type('Carlo', {delay: 0}); cy.get('[role=dialog]').find('button:contains("Save")').click(); - cy.get('.pkpSteps button:contains("For the Editors")').click({ force: true }); + cy.get('.pkpSteps button:contains("For the Editors")').click(); cy.get('#forTheEditors-subjects-control-fr_CA').type('Sociologie française', {delay: 0}); cy.get('li:contains("Sociologie française")'); cy.get('#forTheEditors-subjects-control-fr_CA').type('{downarrow}{enter}', {delay: 0}); // Should be able to submit! - cy.get('.pkpSteps button:contains("Review")').click({ force: true }); + cy.get('.pkpSteps button:contains("Review")').click(); cy.get('button:contains("Submit")').click(); cy.contains('The submission, ' + submission.title.en + ', will be submitted to Journal of Public Knowledge for editorial review.'); // delay is needed so previous changes gets pushed, before the submit should be triggered From 075fb1829b9d738c9e4fe666e213027b42953d02 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Wed, 18 Sep 2024 21:16:11 +0800 Subject: [PATCH 16/16] pkp/pkp-lib#9890 Re-add {force:true} when clicking buttons in SubmissionWizard cypress test --- .../tests/integration/SubmissionWizard.cy.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cypress/tests/integration/SubmissionWizard.cy.js b/cypress/tests/integration/SubmissionWizard.cy.js index 19f4d5b2179..2f018b4ad42 100644 --- a/cypress/tests/integration/SubmissionWizard.cy.js +++ b/cypress/tests/integration/SubmissionWizard.cy.js @@ -86,7 +86,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click(); + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer a.show_extras') .each(($showExtras) => { @@ -113,7 +113,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click(); + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles") input').check(); cy.get('[role="dialog"] button:contains("OK")').click(); @@ -130,7 +130,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click(); + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Reviews")') .then(($tr) => { @@ -158,7 +158,7 @@ describe('Submission Wizard', function() { cy.login('dbarnes', null, 'publicknowledge'); cy.get('nav').contains('Settings').click(); // Ensure submenu item click despite animation - cy.get('nav').contains('Journal').click(); + cy.get('nav').contains('Journal').click({ force: true }); cy.get('.pkpTabs__buttons button:contains("Sections")').click(); cy.get('#sectionsGridContainer tr:contains("Articles")') .then(($tr) => { @@ -380,7 +380,7 @@ describe('Submission Wizard', function() { }); // Add missing data - cy.get('.pkpSteps button:contains("Details")').click(); + cy.get('.pkpSteps button:contains("Details")').click({ force: true }); cy.setTinyMceContent('titleAbstract-title-control-en', submission.title); cy.setTinyMceContent('titleAbstract-abstract-control-en', submission.abstract); cy.get('#titleAbstract-keywords-control-en').type(submission.keywords, {delay: 0}); @@ -388,7 +388,7 @@ describe('Submission Wizard', function() { cy.get('#titleAbstract-keywords-control-en').type('{downarrow}{enter}', {delay: 0}); cy.get('#citations-citationsRaw-control').type(submission.citations); - cy.get('.pkpSteps button:contains("Upload Files")').click(); + cy.get('.pkpSteps button:contains("Upload Files")').click({ force: true }); cy.uploadSubmissionFiles([ { 'file': 'dummy.pdf', @@ -398,7 +398,7 @@ describe('Submission Wizard', function() { } ]); - cy.get('.pkpSteps button:contains("For the Editors")').click(); + cy.get('.pkpSteps button:contains("For the Editors")').click({ force: true }); Object.keys(submission.metadata.autosuggest).forEach(field => { cy.get('#forTheEditors-' + field + '-control-en').type(submission.metadata.autosuggest[field], {delay: 0}); cy.get('li:contains("' + submission.metadata.autosuggest[field] + '")'); @@ -412,7 +412,7 @@ describe('Submission Wizard', function() { }); // All errors should be gone and submit should be allowed. - cy.get('.pkpSteps button:contains("Review")').click(); + cy.get('.pkpSteps button:contains("Review")').click({ force: true }); cy.get('*:contains("There are one or more problems")').should('not.exist'); cy.get('button:contains("Submit")').should('be.enabled'); cy.get('*:contains("You must upload at least one Article Text file.")').should('not.exist'); @@ -585,9 +585,9 @@ describe('Submission Wizard', function() { .contains('Social Sciences > Sociology'); // Add missing data - cy.get('.pkpSteps button:contains("Details")').click(); + cy.get('.pkpSteps button:contains("Details")').click({ force: true }); cy.setTinyMceContent('titleAbstract-title-control-fr_CA', submission.title.fr_CA); - cy.get('.pkpSteps button:contains("Contributors")').click(); + cy.get('.pkpSteps button:contains("Contributors")').click({ force: true }); cy.get('.listPanel__itemTitle:contains("Carlo Corino")') .parents('.listPanel__item') .find('button:contains("Edit")') @@ -595,13 +595,13 @@ describe('Submission Wizard', function() { cy.get('input[name="givenName-fr_CA"]').type('Carlo', {delay: 0}); cy.get('input[name="familyName-fr_CA"]').type('Carlo', {delay: 0}); cy.get('[role=dialog]').find('button:contains("Save")').click(); - cy.get('.pkpSteps button:contains("For the Editors")').click(); + cy.get('.pkpSteps button:contains("For the Editors")').click({ force: true }); cy.get('#forTheEditors-subjects-control-fr_CA').type('Sociologie française', {delay: 0}); cy.get('li:contains("Sociologie française")'); cy.get('#forTheEditors-subjects-control-fr_CA').type('{downarrow}{enter}', {delay: 0}); // Should be able to submit! - cy.get('.pkpSteps button:contains("Review")').click(); + cy.get('.pkpSteps button:contains("Review")').click({ force: true }); cy.get('button:contains("Submit")').click(); cy.contains('The submission, ' + submission.title.en + ', will be submitted to Journal of Public Knowledge for editorial review.'); // delay is needed so previous changes gets pushed, before the submit should be triggered