From 17be34c5913a643b05f000e3768bf74f36335618 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Thu, 19 Sep 2024 01:33:50 +0800 Subject: [PATCH] pkp/pkp-lib#9890 Update cypress test related to new sidebar navigation (#85) * pkp/pkp-lib#9890 Update cypress test related to new sidebar navigation * pkp/pkp-lib#9890 Update target selector for nav items in cypress tests --- cypress/tests/functional/StaticPages.cy.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cypress/tests/functional/StaticPages.cy.js b/cypress/tests/functional/StaticPages.cy.js index 3979d95..812f34e 100644 --- a/cypress/tests/functional/StaticPages.cy.js +++ b/cypress/tests/functional/StaticPages.cy.js @@ -11,7 +11,9 @@ describe('Static Pages plugin tests', function() { it('Creates and exercises a static page', function() { cy.login('admin', 'admin', 'publicknowledge'); - cy.get('.app__nav 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.get('button[id="plugins-button"]').click(); // Find and enable the plugin @@ -26,7 +28,9 @@ describe('Static Pages plugin tests', function() { cy.visit(''); cy.get('a:contains("admin")').click(); cy.get('ul[id="navigationUser"] a:contains("Dashboard")').click(); - cy.get('.app__nav 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.get('button[id="staticPages-button"]').click(); // Create a static page