Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Sep 28, 2023
1 parent d47b179 commit 32b14b3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe( 'Get Started Site Type Primary', function () {
} );

it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => {
CheckIntroPanel( '__get-started-site-secondary', 'Site Type' );
CheckIntroPanel( '__get-started-site-type', 'Site Type' );
CheckIllustrationPanel();
CheckInfoPanel();
CheckHelpPanelLinks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe( 'Get Started Site Type Secondary', function () {
} );

it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => {
CheckIntroPanel( '__get-started-site-secondary', 'Site Type' );
CheckIntroPanel( '__get-started-site-type', 'Site Type' );
CheckIllustrationPanel();
CheckInfoPanel();
CheckHelpPanelLinks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ describe( 'Top Priority Page', function () {
cy.get(
'.components-button.navigation-buttons.navigation-buttons_next.is-primary'
).click();
cy.url().should( 'include', 'step/basic-info', {
cy.url().should( 'include', 'theme-styles/menu', {
timeout: 30000,
} );
cy.wait(5000);
cy.go( 'back' );
cy.get('.navigation-buttons_back').click();
cy.get(
'.nfd-card__body.nfd-selected-card> .nfd-card__body_title'
).contains( $ele );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe( 'Get Started Site Type Primary', function () {
} );

it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => {
CheckIntroPanel( '__get-started-site-secondary', 'Store Type' );
CheckIntroPanel( '__get-started-site-type', 'Store Type' );
CheckIllustrationPanel();
CheckInfoPanel();
CheckHelpPanelLinks();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe( 'Get Started Site Type Secondary', function () {
} );

it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => {
CheckIntroPanel( '__get-started-site-secondary', 'Store Type' );
CheckIntroPanel( '__get-started-site-type', 'Store Type' );
CheckIllustrationPanel();
CheckInfoPanel();
CheckHelpPanelLinks();
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/integration/wp-module-support/header.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// <reference types="Cypress" />

export const CheckCardHeadingSubheading = ( question = false ) => {
cy.get( '.nfd-step-card-heading' ).should( 'be.visible' );
cy.get( '.nfd-step-card-heading' ).scrollIntoView().should( 'be.visible' );
if ( question ) {
cy.get( '.nfd-step-card-subheading-other' ).should( 'be.visible' );
cy.get( '.nfd-step-card-question' ).should( 'be.visible' );
Expand Down
6 changes: 3 additions & 3 deletions tests/cypress/integration/wp-module-support/sidebar.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const CheckIntroPanel = ( sidebarStep, headingText ) => {
cy.get( '.nfd-onboarding-header__end > .components-button' )
.click()
.and( 'have.class', 'is-pressed' );
cy.get( prefixSidebarStep.concat( sidebarStep ) ).should( 'be.visible' );
cy.get( prefixSidebarStep.concat( sidebarStep ) ).scrollIntoView().should( 'be.visible' );
const heading = prefixSidebarStep.concat( '--step-intro-panel__container' );
cy.get( heading.concat( '__icon' ) ).should( 'be.visible' );
cy.get( heading.concat( '__text__heading' ) )
Expand Down Expand Up @@ -47,12 +47,12 @@ export const CheckHelpPanelLinks = (
.scrollIntoView()
.should( 'be.visible' );
if ( blueButton ) {
cy.get( '.nfd-onboarding-button--blue' )
cy.get('.nfd-onboarding-sidebar-learn-more--help-panel__links > .nfd-onboarding-button--background')
.should( 'have.text', '1-1 Expert Solutions & Coaching' )
.should( 'have.attr', 'type' )
.and( 'match', /button/ );
}
cy.get( '.nfd-onboarding-button--white' )
cy.get('.nfd-onboarding-sidebar-learn-more--help-panel__links > .nfd-onboarding-button--white')
.should( 'have.text', whiteButtonText )
.should( 'have.attr', 'type' )
.and( 'match', /button/ );
Expand Down

0 comments on commit 32b14b3

Please sign in to comment.