diff --git a/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js b/cypress/tests/data/10-ApplicationSetup/20-CreateContext.cy.js index dde4dc4eca..ff8fba89f1 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').contains('Administration').click(); cy.get('a').contains('Hosted Servers').click(); cy.get('a[class=show_extras]').click(); cy.contains('Settings wizard').click(); @@ -99,7 +99,9 @@ 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('Server').click(); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Server').click({ force: true }); cy.get('input[name="abbreviation-en"]').type('Pub Know Pre', {delay: 0}); cy.get('input[name="acronym-en"]').type(Cypress.env('contextAcronyms')['en'], {delay: 0}); @@ -112,7 +114,9 @@ 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('Server').click(); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Server').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/40-CreateUsers.cy.js b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js index 2a727c52a1..2737c53caa 100644 --- a/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/40-CreateUsers.cy.js @@ -12,7 +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('a:contains("Users & Roles")').click(); + 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-SubmissionGroups.cy.js b/cypress/tests/data/10-ApplicationSetup/50-SubmissionGroups.cy.js index f9d91fd550..27da72a8d1 100644 --- a/cypress/tests/data/10-ApplicationSetup/50-SubmissionGroups.cy.js +++ b/cypress/tests/data/10-ApplicationSetup/50-SubmissionGroups.cy.js @@ -12,7 +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('.app__nav a').contains('Server').click(); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Server').click({ force: true }); cy.get('button[id="sections-button"]').click(); // Edit Preprints section to add section editors @@ -28,7 +30,9 @@ 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('Server').click(); + cy.get('nav').contains('Settings').click(); + // Ensure submenu item click despite animation + cy.get('nav').contains('Server').click({ force: true }); cy.get('button[id="categories-button"]').click(); cy.addCategory('History', 'history'); diff --git a/cypress/tests/integration/Doi.cy.js b/cypress/tests/integration/Doi.cy.js index 6b50439402..231eb04e3d 100644 --- a/cypress/tests/integration/Doi.cy.js +++ b/cypress/tests/integration/Doi.cy.js @@ -15,7 +15,7 @@ describe('DOI tests', function() { const loginAndGoToDoiPage = () => { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('a:contains("DOIs")').click(); + cy.get('nav').contains('DOIs').click(); cy.get('button#submission-doi-management-button').click(); }; @@ -291,7 +291,9 @@ describe('DOI tests', function() { cy.log("Check DOI versioning off creates new DOI for first version"); // Turn DOI versioning off - cy.get('a:contains("Distribution")').click(); + 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("input[name=doiVersioning][value=false]").click(); @@ -302,7 +304,7 @@ describe('DOI tests', function() { cy.get('#doisSetup [role="status"]').contains('Saved'); //Go to publication and rollback to first publication being unpublished, then republish first publication - cy.get('a:contains("Submissions")').click(); + cy.get('nav').contains('Submissions').click(); cy.get('button:contains("Archived")').click(); cy.get(`div#archive .listPanel__item:contains("${articleTitle}") a:contains("View")`).click(); @@ -347,7 +349,7 @@ describe('DOI tests', function() { cy.log("Check DOI versioning off copies previous DOI for subsequent versions"); // Publish Version 2 - cy.get('a:contains("Submissions")').click(); + cy.get('nav').contains('Submissions').click(); cy.get('button:contains("Archived")').click(); cy.get(`div#archive .listPanel__item:contains("${articleTitle}") a:contains("View")`).click(); cy.get('button#publication-button').click(); @@ -400,7 +402,9 @@ describe('DOI tests', function() { ); // Change DOI versioning to "on" to confirm DOI was copied properly - cy.get('a:contains("Distribution")').click(); + 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("input[name=doiVersioning][value=true]").click(); @@ -483,7 +487,7 @@ describe('DOI tests', function() { // Check creates new version // Go to publication and publish Version 2 - cy.get('a:contains("Submissions")').click(); + cy.get('nav').contains('Submissions').click(); cy.get('button:contains("Archived")').click(); cy.get(`div#archive .listPanel__item:contains("${articleTitle}") a:contains("View")`).click(); cy.get('button#publication-button').click(); diff --git a/cypress/tests/integration/DoiCrossref.cy.js b/cypress/tests/integration/DoiCrossref.cy.js index 10172c230d..bd3d6a08f1 100644 --- a/cypress/tests/integration/DoiCrossref.cy.js +++ b/cypress/tests/integration/DoiCrossref.cy.js @@ -13,7 +13,9 @@ describe('Crossref tests', function () { it('Check Crossref Configuration', function() { cy.login('dbarnes', null, 'publicknowledge'); - cy.get('a:contains("Website")').click(); + 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(); @@ -23,7 +25,9 @@ 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').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( '#doiSetup input[name="enabledDoiTypes"][value="representation"]' @@ -73,7 +77,9 @@ describe('Crossref tests', function () { }); cy.log('Deselect Crossref as registered agency for downstream tests'); - cy.get('a:contains("Distribution")').click(); + 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(