Skip to content

Commit

Permalink
Merge pull request #482 from newfold-labs/fix/existing-failing-tests
Browse files Browse the repository at this point in the history
fix existing failing cypress tests
  • Loading branch information
avneet-raj authored Feb 26, 2024
2 parents 516c9c7 + 9d49653 commit 2f54a51
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tests/cypress/integration/1-Initial-steps/branding.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { GetPluginId, GetPluginName } from '../wp-module-support/pluginID.cy';

describe( 'Branding', function () {
before( () => {
cy.visit( 'wp-admin/index.php?page=nfd-onboarding' );
cy.visit( 'wp-admin/index.php?page=nfd-onboarding#/wp-setup/step/get-started/welcome' );
} );

// since we are setting brand from plugin container, it will not be set to "newfold"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ describe( 'Basic Info Page', function () {
);
}
else{
cy.get( '.Tooltip-Wrapper', { timeout: 3000 } ).should( 'exist' );
cy.get( '.Tooltip-Tip', { timeout: 3000 } )
.should( 'be.visible' );
cy.get( '.Tooltip-Tip', { timeout: 3000 } ).should( 'be.visible' );
cy.get( '.navigation-buttons_next' ).click();
cy.get( '.components-modal__content' ).should( 'be.visible' );
};

cy.get( '.components-modal__header button' , { timeout: customCommandTimeout } ).click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ describe( 'Get Started Welcome Page', function () {
GetPluginName();
} );

it( 'Check navigation back is not visible', () => {
cy.get( '.navigation-buttons_back' ).should( 'not.exist' );
it( 'Check navigation back is visible', () => {
cy.get( '.navigation-buttons_back' ).should('exist');
} );

it( 'Check if next step loads on clicking navigation next', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ describe( 'Get Started Welcome Page', function () {
GetPluginName();
} );

it( 'Check navigation back is not visible', () => {
cy.get( '.navigation-buttons_back' ).should( 'not.exist' );
it( 'Check navigation back is visible', () => {
cy.get( '.navigation-buttons_back' ).should( 'exist' );
} );

it( 'Check if next step loads on clicking navigation next', () => {
Expand Down
2 changes: 2 additions & 0 deletions tests/cypress/integration/4-design-steps/colors-step.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import {

describe( 'Colors Step Test', function () {
before( () => {
cy.exec('npx wp-env run cli wp theme activate yith-wonder');
cy.wait(5000);
cy.visit(
'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/colors'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ import { AdminBarCheck, DarkBGCheck, LightBGCheck, OptionsDetails } from "../wp-

describe( 'SiteGen Fork Step', function () {
before( () => {
cy.exec(`npx wp-env run cli wp option set _transient_nfd_site_capabilities '{"hasAISitegGen": true, "canAccessAI": true}' --format=json`);
cy.exec(`npx wp-env run cli wp option set _transient_timeout_nfd_site_capabilities 4102444800`);
cy.wait(10000);
cy.visit(
'wp-admin/?page=nfd-onboarding#/wp-setup/step/fork'
);
cy.wait(5000);
} );

it( 'Check for the header admin bar', () => {
Expand Down

0 comments on commit 2f54a51

Please sign in to comment.