From e4635803a27ffb48e39acbfeb48e8311a7e863e8 Mon Sep 17 00:00:00 2001 From: Avneet Raj Date: Thu, 25 Jan 2024 15:42:05 +0530 Subject: [PATCH] initial commit --- .../experience.cy.js | 38 +++++++++++++++++++ .../wp-module-support/siteGen.cy.js | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/cypress/integration/5-AI-SiteGen-onboarding-flow/experience.cy.js diff --git a/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/experience.cy.js b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/experience.cy.js new file mode 100644 index 000000000..bfa7746a0 --- /dev/null +++ b/tests/cypress/integration/5-AI-SiteGen-onboarding-flow/experience.cy.js @@ -0,0 +1,38 @@ +// + +import { AdminBarCheck, BackButtonCheck, DarkBGCheck, LightBGChcek, ProgressBarCheck} from "../wp-module-support/siteGen.cy"; + +describe( 'SiteGen Experience & Site Building Step', function () { + before( () => { + cy.visit( + 'wp-admin/index.php?page=nfd-onboarding#/sitegen/step/experience' + ); + } ); + + it( 'Check for the header admin bar', () => { + AdminBarCheck(); + } ); + + it( 'Check for the existing dark background', () => { + DarkBGCheck(); + } ); + + it( 'Check for the light background', () => { + LightBGChcek(); + } ); + + it( 'Check the Progress Bar Value', () => { + ProgressBarCheck('50%'); + }); + + it( 'Check for back button and go back', () => { + BackButtonCheck('sitegen/step/experience'); + } ); + + it( 'Check for existence of experience cards', () => { + cy.get( '.nfd-sg-experience-level' ).should('be.visible'); + cy.get( '.nfd-sg-loader' ).should('be.visible'); + cy.get( '.nfd-sg-card' ).should('be.visible'); + } ); + +}); diff --git a/tests/cypress/integration/wp-module-support/siteGen.cy.js b/tests/cypress/integration/wp-module-support/siteGen.cy.js index 3db5e1fed..4512155ec 100644 --- a/tests/cypress/integration/wp-module-support/siteGen.cy.js +++ b/tests/cypress/integration/wp-module-support/siteGen.cy.js @@ -1,7 +1,7 @@ // export const AdminBarCheck = () => { - cy.get( '.nfd-onboarding-header__admin-bar' ).should('be.visible'); + cy.get( '.nfd-onboarding-header__admin-bar', {timeout:15000} ).should('be.visible'); }; export const DarkBGCheck = () => {