Skip to content

Commit

Permalink
Merge pull request #220 from newfold-labs/PRESS4-485
Browse files Browse the repository at this point in the history
Fix WooCommerce install issue
  • Loading branch information
ramyakrishnai authored Feb 22, 2024
2 parents 1becffc + 5f68dcb commit 4ada5f2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe( 'Verify Wondercart accessibility as per site capabilities', () => {
);
cy.reload();
cy.get( `.${ appId }-app-navitem-Store`, {
timeout: mediumWait,
timeout: customCommandTimeout,
} ).click();
cy.get( `.${ appId }-app-subnavitem-Sales` )
.as( 'salesTab' )
Expand All @@ -84,9 +84,13 @@ describe( 'Verify Wondercart accessibility as per site capabilities', () => {
);
} );

it( 'Verify clicking on Buy Now leads to cpanel login page', () => {
it('Verify clicking on Buy Now leads to cpanel login page', () => {
cy.reload();
cy.get( `.${ appId }-app-navitem-Store`, {
timeout: mediumWait,
timeout: customCommandTimeout,
} ).should( 'exist' );
cy.get( `.${ appId }-app-navitem-Store`, {
timeout: customCommandTimeout,
} ).click();
cy.get( `.${ appId }-app-subnavitem-Sales` ).click();
cy.get( '.nfd-button--upsell', { timeout: mediumWait } )
Expand All @@ -113,7 +117,7 @@ describe( 'Verify Wondercart accessibility as per site capabilities', () => {
);
cy.reload();
cy.get( `.${ appId }-app-navitem-Store`, {
timeout: mediumWait,
timeout: customCommandTimeout,
} ).click();
cy.get( `.${ appId }-app-subnavitem-Sales`, { timeout: mediumWait } )
.as( 'salesTab' )
Expand All @@ -126,7 +130,7 @@ describe( 'Verify Wondercart accessibility as per site capabilities', () => {

it( 'Verify clicking Install Now successfully installs Wonder Cart plugin', () => {
cy.get( `.${ appId }-app-navitem-Store`, {
timeout: mediumWait,
timeout: customCommandTimeout,
} ).click();
cy.get( `.${ appId }-app-subnavitem-Sales` ).click();
cy.get( '.nfd-button--upsell', { timeout: mediumWait } )
Expand Down
16 changes: 7 additions & 9 deletions tests/cypress/integration/wp-module-support/utils.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@ export const comingSoon = ( shouldBeComingSoon ) => {
};

export const installWoo = () => {
cy.get(
'.nfd-app-section-content .nfd-bg-canvas .nfd-button.nfd-button--upsell'
)
.eq( 0 )
.click();
cy.get( '.nfd-notifications--bottom-left .nfd-notification--success', {
timeout: longWait,
} ).should( 'exist' );
cy.get( '.nfd-w-0 p' ).should( 'exist' );
cy.exec( `npx wp-env run cli wp plugin install woocommerce`, {
timeout: longWait
} );

cy.exec( `npx wp-env run cli wp plugin activate woocommerce`, {
timeout: longWait
} );
};

export const viewCompletedTasks = () => {
Expand Down

0 comments on commit 4ada5f2

Please sign in to comment.