From e64e04603232c3ea062cd8a5e341347266ed22c9 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Mon, 6 May 2024 22:43:54 +0800 Subject: [PATCH 1/4] pkp/pkp-lib#9890 Add icon to be used for Catalog link --- classes/template/TemplateManager.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/template/TemplateManager.php b/classes/template/TemplateManager.php index 3257803f4b5..02415ec3cea 100644 --- a/classes/template/TemplateManager.php +++ b/classes/template/TemplateManager.php @@ -135,6 +135,7 @@ public function setupBackendPage() 'name' => __('navigation.catalog'), 'url' => $router->url($request, null, 'manageCatalog'), 'isCurrent' => $request->getRequestedPage() === 'manageCatalog', + 'icon' => 'Catalog' ]; $index = array_search('submissions', array_keys($menu)); From 1c7aa7da4289d0fedf2ff0d779b7b5baec6b4e2f Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 14:07:40 +0800 Subject: [PATCH 2/4] pkp/pkp-lib#9890 Update cypress tests related to new sidebar navigation --- .../data/10-ApplicationSetup/20-CreateContext.cy.js | 11 +++++++---- .../data/10-ApplicationSetup/40-CreateUsers.cy.js | 3 ++- .../10-ApplicationSetup/50-CreateCategories.cy.js | 3 ++- .../data/10-ApplicationSetup/50-CreateSeries.cy.js | 3 ++- cypress/tests/integration/CompetingInterests.cy.js | 6 ++++-- cypress/tests/integration/Doi.cy.js | 2 +- cypress/tests/integration/Payments.cy.js | 5 +++-- cypress/tests/integration/Statistics.cy.js | 3 ++- .../tests/integration/Z_MonographViewDCMetadata.cy.js | 8 +++++--- 9 files changed, 28 insertions(+), 16 deletions(-) diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index ef3f6ba53c7..5dd028cd803 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 span').contains('Administration').click(); cy.get('a').contains('Hosted Presses').click(); cy.get('a[class=show_extras]').click(); cy.contains('Settings wizard').click(); @@ -93,7 +93,8 @@ 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('Press').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('Press').click({ force: true }); cy.get('div[id=masthead]').find('button').contains('Save').click(); cy.get('#masthead [role="status"]').contains('Saved'); @@ -103,7 +104,8 @@ 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('Press').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('Press').click({ force: true }); cy.get('button[id="contact-button"]').click(); // Submit the form with required fields missing. @@ -126,7 +128,8 @@ describe('Data suite tests', function() { it('Tests role settings', function() { cy.login('admin', 'admin', 'publicknowledge'); - 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 }); cy.get('button').contains('Roles').click(); // "Edit" link below "Volume editor" role diff --git a/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js index 4e887f558a7..0313ee4ef04 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 = [ { diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateCategories.cy.js index 9bfe5a63775..c0bd6ac1504 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('.app__nav a').contains('Press').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('Press').click({ force: true }); cy.get('button[id="categories-button"]').click(); // Create an Applied Science category diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.cy.js index ce05c637767..55ac65e9537 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.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('.app__nav a').contains('Press').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('Press').click({ force: true }); cy.get('button[id="sections-button"]').click(); // Create a new "Library & Information Studies" series diff --git a/cypress/tests/integration/CompetingInterests.cy.js b/cypress/tests/integration/CompetingInterests.cy.js index f05956547eb..81f6adf34eb 100644 --- a/cypress/tests/integration/CompetingInterests.cy.js +++ b/cypress/tests/integration/CompetingInterests.cy.js @@ -55,7 +55,8 @@ describe('Data suite tests', function() { it('Tests with Competing Interests enabled', function() { // Set the CI requirement setting cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__nav 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[id="review-button"]').click(); cy.get('button[id="reviewerGuidance-button"]').click(); cy.setTinyMceContent('reviewerGuidance-competingInterests-control-en', 'Reviewer competing interests disclosure'); @@ -104,7 +105,8 @@ describe('Data suite tests', function() { // Disable the CI requirement again cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__nav 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[id="review-button"]').click(); cy.get('button[id="reviewerGuidance-button"]').click(); cy.setTinyMceContent('reviewerGuidance-competingInterests-control-en', ''); diff --git a/cypress/tests/integration/Doi.cy.js b/cypress/tests/integration/Doi.cy.js index bac3aa969c1..cf20c6ddc3c 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 = () => { - cy.get('a:contains("DOIs")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('DOIs').click(); cy.get('button#submission-doi-management-button').click(); }; diff --git a/cypress/tests/integration/Payments.cy.js b/cypress/tests/integration/Payments.cy.js index c6ec7fecb0e..1dcdb089422 100644 --- a/cypress/tests/integration/Payments.cy.js +++ b/cypress/tests/integration/Payments.cy.js @@ -12,7 +12,8 @@ describe('Payments', function() { it('Enable Payment', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__nav 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[id="payments-button"]').click(); cy.get('input[type="checkbox"][name="paymentsEnabled"]:first').click(); cy.get('select[id="paymentSettings-currency-control"]').select('US Dollar'); @@ -24,7 +25,7 @@ describe('Payments', function() { it('Add a direct sales on Submission chapter', function () { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__nav a:contains("Submissions")').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Submissions').click(); cy.get('button[id="archive-button"]').click(); var submissionElement = cy.get('#archive .listPanel__item').contains('Bomb Canada and Other Unkind Remarks in the American Media').parents('.listPanel__item'); diff --git a/cypress/tests/integration/Statistics.cy.js b/cypress/tests/integration/Statistics.cy.js index 6ffb1609193..485461b0f37 100644 --- a/cypress/tests/integration/Statistics.cy.js +++ b/cypress/tests/integration/Statistics.cy.js @@ -18,7 +18,8 @@ describe('Statistics Tests', function() { it('Check statistics', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('.app__nav a:contains("Monographs")').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('Monographs').click({ force: true }); cy.checkGraph( 'Total catalog views by date', 'Abstract Views', diff --git a/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js b/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js index b5db33eb8a1..2a8245f78ad 100644 --- a/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js +++ b/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js @@ -372,7 +372,8 @@ describe('Monograph View Metadata - DC Plugin', function() { cy.get('a').contains('Dashboard').click(); // Enable metadata settings - cy.get('.app__nav a').contains('Press').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('Press').click({ force: true }); cy.get('button#sections-button').click(); cy.get('tr[id^="component-grid-settings-series-seriesgrid-row-"]:contains("Political Economy") > .first_column > .show_extras').click(); cy.get('tr[id^="component-grid-settings-series-seriesgrid-row-"]:contains("Political Economy") + tr a:contains("Edit")').click(); @@ -384,7 +385,8 @@ describe('Monograph View Metadata - DC Plugin', function() { cy.get('div:contains("Your changes have been saved.")'); // Enable metadata settings - cy.get('.app__nav 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(); @@ -398,7 +400,7 @@ describe('Monograph View Metadata - DC Plugin', function() { cy.checkDoiConfig(['publication', 'chapter', 'representation', 'file']); // After configuration, go to submissions - cy.get('.app__nav a').contains('Submissions').click(); + cy.get('nav div[data-pc-section="header"] a span').contains('Submissions').click(); // Create a new submission cy.getCsrfToken(); From c037a3a0fe8340343933239e2e6dd6ddfaa70759 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 20:25:22 +0800 Subject: [PATCH 3/4] pkp/pkp-lib#9890 Update target selector for nav items in cypress tests --- .../10-ApplicationSetup/20-CreateContext.cy.js | 17 ++++++++++------- .../10-ApplicationSetup/40-CreateUsers.cy.js | 5 +++-- .../50-CreateCategories.cy.js | 5 +++-- .../10-ApplicationSetup/50-CreateSeries.cy.js | 5 +++-- .../tests/integration/CompetingInterests.cy.js | 10 ++++++---- cypress/tests/integration/Doi.cy.js | 2 +- cypress/tests/integration/Payments.cy.js | 7 ++++--- cypress/tests/integration/Statistics.cy.js | 5 +++-- .../integration/Z_MonographViewDCMetadata.cy.js | 12 +++++++----- 9 files changed, 40 insertions(+), 28 deletions(-) diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index 5dd028cd803..9c3e009c44f 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 Presses').click(); cy.get('a[class=show_extras]').click(); cy.contains('Settings wizard').click(); @@ -93,8 +93,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('Press').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Press').click({ force: true }); cy.get('div[id=masthead]').find('button').contains('Save').click(); cy.get('#masthead [role="status"]').contains('Saved'); @@ -104,8 +105,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('Press').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Press').click({ force: true }); cy.get('button[id="contact-button"]').click(); // Submit the form with required fields missing. @@ -128,8 +130,9 @@ describe('Data suite tests', function() { it('Tests role settings', function() { cy.login('admin', 'admin', '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('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.get('button').contains('Roles').click(); // "Edit" link below "Volume editor" role diff --git a/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js index 0313ee4ef04..30c38801a05 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 c0bd6ac1504..f663c7fd741 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('Press').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Press').click({ force: true }); cy.get('button[id="categories-button"]').click(); // Create an Applied Science category diff --git a/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.cy.js b/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.cy.js index 55ac65e9537..8be5cfe9fbd 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-CreateSeries.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('Press').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Press').click({ force: true }); cy.get('button[id="sections-button"]').click(); // Create a new "Library & Information Studies" series diff --git a/cypress/tests/integration/CompetingInterests.cy.js b/cypress/tests/integration/CompetingInterests.cy.js index 81f6adf34eb..b9bb878b3c3 100644 --- a/cypress/tests/integration/CompetingInterests.cy.js +++ b/cypress/tests/integration/CompetingInterests.cy.js @@ -55,8 +55,9 @@ describe('Data suite tests', function() { it('Tests with Competing Interests enabled', function() { // Set the CI requirement setting 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('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[id="review-button"]').click(); cy.get('button[id="reviewerGuidance-button"]').click(); cy.setTinyMceContent('reviewerGuidance-competingInterests-control-en', 'Reviewer competing interests disclosure'); @@ -105,8 +106,9 @@ describe('Data suite tests', function() { // Disable the CI requirement again 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('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[id="review-button"]').click(); cy.get('button[id="reviewerGuidance-button"]').click(); cy.setTinyMceContent('reviewerGuidance-competingInterests-control-en', ''); diff --git a/cypress/tests/integration/Doi.cy.js b/cypress/tests/integration/Doi.cy.js index cf20c6ddc3c..4a7754fdf29 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 = () => { - cy.get('nav div[data-pc-section="header"] a span').contains('DOIs').click(); + cy.get('nav').contains('DOIs').click(); cy.get('button#submission-doi-management-button').click(); }; diff --git a/cypress/tests/integration/Payments.cy.js b/cypress/tests/integration/Payments.cy.js index 1dcdb089422..11a91393f86 100644 --- a/cypress/tests/integration/Payments.cy.js +++ b/cypress/tests/integration/Payments.cy.js @@ -12,8 +12,9 @@ describe('Payments', function() { it('Enable Payment', 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 }); cy.get('button[id="payments-button"]').click(); cy.get('input[type="checkbox"][name="paymentsEnabled"]:first').click(); cy.get('select[id="paymentSettings-currency-control"]').select('US Dollar'); @@ -25,7 +26,7 @@ describe('Payments', function() { it('Add a direct sales on Submission chapter', function () { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('nav div[data-pc-section="header"] a span').contains('Submissions').click(); + cy.get('nav').contains('Submissions').click(); cy.get('button[id="archive-button"]').click(); var submissionElement = cy.get('#archive .listPanel__item').contains('Bomb Canada and Other Unkind Remarks in the American Media').parents('.listPanel__item'); diff --git a/cypress/tests/integration/Statistics.cy.js b/cypress/tests/integration/Statistics.cy.js index 485461b0f37..b072ee64c6a 100644 --- a/cypress/tests/integration/Statistics.cy.js +++ b/cypress/tests/integration/Statistics.cy.js @@ -18,8 +18,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('Monographs').click({ force: true }); + cy.get('nav').contains('Statistics').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Monographs').click({ force: true }); cy.checkGraph( 'Total catalog views by date', 'Abstract Views', diff --git a/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js b/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js index 2a8245f78ad..b9efe86a582 100644 --- a/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js +++ b/cypress/tests/integration/Z_MonographViewDCMetadata.cy.js @@ -372,8 +372,9 @@ describe('Monograph 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('Press').click({ force: true }); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Press').click({ force: true }); cy.get('button#sections-button').click(); cy.get('tr[id^="component-grid-settings-series-seriesgrid-row-"]:contains("Political Economy") > .first_column > .show_extras').click(); cy.get('tr[id^="component-grid-settings-series-seriesgrid-row-"]:contains("Political Economy") + tr a:contains("Edit")').click(); @@ -385,8 +386,9 @@ describe('Monograph View Metadata - DC Plugin', function() { cy.get('div:contains("Your changes have been saved.")'); // 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(); @@ -400,7 +402,7 @@ describe('Monograph View Metadata - DC Plugin', function() { cy.checkDoiConfig(['publication', 'chapter', 'representation', 'file']); // 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 7ade3097bfd9050877fc24282ae6931b89988a94 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Wed, 18 Sep 2024 21:26:11 +0800 Subject: [PATCH 4/4] pkp/pkp-lib#9890 Add {force:true} when clicking wizard step buttons --- cypress/support/commands.js | 2 +- cypress/tests/data/60-content/AfinkelSubmission.cy.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 495488b91dd..01c0db19a35 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -83,7 +83,7 @@ Cypress.Commands.add('createSubmissionWithApi', (data, csrfToken) => { }) .then(() => { - cy.get('.pkpSteps__step__label:contains("Details")').click(); + cy.get('.pkpSteps__step__label:contains("Details")').click({force: true}); }) .addSubmissionAuthorsWithApi(api, data, csrfToken) .addChapters(data.chapters); diff --git a/cypress/tests/data/60-content/AfinkelSubmission.cy.js b/cypress/tests/data/60-content/AfinkelSubmission.cy.js index 2447892e6c6..64b3708ef6e 100644 --- a/cypress/tests/data/60-content/AfinkelSubmission.cy.js +++ b/cypress/tests/data/60-content/AfinkelSubmission.cy.js @@ -268,7 +268,7 @@ describe('Data suite tests', function() { cy.get('a').contains(submission.title).click(); // Go back to Details step and add chapters - cy.get('.pkpSteps__step__label:contains("Details")').click(); + cy.get('.pkpSteps__step__label:contains("Details")').click({force: true}); cy.addChapters(submission.chapters); cy.get('.submissionWizard__footer button').contains('Continue').click();