Skip to content

Commit

Permalink
update module test for the nav class cleanForSlug change
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Feb 13, 2025
1 parent d5f56d5 commit 2f61c23
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions tests/cypress/integration/Home/homePageWithWoo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down Expand Up @@ -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,
Expand All @@ -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' );
Expand All @@ -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();
Expand Down Expand Up @@ -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();
Expand All @@ -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' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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' )
Expand Down
8 changes: 4 additions & 4 deletions tests/cypress/integration/Store/storePage.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);

Expand All @@ -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 ) => {
Expand Down

0 comments on commit 2f61c23

Please sign in to comment.