From 2f61c2354277d1df93d95fcb80eed9449cf181ab Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 13 Feb 2025 16:53:23 -0500 Subject: [PATCH] update module test for the nav class cleanForSlug change --- tests/cypress/integration/Home/homePageWithWoo.cy.js | 12 ++++++------ .../Site-Capabilities/siteCapabilities.cy.js | 4 ++-- tests/cypress/integration/Store/storePage.cy.js | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/cypress/integration/Home/homePageWithWoo.cy.js b/tests/cypress/integration/Home/homePageWithWoo.cy.js index 53587bbe..2116f0bf 100644 --- a/tests/cypress/integration/Home/homePageWithWoo.cy.js +++ b/tests/cypress/integration/Home/homePageWithWoo.cy.js @@ -39,7 +39,7 @@ describe( .should( 'exist' ) .scrollIntoView() .click(); - cy.get( `.${ appId }-app-subnavitem-Store.active` ).should( + cy.get( `.${ appId }-app-subnavitem-store-details.active` ).should( 'exist' ); cy.get( 'h2' ).should( 'exist' ); @@ -79,7 +79,7 @@ describe( ).should( 'exist' ); cy.get( '.nfd-w-0 p' ).should( 'exist' ); - cy.get( `.${ appId }-app-navitem-Home` ).click(); + cy.get( `.${ appId }-app-navitem-home` ).click(); waitForNextSteps(); cy.get( '@storeInfoStep', { timeout: customCommandTimeout, @@ -103,7 +103,7 @@ describe( .should( 'exist' ) .scrollIntoView() .click(); - cy.get( `.${ appId }-app-subnavitem-Payments.active`, { + cy.get( `.${ appId }-app-subnavitem-payments.active`, { timeout: customCommandTimeout, } ).should( 'exist' ); cy.get( '#razorpay-section' ).as( 'razorpayBlock' ); @@ -122,7 +122,7 @@ describe( .find( '.nfd-badge--upsell', { timeout: customCommandTimeout } ) .should( 'exist' ); - cy.get( `.${ appId }-app-navitem-Home` ).click(); + cy.get( `.${ appId }-app-navitem-home` ).click(); waitForNextSteps(); cy.get( '@paymentStep' ).should( 'not.exist' ); viewCompletedTasks(); @@ -176,7 +176,7 @@ describe( .should( 'exist' ) .scrollIntoView() .click(); - cy.get( `.${ appId }-app-subnavitem-Store.active`, { + cy.get( `.${ appId }-app-subnavitem-store-details.active`, { timeout: customCommandTimeout, } ).should( 'exist' ); cy.get( '#tax-yes' ).click(); @@ -190,7 +190,7 @@ describe( ).should( 'exist' ); cy.get( '.nfd-w-0 p' ).should( 'exist' ); - cy.get( `.${ appId }-app-navitem-Home` ).click(); + cy.get( `.${ appId }-app-navitem-home` ).click(); cy.reload(); waitForNextSteps(); cy.get( '@taxStep', { timeout: 30000 } ).should( 'not.exist' ); diff --git a/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js b/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js index de17bbbe..563754fd 100644 --- a/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js +++ b/tests/cypress/integration/Site-Capabilities/siteCapabilities.cy.js @@ -60,7 +60,7 @@ describe( cy.reload(); cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/store' ); - cy.get( `.${ appId }-app-subnavitem-Sales` ) + cy.get( `.${ appId }-app-subnavitem-sales-promotions` ) .as( 'salesTab' ) .should( 'exist' ); cy.get( '@salesTab' ).click(); @@ -85,7 +85,7 @@ describe( cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/store' ); // Verify Install Now exists when customer has ecommerce addon - cy.get( `.${ appId }-app-subnavitem-Sales`, { + cy.get( `.${ appId }-app-subnavitem-sales-promotions`, { timeout: mediumWait, } ) .as( 'salesTab' ) diff --git a/tests/cypress/integration/Store/storePage.cy.js b/tests/cypress/integration/Store/storePage.cy.js index 513df0c4..47d9cc21 100644 --- a/tests/cypress/integration/Store/storePage.cy.js +++ b/tests/cypress/integration/Store/storePage.cy.js @@ -19,7 +19,7 @@ describe( it( 'Verify Store Page renders properly without Woo', () => { cy.reload(); // Payments tab is not displayed - cy.get( `.${ appId }-app-subnavitem-Payments` ).should( + cy.get( `.${ appId }-app-subnavitem-payments` ).should( 'not.exist' ); @@ -31,9 +31,9 @@ describe( // Verify Store and its sub tabs should have Install WooCommerce buttons const storeNavElements = [ - `.${ appId }-app-navitem-Store`, - `.${ appId }-app-subnavitem-Products`, - `.${ appId }-app-subnavitem-Store`, + `.${ appId }-app-navitem-store`, + `.${ appId }-app-subnavitem-products-services`, + `.${ appId }-app-subnavitem-store-details`, ]; storeNavElements.forEach( ( ele ) => {