diff --git a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/3-site-details.cy.js b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/3-site-details.cy.js index 077c9029a..d52056e85 100644 --- a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/3-site-details.cy.js +++ b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/3-site-details.cy.js @@ -48,8 +48,8 @@ describe( 'SiteGen Site Details Step', function () { 'Bean There Café - A cozy, sustainable coffee shop in Asheville, North Carolina, focused on fair-trade coffee and local pastries. Their site will feature their menu, special events, and a blog on coffee culture.' ); cy.get( '.nfd-sg-input-box__hint' ).should( 'be.visible' ); - }); - + } ); + it( 'Check for back button and go back', () => { BackButtonCheck( 'sitegen/step/site-details' ); } ); 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 9d09e138e..0d2ef5ef3 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 @@ -59,16 +59,19 @@ describe( 'SiteGen Site Logo Step', function () { it( 'Check if the Next Button is disabled when there is no logo', () => { DisabledNextButton(); } ); - - it('Verify Skip for now and go to next step', () => { - cy.get( '.nfd-onboarding-step--site-gen__site-logo__container__buttons__skip' ) + + it( 'Verify Skip for now and go to next step', () => { + cy.get( + '.nfd-onboarding-step--site-gen__site-logo__container__buttons__skip' + ) .should( 'not.be.disabled' ) .click(); cy.url().should( 'not.contain', 'sitegen/step/site-logo' ); // go back to site-logo step - cy.go( 'back' ) - cy.get( '.nfd-onboarding-step--site-gen__site-logo__container' , { timeout: 10000 } ) - .should( 'be.visible' ) + cy.go( 'back' ); + cy.get( '.nfd-onboarding-step--site-gen__site-logo__container', { + timeout: 10000, + } ).should( 'be.visible' ); } ); it.skip( 'Check if Image gets uploaded', () => { 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 c59041925..a3291ade1 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 @@ -53,10 +53,12 @@ describe( 'SiteGen Experience & Site Building Step', function () { 3 ); } ); - - it( 'Check if Back button is not visible' , () => { - cy.get( '.nfd-onboarding-button--dark' , { timeout : 20000 } ).should( 'not.exist' ) - } ) + + it( 'Check if Back button is not visible', () => { + cy.get( '.nfd-onboarding-button--dark', { timeout: 20000 } ).should( + 'not.exist' + ); + } ); it( 'Check each experience cards', () => { const className = '.nfd__option_heading_subheading__wrapper'; 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 ec5af75a6..0faabe761 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 @@ -43,9 +43,9 @@ describe( 'SiteGen Site Preview Step', function () { it( 'Check the Progress Bar Value', () => { ProgressBarCheck( '60%' ); } ); - - it( 'Check if Back button is not visible' , () => { - cy.get( '.nfd-onboarding-button--dark' ).should( 'not.exist' ) + + it( 'Check if Back button is not visible', () => { + cy.get( '.nfd-onboarding-button--dark' ).should( 'not.exist' ); } ); it( 'Check for by default 3 versions should be there', () => { @@ -60,12 +60,12 @@ describe( 'SiteGen Site Preview Step', function () { ); // when no fav theme is selected cy.get( '.live-preview-sitegen--selectable-card__live-preview-container-buttons__button', - { timeout : 20000 } + { timeout: 20000 } ) .eq( 0 ) .as( 'fav' ) .scrollIntoView() - .wait(2000) + .wait( 2000 ) .should( 'be.visible' ) .click(); cy.get( 'g[clip-path="url(#heart-filled_svg__a)"]', { @@ -87,14 +87,14 @@ describe( 'SiteGen Site Preview Step', function () { it( 'Check for regenerating the new theme versions', () => { cy.intercept( apiList.homepagesRegenerate, ( req ) => { homePagesRegenerate( req ); - }).as('regenerate'); + } ).as( 'regenerate' ); cy.get( '[aria-label="Regenerate Content"]', { timeout: 60000 } ) - .eq(0) + .eq( 0 ) .scrollIntoView() .wait( 2000 ) - .click({ force: true }); - cy.wait('@regenerate', {timeout: 60000}) + .click( { force: true } ); + cy.wait( '@regenerate', { timeout: 60000 } ); cy.get( '.live-preview-sitegen--selectable-card', { timeout: 20000 } ) .should( 'be.visible' ) .should( 'have.length', 4 ); diff --git a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/7-editor.cy.js b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/7-editor.cy.js index 331520e97..9ca12c630 100644 --- a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/7-editor.cy.js +++ b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/7-editor.cy.js @@ -132,9 +132,11 @@ describe( 'SiteGen Site Editor Step', function () { it( 'Check for favorite themes inside favorite tab', () => { cy.get( - '.nfd-onboarding-sidebar--sitegen-editor-patterns__header__tab-panel__favorites-tab', { - timeout: 10000 - } ) + '.nfd-onboarding-sidebar--sitegen-editor-patterns__header__tab-panel__favorites-tab', + { + timeout: 10000, + } + ) .scrollIntoView() .should( 'be.visible' ) .click(); @@ -155,7 +157,7 @@ describe( 'SiteGen Site Editor Step', function () { } ); it( 'Check if Back button is not visible', () => { - cy.get( '.nfd-onboarding-button--dark' ).should( 'not.exist' ) + cy.get( '.nfd-onboarding-button--dark' ).should( 'not.exist' ); } ); it( 'Check changing the existing fonts from sidebar', () => { @@ -281,11 +283,12 @@ describe( 'SiteGen Site Editor Step', function () { '.nfd-onboarding-sidebar--customize__design-colors-panel__custom__colors__container' ).should( 'not.exist' ); } ); - + it( 'Check Save & Continue button functionality', () => { - cy.get('.nfd-onboarding-header--sitegen__editor__end__save-button__text', { timeout : 20000 } ) - .click(); - cy.get(`.${getAppId()}-app-container`, { timeout : 90000 } ) - + cy.get( + '.nfd-onboarding-header--sitegen__editor__end__save-button__text', + { timeout: 20000 } + ).click(); + cy.get( `.${ getAppId() }-app-container`, { timeout: 90000 } ); } ); } ); diff --git a/tests/cypress/integration/wp-module-support/pluginID.cy.js b/tests/cypress/integration/wp-module-support/pluginID.cy.js index 75cda85ec..326a6229a 100644 --- a/tests/cypress/integration/wp-module-support/pluginID.cy.js +++ b/tests/cypress/integration/wp-module-support/pluginID.cy.js @@ -1,20 +1,29 @@ // export const GetPluginId = () => { - return Cypress.env('pluginId'); - } + return Cypress.env( 'pluginId' ); +}; export const GetPluginName = () => { - if(GetPluginId()=='bluehost'){ - cy.get( '.nfd-step-card-subheading', {timeout:20000} ).should( 'contain', 'Bluehost'); - }; - if(GetPluginId()=='hostgator'){ - cy.get( '.nfd-step-card-subheading', {timeout:20000} ).should( 'contain', 'HostGator'); - }; - if(GetPluginId()=='crazy-domains'){ - cy.get( '.nfd-step-card-subheading', {timeout:20000} ).should( 'contain', 'Crazy Domains'); - }; -} + if ( GetPluginId() == 'bluehost' ) { + cy.get( '.nfd-step-card-subheading', { timeout: 20000 } ).should( + 'contain', + 'Bluehost' + ); + } + if ( GetPluginId() == 'hostgator' ) { + cy.get( '.nfd-step-card-subheading', { timeout: 20000 } ).should( + 'contain', + 'HostGator' + ); + } + if ( GetPluginId() == 'crazy-domains' ) { + cy.get( '.nfd-step-card-subheading', { timeout: 20000 } ).should( + 'contain', + 'Crazy Domains' + ); + } +}; export const getAppId = () => { - return Cypress.env('appId') -} + return Cypress.env( 'appId' ); +};