Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WooCommerce install issue #220

Merged
merged 6 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading