diff --git a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/4-site-logo.cy.js b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/4-site-logo.cy.js index abaf39c81..ce68845d7 100644 --- a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/4-site-logo.cy.js +++ b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/4-site-logo.cy.js @@ -17,6 +17,7 @@ import { describe( 'SiteGen Site Logo Step', function () { before( () => { + cy.visit( 'wp-admin/?page=nfd-onboarding#/sitegen/step/site-logo' ); cy.intercept( apiList.sitegen, ( req ) => { siteGenMockAll( req ); } ).as( 'sitegenCalls' ); @@ -24,10 +25,7 @@ describe( 'SiteGen Site Logo Step', function () { cy.intercept( apiList.homepages, ( req ) => { homePagesMock( req ); } ).as( 'homePageCall' ); - - cy.visit( 'wp-admin/?page=nfd-onboarding#/sitegen/step/site-logo' ); - cy.wait( '@sitegenCalls', { timeout: 60000 } ); - cy.wait( '@homePageCall', { timeout: 60000 } ); + cy.timeout(120000); } ); it( 'Check for the header admin bar', () => { @@ -62,7 +60,7 @@ describe( 'SiteGen Site Logo Step', function () { DisabledNextButton(); } ); - it.skip( 'Check if Image gets uploaded', () => { + it( 'Check if Image gets uploaded', () => { const sampleLogoPath = `vendor/newfold-labs/wp-module-onboarding/tests/cypress/fixtures/image.png`; const LogoPreviewClass = '.nfd-onboarding-image-uploader--with-text__site_logo__preview'; @@ -92,7 +90,7 @@ describe( 'SiteGen Site Logo Step', function () { ); } ); - it.skip( 'Check if the Next Button is enabled and go next', () => { + it( 'Check if the Next Button is enabled and go next', () => { cy.get( '.nfd-onboarding-button--site-gen-next' ) .should( 'not.be.disabled' ) .click(); diff --git a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/5-experience.cy.js b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/5-experience.cy.js index 7e90ecb9e..b46e36dde 100644 --- a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/5-experience.cy.js +++ b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/5-experience.cy.js @@ -7,12 +7,26 @@ import { LightBGCheck, ProgressBarCheck, } from '../wp-module-support/siteGen.cy'; +import { + apiList, + siteGenMockAll, + homePagesMock, +} from '../wp-module-support/MockApi.cy'; describe( 'SiteGen Experience & Site Building Step', function () { before( () => { cy.visit( 'wp-admin/index.php?page=nfd-onboarding#/sitegen/step/experience' ); + cy.intercept( apiList.sitegen, ( req ) => { + siteGenMockAll( req ); + } ).as( 'sitegenCalls' ); + + cy.intercept( apiList.homepages, ( req ) => { + homePagesMock( req ); + } ).as( 'homePageCall' ); + cy.timeout(120000); + cy.wait(5000); } ); it( 'Check for the header admin bar', () => { diff --git a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/6-preview.cy.js b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/6-preview.cy.js index 708616f94..aac009ba5 100644 --- a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/6-preview.cy.js +++ b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/6-preview.cy.js @@ -6,12 +6,26 @@ import { LightBGCheck, ProgressBarCheck, } from '../wp-module-support/siteGen.cy'; +import { + apiList, + siteGenMockAll, + homePagesMock, +} from '../wp-module-support/MockApi.cy'; describe( 'SiteGen Site Preview Step', function () { before( () => { cy.visit( 'wp-admin/index.php?page=nfd-onboarding#/sitegen/step/preview' ); + cy.intercept( apiList.sitegen, ( req ) => { + siteGenMockAll( req ); + } ).as( 'sitegenCalls' ); + + cy.intercept( apiList.homepages, ( req ) => { + homePagesMock( req ); + } ).as( 'homePageCall' ); + cy.timeout(120000); + cy.wait(5000); cy.wait( 5000 ); } );