-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #411 from newfold-labs/add-welcome-step-tests
PRESS2-1485 Cypress Tests for SiteGen Welcome Step
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
tests/cypress/integration/5-AI-SiteGen-onboarding-flow/welcome.cy.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// <reference types="Cypress" /> | ||
|
||
import { AdminBarCheck, BackButtonCheck, DarkBGCheck, LightBGChcek, ProgressBarCheck} from "../wp-module-support/siteGen.cy"; | ||
|
||
describe( 'SiteGen Welcome Step', function () { | ||
before( () => { | ||
cy.visit( | ||
'wp-admin/?page=nfd-onboarding#/sitegen/step/welcome' | ||
); | ||
} ); | ||
|
||
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('11.1111%'); | ||
}); | ||
|
||
it( 'Check for back button and go back', () => { | ||
BackButtonCheck('sitegen/step/welcome'); | ||
} ); | ||
|
||
it( 'Check for the animation', () => { | ||
cy.get( '.nfd-onboarding-step--site-gen__welcome__container__animation' ) | ||
.should('be.visible'); | ||
} ); | ||
|
||
it( 'Check for the heading title', () => { | ||
cy.get( '.nfd-onboarding-step--site-gen__welcome__container__heading__text' ) | ||
.should('be.visible') | ||
.contains('WordPress'); | ||
} ); | ||
|
||
it( 'Check for the subheading title', () => { | ||
cy.get('.nfd-onboarding-step--site-gen__welcome__container__sub-heading') | ||
.should('exist'); | ||
cy.get( '.nfd-onboarding-step--site-gen__welcome__container__sub-heading__text' ) | ||
.should('be.visible') | ||
.contains('AI'); | ||
} ); | ||
|
||
it( 'Check the Get Started button', () => { | ||
cy.get( '.nfd-onboarding-button--site-gen-next' ) | ||
.should('be.visible') | ||
.should('have.text','Get Started') | ||
.click(); | ||
cy.wait(2000); | ||
cy.url().should('not.contain', 'sitegen/step/welcome'); | ||
} ); | ||
}); |