Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
avneet-raj committed Jan 25, 2024
1 parent cc905da commit e463580
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// <reference types="Cypress" />

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');
} );

});
2 changes: 1 addition & 1 deletion tests/cypress/integration/wp-module-support/siteGen.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// <reference types="Cypress" />

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 = () => {
Expand Down

0 comments on commit e463580

Please sign in to comment.