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();