From 6e99ed067159a702a0a5b209ee4557db268f43a4 Mon Sep 17 00:00:00 2001 From: Blesilda Ramirez Date: Fri, 13 Sep 2024 20:00:23 +0800 Subject: [PATCH] pkp/pkp-lib#9890 Update target selector for nav items in cypress tests --- cypress/tests/functional/WebFeed.cy.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cypress/tests/functional/WebFeed.cy.js b/cypress/tests/functional/WebFeed.cy.js index 69e3da4..59f02d4 100644 --- a/cypress/tests/functional/WebFeed.cy.js +++ b/cypress/tests/functional/WebFeed.cy.js @@ -12,8 +12,9 @@ describe('Web Feed plugin tests', () => { it('The side bar and the feeds are displayed properly', () => { 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('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.get('button[id="plugins-button"]').click(); // Access the settings and setup some options @@ -32,8 +33,9 @@ describe('Web Feed plugin tests', () => { // Enable the wed feed plugin's sidebar cy.reload(); - 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.get('button[id="appearance-button"]').click(); cy.get('#appearance-setup-button').click();