From ed9d340ac7581a8ca8dcce4ca601a0d37027d0c1 Mon Sep 17 00:00:00 2001 From: sangeetha-nayak Date: Mon, 6 May 2024 15:05:00 +0530 Subject: [PATCH 1/3] fixed tests and linting --- .../sitetype-secondary.cy.js | 57 +++++++++++-------- .../sitetype-secondary.cy.js | 39 +++++++------ .../4-design-steps/colors-step.cy.js | 16 +++--- .../4-design-steps/header-menu.cy.js | 10 ++-- .../4-design-steps/homepage-styles.cy.js | 21 +++---- .../4-design-steps/site-pages.cy.js | 27 ++++----- .../4-design-steps/theme-styles-menu.cy.js | 26 ++++----- .../4-design-steps/theme-styles-preview.cy.js | 15 +++-- .../4-design-steps/typography-step.cy.js | 9 +-- .../wp-module-support/EventsApi.cy.js | 2 +- .../wp-module-support/sidebar.cy.js | 8 +++ 11 files changed, 123 insertions(+), 107 deletions(-) diff --git a/tests/cypress/integration/2-general-onboarding-flow/sitetype-secondary.cy.js b/tests/cypress/integration/2-general-onboarding-flow/sitetype-secondary.cy.js index e66959fd4..b479df92b 100644 --- a/tests/cypress/integration/2-general-onboarding-flow/sitetype-secondary.cy.js +++ b/tests/cypress/integration/2-general-onboarding-flow/sitetype-secondary.cy.js @@ -27,64 +27,75 @@ describe( 'Get Started Site Type Secondary', function () { CheckCardHeadingSubheading( true ); } ); - if(GetPluginId()=='bluehost'){ + if ( GetPluginId() == 'bluehost' ) { it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { CheckIntroPanel( '__get-started-site-type', 'Site Type' ); CheckIllustrationPanel(); CheckInfoPanel(); CheckHelpPanelLinks(); } ); - } - else{ + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); - } ) - }; + } ); + } - it( 'Check for Event API call being made when different sub-categories are selected', ()=>{ + it( 'Check for Event API call being made when different sub-categories are selected', () => { let SubcategoryCount = 0; let num = 0; const className = '.nfd-card-sec-category'; - cy.get( className ).should( 'be.visible' ); + cy.get( className ).should( 'be.visible', { timeout: 10000 } ); const arr = cy.get( className ); arr.each( () => { cy.get( className ) .eq( SubcategoryCount ) .click() - .then(($element) => { - const dataSlugText = $element.attr('data-slug'); - if(num>=2){ - cy.wait(5000); + .then( ( $element ) => { + const dataSlugText = $element.attr( 'data-slug' ); + if ( num >= 2 ) { + cy.wait( 5000 ); } - EventsAPI('secondary_type', dataSlugText, APIList.events_api_general_onb); - num+=1; - }); + EventsAPI( + 'secondary_type', + dataSlugText, + APIList.events_api_general_onb + ); + num += 1; + } ); SubcategoryCount += 1; } ); } ); - it( 'Check for Event API call when we enter text in input box', ()=>{ + it( 'Check for Event API call when we enter text in input box', () => { cy.get( '.nfd-setup-primary-custom__tellus-input' ) .scrollIntoView() .should( 'be.visible' ) .type( 'Test' ); - EventsAPI('secondary_type', 'Test', APIList.events_api_general_onb); + EventsAPI( 'secondary_type', 'Test', APIList.events_api_general_onb ); } ); it( 'Check different categories exist using `<` and `>`', () => { cy.get( '.nfd-setup-secondary-categories' ).should( 'be.visible' ); - const category_selected = cy.get('.category-scrolling-wrapper__type-text'); + const category_selected = cy.get( + '.category-scrolling-wrapper__type-text' + ); cy.get( '.category-scrolling-wrapper__left-btn' ) .scrollIntoView() - .should('be.visible') + .should( 'be.visible' ) .click(); - cy.get( '.category-scrolling-wrapper__type-text' ).should('not.contain', category_selected); + cy.get( '.category-scrolling-wrapper__type-text' ).should( + 'not.contain', + category_selected + ); cy.reload(); - cy.get('.category-scrolling-wrapper__right-btn-icon') - .should('be.visible') + cy.get( '.category-scrolling-wrapper__right-btn-icon' ) + .should( 'be.visible' ) .click(); - cy.get( '.category-scrolling-wrapper__type-text' ).should('not.contain', category_selected); - }); + cy.get( '.category-scrolling-wrapper__type-text' ).should( + 'not.contain', + category_selected + ); + } ); it( 'Check different subCategories exist and is selectable', () => { let categoryCount = 0; diff --git a/tests/cypress/integration/3-ecommerce-onboarding-flow/sitetype-secondary.cy.js b/tests/cypress/integration/3-ecommerce-onboarding-flow/sitetype-secondary.cy.js index cd474bdd9..0aafa8520 100644 --- a/tests/cypress/integration/3-ecommerce-onboarding-flow/sitetype-secondary.cy.js +++ b/tests/cypress/integration/3-ecommerce-onboarding-flow/sitetype-secondary.cy.js @@ -27,13 +27,13 @@ describe( 'Get Started Site Type Secondary', function () { CheckCardHeadingSubheading( true ); } ); - if(GetPluginId()=='bluehost'){ + if ( GetPluginId() == 'bluehost' ) { it( 'Check if `store` appears in heading', () => { - cy.get('.nfd-step-card-heading') - .should('be.visible') - .contains('store'); + cy.get( '.nfd-step-card-heading' ) + .should( 'be.visible' ) + .contains( 'store' ); } ); - + it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { CheckIntroPanel( '__get-started-site-type', 'Store Type' ); CheckIllustrationPanel(); @@ -48,14 +48,13 @@ describe( 'Get Started Site Type Secondary', function () { 'Business' ); } ); - } - else{ + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); - }; + } - it( 'Check for Event API call being made when different sub-categories are selected', ()=>{ + it( 'Check for Event API call being made when different sub-categories are selected', () => { let SubcategoryCount = 0; let num = 0; const className = '.nfd-card-sec-category'; @@ -65,24 +64,28 @@ describe( 'Get Started Site Type Secondary', function () { cy.get( className ) .eq( SubcategoryCount ) .click() - .then(($element) => { - const dataSlugText = $element.attr('data-slug'); - if(num>=2){ - cy.wait(5000); + .then( ( $element ) => { + const dataSlugText = $element.attr( 'data-slug' ); + if ( num >= 2 ) { + cy.wait( 5000 ); } - EventsAPI('secondary_type', dataSlugText, APIList.events_api_ecomm); - num+=1; - }); + EventsAPI( + 'secondary_type', + dataSlugText, + APIList.events_api_ecomm + ); + num += 1; + } ); SubcategoryCount += 1; } ); } ); - it( 'Check for Event API call when we enter text in input box', ()=>{ + it( 'Check for Event API call when we enter text in input box', () => { cy.get( '.nfd-setup-primary-custom__tellus-input' ) .scrollIntoView() .should( 'be.visible' ) .type( 'Test' ); - EventsAPI('secondary_type', 'Test', APIList.events_api_ecomm); + EventsAPI( 'secondary_type', 'Test', APIList.events_api_ecomm ); } ); it( 'Check different subCategories exist and is selectable', () => { diff --git a/tests/cypress/integration/4-design-steps/colors-step.cy.js b/tests/cypress/integration/4-design-steps/colors-step.cy.js index 96e4b18ee..5a3140531 100644 --- a/tests/cypress/integration/4-design-steps/colors-step.cy.js +++ b/tests/cypress/integration/4-design-steps/colors-step.cy.js @@ -7,16 +7,18 @@ import { CheckIllustrationPanel, CheckInfoPanel, CheckIntroPanel, + continueSetup, } from '../wp-module-support/sidebar.cy'; -describe( 'Colors Step Test', function () { +describe.only( 'Colors Step Test', function () { before( () => { cy.exec('npx wp-env run cli wp theme activate yith-wonder'); - cy.wait(5000); + cy.wait( 5000 ); cy.visit( 'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/colors' ); - cy.wait(6000); + cy.wait( 5000 ); + continueSetup(); } ); it( 'Check Drawer Activity', () => { @@ -28,20 +30,18 @@ describe( 'Colors Step Test', function () { ); } ); - if(GetPluginId()=='bluehost'){ + if ( GetPluginId() == 'bluehost' ) { it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { CheckIntroPanel( '__design-colors', 'Colors' ); CheckIllustrationPanel(); CheckInfoPanel(); CheckHelpPanelLinks(); } ); - } - else{ + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); - }; - + } it( 'Check if Default Color variations exists and are selectable', () => { let previewCount = 0; diff --git a/tests/cypress/integration/4-design-steps/header-menu.cy.js b/tests/cypress/integration/4-design-steps/header-menu.cy.js index 3f6131961..73d6318b0 100644 --- a/tests/cypress/integration/4-design-steps/header-menu.cy.js +++ b/tests/cypress/integration/4-design-steps/header-menu.cy.js @@ -7,6 +7,7 @@ import { CheckIllustrationPanel, CheckInfoPanel, CheckIntroPanel, + continueSetup, } from '../wp-module-support/sidebar.cy'; describe( 'Header menu Page', function () { @@ -15,6 +16,7 @@ describe( 'Header menu Page', function () { 'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/header-menu' ); cy.wait( 10000 ); + continueSetup(); } ); it( 'Check Drawer Activity', () => { @@ -30,20 +32,18 @@ describe( 'Header menu Page', function () { cy.contains( 'button', 'Design' ).should( 'be.visible' ); } ); - if(GetPluginId()=='bluehost'){ + if ( GetPluginId() == 'bluehost' ) { it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { CheckIntroPanel( '__design-header-menu', 'Header & Menu' ); CheckIllustrationPanel(); CheckInfoPanel( 2 ); CheckHelpPanelLinks(); } ); - } - else{ + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); } - it( 'Check to make sure different design is selected', () => { let previewCount = 0; @@ -51,7 +51,7 @@ describe( 'Header menu Page', function () { const arr = cy.get( classname ); arr.each( () => { cy.get( classname ).eq( previewCount ).click(); - cy.wait(3000); + cy.wait( 3000 ); cy.get( classname ) .eq( previewCount ) .find( classname.concat( '__title-bar--selected' ) ) diff --git a/tests/cypress/integration/4-design-steps/homepage-styles.cy.js b/tests/cypress/integration/4-design-steps/homepage-styles.cy.js index 1012a91f0..ff205c228 100644 --- a/tests/cypress/integration/4-design-steps/homepage-styles.cy.js +++ b/tests/cypress/integration/4-design-steps/homepage-styles.cy.js @@ -9,6 +9,7 @@ import { CheckIllustrationPanel, CheckInfoPanel, CheckIntroPanel, + continueSetup, } from '../wp-module-support/sidebar.cy'; describe( 'Homepage Styles Page', function () { @@ -17,6 +18,7 @@ describe( 'Homepage Styles Page', function () { 'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/homepage-menu' ); cy.wait( 15000 ); + continueSetup(); } ); it( 'Check if Header and Subheader shows up', () => { @@ -31,19 +33,18 @@ describe( 'Homepage Styles Page', function () { ); } ); - if(GetPluginId()=='bluehost'){ - it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { - CheckIntroPanel( '__design-homepage', 'Home Page' ); - CheckIllustrationPanel(); - CheckInfoPanel( 2 ); - CheckHelpPanelLinks(); - } ); - } - else{ + if ( GetPluginId() == 'bluehost' ) { + it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { + CheckIntroPanel( '__design-homepage', 'Home Page' ); + CheckIllustrationPanel(); + CheckInfoPanel( 2 ); + CheckHelpPanelLinks(); + } ); + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); - }; + } it( 'Check if Homepage Styles exist and are selectable', () => { let previewCount = 0; diff --git a/tests/cypress/integration/4-design-steps/site-pages.cy.js b/tests/cypress/integration/4-design-steps/site-pages.cy.js index b7e4dec93..abfcffc07 100644 --- a/tests/cypress/integration/4-design-steps/site-pages.cy.js +++ b/tests/cypress/integration/4-design-steps/site-pages.cy.js @@ -8,6 +8,7 @@ import { CheckIllustrationPanel, CheckInfoPanel, CheckIntroPanel, + continueSetup, } from '../wp-module-support/sidebar.cy'; describe( 'Site Pages', function () { @@ -16,6 +17,7 @@ describe( 'Site Pages', function () { 'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/site-pages' ); cy.wait( 10000 ); + continueSetup(); } ); it( 'Check if Header and Subheader shows up', () => { @@ -23,22 +25,17 @@ describe( 'Site Pages', function () { } ); it( 'Check Drawer Activity', () => { - DrawerActivityForMenu( - 'Onboarding', - ':nth-child(6)', - 'Page Layouts' - ); + DrawerActivityForMenu( 'Onboarding', ':nth-child(6)', 'Page Layouts' ); } ); - if(GetPluginId()=='bluehost'){ - it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { - CheckIntroPanel( '__site-pages', 'Pages' ); - CheckIllustrationPanel(); - CheckInfoPanel(); - CheckHelpPanelLinks(); - } ); - } - else{ + if ( GetPluginId() == 'bluehost' ) { + it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { + CheckIntroPanel( '__site-pages', 'Pages' ); + CheckIllustrationPanel(); + CheckInfoPanel(); + CheckHelpPanelLinks(); + } ); + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); @@ -55,7 +52,7 @@ describe( 'Site Pages', function () { .scrollIntoView() .find( '.components-checkbox-control' ) .find( 'label' ) - .click({ force: true }); + .click( { force: true } ); previewCount += 1; } ); } ); diff --git a/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js b/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js index 2949d742c..7ecca2fef 100644 --- a/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js +++ b/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js @@ -8,6 +8,7 @@ import { CheckIllustrationPanel, CheckInfoPanel, CheckIntroPanel, + continueSetup, } from '../wp-module-support/sidebar.cy'; describe( 'Theme Styles Menu', function () { @@ -16,30 +17,25 @@ describe( 'Theme Styles Menu', function () { 'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/theme-styles/menu' ); cy.wait( 5000 ); + continueSetup(); } ); it( 'Check Drawer Activity', () => { - DrawerActivityForMenu( - 'Onboarding', - ':nth-child(1)', - 'Theme Styles' - ); + DrawerActivityForMenu( 'Onboarding', ':nth-child(1)', 'Theme Styles' ); } ); - if(GetPluginId()=='bluehost'){ + if ( GetPluginId() == 'bluehost' ) { it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { - CheckIntroPanel( '__design-theme-styles-menu', 'Theme Styles' ); - CheckIllustrationPanel(); - CheckInfoPanel( 2 ); - CheckHelpPanelLinks(); - } ); - } - else{ + CheckIntroPanel( '__design-theme-styles-menu', 'Theme Styles' ); + CheckIllustrationPanel(); + CheckInfoPanel( 2 ); + CheckHelpPanelLinks(); + } ); + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); - }; - + } it( 'Checks if Heading and Subheading are present', () => { CheckHeadingSubheading(); diff --git a/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js b/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js index fa9242a09..a005ec026 100644 --- a/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js +++ b/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js @@ -6,6 +6,7 @@ import { CheckIllustrationPanel, CheckInfoPanel, CheckIntroPanel, + continueSetup, } from '../wp-module-support/sidebar.cy'; describe( 'Theme Styles Preview', function () { @@ -14,24 +15,23 @@ describe( 'Theme Styles Preview', function () { 'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/theme-styles/preview' ); cy.wait( 10000 ); + continueSetup(); } ); - - if(GetPluginId()=='bluehost'){ + + if ( GetPluginId() == 'bluehost' ) { it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { CheckIntroPanel( '__design-theme-styles-preview', 'Theme Styles' ); CheckIllustrationPanel(); CheckInfoPanel( 2 ); CheckHelpPanelLinks(); } ); - } - else{ + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); } - - it( 'Check if Theme is selected and content is in place', () => { + it( 'Check if Theme is selected and content is in place', () => { cy.get( ':nth-child(1) > .theme-styles-preview__title-bar' ).should( 'be.visible' ); @@ -67,5 +67,4 @@ describe( 'Theme Styles Preview', function () { .scrollIntoView() .should( 'be.visible' ); } ); - -}); +} ); diff --git a/tests/cypress/integration/4-design-steps/typography-step.cy.js b/tests/cypress/integration/4-design-steps/typography-step.cy.js index 7c0a0a267..59ab382e4 100644 --- a/tests/cypress/integration/4-design-steps/typography-step.cy.js +++ b/tests/cypress/integration/4-design-steps/typography-step.cy.js @@ -7,6 +7,7 @@ import { CheckIllustrationPanel, CheckInfoPanel, CheckIntroPanel, + continueSetup, } from '../wp-module-support/sidebar.cy'; describe( 'Typography Step Test', function () { @@ -14,6 +15,7 @@ describe( 'Typography Step Test', function () { cy.visit( 'wp-admin/?page=nfd-onboarding#/wp-setup/step/design/typography' ); + continueSetup(); } ); it( 'Check Drawer Activity', () => { @@ -25,19 +27,18 @@ describe( 'Typography Step Test', function () { ); } ); - if(GetPluginId()=='bluehost'){ + if ( GetPluginId() == 'bluehost' ) { it( 'Check to make sure sidebar opens, content is in place and close sidebar', () => { CheckIntroPanel( '__design-fonts', 'Fonts' ); CheckIllustrationPanel(); CheckInfoPanel(); CheckHelpPanelLinks(); } ); - } - else{ + } else { it( 'Check to make sure Sidebar opens', () => { BasicSidebarCheck(); } ); - }; + } it( 'Check if Default Typography variations exists and are selectable', () => { let previewCount = 0; diff --git a/tests/cypress/integration/wp-module-support/EventsApi.cy.js b/tests/cypress/integration/wp-module-support/EventsApi.cy.js index a9cc22211..11bab3d93 100644 --- a/tests/cypress/integration/wp-module-support/EventsApi.cy.js +++ b/tests/cypress/integration/wp-module-support/EventsApi.cy.js @@ -5,7 +5,7 @@ export const APIList = { export const EventsAPI = ( events_name, card_val, api_name ) => { cy.intercept( api_name ).as( 'events' ); - cy.wait( '@events' ).then( ( requestObject ) => { + cy.wait( '@events', { timeout: 10000 } ).then( ( requestObject ) => { const responseBody = requestObject.request.body; const responseData1 = responseBody[ 0 ].data; if ( events_name == 'experience_level' ) { diff --git a/tests/cypress/integration/wp-module-support/sidebar.cy.js b/tests/cypress/integration/wp-module-support/sidebar.cy.js index 778e8898f..4c6251f36 100644 --- a/tests/cypress/integration/wp-module-support/sidebar.cy.js +++ b/tests/cypress/integration/wp-module-support/sidebar.cy.js @@ -74,3 +74,11 @@ export const BasicSidebarCheck = () => { cy.get('.nfd-onboarding-sidebar-learn-more__menu-button') .click(); } + +export const continueSetup = () => { + cy.then(()=>{ + if (Cypress.$('.components-modal__content').length) { + cy.get('.nfd-onboarding-etw__buttons .components-button.is-secondary').click(); + } + }) +} From 67c0e317fa992f3a7441614b9d9b5e48023739b9 Mon Sep 17 00:00:00 2001 From: sangeetha-nayak Date: Mon, 6 May 2024 15:29:38 +0530 Subject: [PATCH 2/3] remove .only --- tests/cypress/integration/4-design-steps/colors-step.cy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cypress/integration/4-design-steps/colors-step.cy.js b/tests/cypress/integration/4-design-steps/colors-step.cy.js index 5a3140531..5beb106e6 100644 --- a/tests/cypress/integration/4-design-steps/colors-step.cy.js +++ b/tests/cypress/integration/4-design-steps/colors-step.cy.js @@ -10,7 +10,7 @@ import { continueSetup, } from '../wp-module-support/sidebar.cy'; -describe.only( 'Colors Step Test', function () { +describe( 'Colors Step Test', function () { before( () => { cy.exec('npx wp-env run cli wp theme activate yith-wonder'); cy.wait( 5000 ); From 305f732236cbddb4e00bb1bde3a008bff436ec8b Mon Sep 17 00:00:00 2001 From: sangeetha-nayak Date: Mon, 6 May 2024 16:37:23 +0530 Subject: [PATCH 3/3] added timeouts to wait until dom loads --- tests/cypress/integration/4-design-steps/colors-step.cy.js | 4 ++-- tests/cypress/integration/4-design-steps/header-menu.cy.js | 2 +- .../cypress/integration/4-design-steps/homepage-styles.cy.js | 2 +- tests/cypress/integration/4-design-steps/site-pages.cy.js | 2 +- .../integration/4-design-steps/theme-styles-menu.cy.js | 2 +- .../integration/4-design-steps/theme-styles-preview.cy.js | 4 ++-- .../cypress/integration/4-design-steps/typography-step.cy.js | 2 +- tests/cypress/integration/wp-module-support/drawer.cy.js | 4 ++-- tests/cypress/integration/wp-module-support/header.cy.js | 2 +- tests/cypress/integration/wp-module-support/sidebar.cy.js | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/cypress/integration/4-design-steps/colors-step.cy.js b/tests/cypress/integration/4-design-steps/colors-step.cy.js index 5beb106e6..d5b6d75e1 100644 --- a/tests/cypress/integration/4-design-steps/colors-step.cy.js +++ b/tests/cypress/integration/4-design-steps/colors-step.cy.js @@ -49,7 +49,7 @@ describe( 'Colors Step Test', function () { const arr = cy.get( className ); arr.each( () => { - cy.get( className ).eq( previewCount ).click(); + cy.get( className , { timeout:15000 }).eq( previewCount ).click(); cy.get( '.color-palette-selected' ) .scrollIntoView() .should( 'be.visible' ); @@ -59,7 +59,7 @@ describe( 'Colors Step Test', function () { it( 'Check for Custom Colors', () => { // Opens Custom Palette - cy.get( '.custom-palette__top' ).scrollIntoView().click(); + cy.get( '.custom-palette__top' , { timeout:15000 }).scrollIntoView().click(); let previewCount = 0; const className = '.custom-palette__below__row'; diff --git a/tests/cypress/integration/4-design-steps/header-menu.cy.js b/tests/cypress/integration/4-design-steps/header-menu.cy.js index 73d6318b0..d8aa46343 100644 --- a/tests/cypress/integration/4-design-steps/header-menu.cy.js +++ b/tests/cypress/integration/4-design-steps/header-menu.cy.js @@ -29,7 +29,7 @@ describe( 'Header menu Page', function () { } ); it( 'Check to make sure design button is visble', () => { - cy.contains( 'button', 'Design' ).should( 'be.visible' ); + cy.contains( 'button', 'Design' , { timeout:15000 }).should( 'be.visible' ); } ); if ( GetPluginId() == 'bluehost' ) { diff --git a/tests/cypress/integration/4-design-steps/homepage-styles.cy.js b/tests/cypress/integration/4-design-steps/homepage-styles.cy.js index ff205c228..266400566 100644 --- a/tests/cypress/integration/4-design-steps/homepage-styles.cy.js +++ b/tests/cypress/integration/4-design-steps/homepage-styles.cy.js @@ -49,7 +49,7 @@ describe( 'Homepage Styles Page', function () { it( 'Check if Homepage Styles exist and are selectable', () => { let previewCount = 0; const className = '.homepage_preview__list__item'; - const arr = cy.get( className ); + const arr = cy.get( className, { timeout:15000 } ); arr.each( () => { cy.get( className ).eq( previewCount ).click(); diff --git a/tests/cypress/integration/4-design-steps/site-pages.cy.js b/tests/cypress/integration/4-design-steps/site-pages.cy.js index abfcffc07..821c034db 100644 --- a/tests/cypress/integration/4-design-steps/site-pages.cy.js +++ b/tests/cypress/integration/4-design-steps/site-pages.cy.js @@ -44,7 +44,7 @@ describe( 'Site Pages', function () { it( 'Check if Site Pages Templates exist and are selectable', () => { let previewCount = 0; const className = '.site-pages__list__item'; - const arr = cy.get( className ); + const arr = cy.get( className, { timeout:15000 } ); arr.each( () => { cy.get( className ) diff --git a/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js b/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js index 7ecca2fef..964a043d4 100644 --- a/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js +++ b/tests/cypress/integration/4-design-steps/theme-styles-menu.cy.js @@ -44,7 +44,7 @@ describe( 'Theme Styles Menu', function () { it( 'Check if Default Theme variations exists in Menu', () => { let previewCount = 0; const className = '.theme-styles-menu__list__item'; - const arr = cy.get( className ); + const arr = cy.get( className , { timeout : 10000 }); arr.each( () => { cy.get( className.concat( '__title-bar' ) ) diff --git a/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js b/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js index a005ec026..cea3b1835 100644 --- a/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js +++ b/tests/cypress/integration/4-design-steps/theme-styles-preview.cy.js @@ -32,7 +32,7 @@ describe( 'Theme Styles Preview', function () { } it( 'Check if Theme is selected and content is in place', () => { - cy.get( ':nth-child(1) > .theme-styles-preview__title-bar' ).should( + cy.get( ':nth-child(1) > .theme-styles-preview__title-bar' , { timeout : 10000 }).should( 'be.visible' ); } ); @@ -56,7 +56,7 @@ describe( 'Theme Styles Preview', function () { } ); it( 'Check for the selected theme in Drawer', () => { - cy.get( '.nfd-onboarding-drawer__panel-back' ) + cy.get( '.nfd-onboarding-drawer__panel-back', { timeout : 10000 } ) .scrollIntoView() .should( 'be.visible' ) .should( 'have.text', 'Design' ); diff --git a/tests/cypress/integration/4-design-steps/typography-step.cy.js b/tests/cypress/integration/4-design-steps/typography-step.cy.js index 59ab382e4..839fc99fc 100644 --- a/tests/cypress/integration/4-design-steps/typography-step.cy.js +++ b/tests/cypress/integration/4-design-steps/typography-step.cy.js @@ -46,7 +46,7 @@ describe( 'Typography Step Test', function () { const arr = cy.get( className ); arr.each( () => { - cy.get( className ).eq( previewCount ).click(); + cy.get( className , { timeout : 10000 } ).eq( previewCount ).click(); cy.get( '.font-palette-selected' ) .scrollIntoView() .should( 'be.visible' ); diff --git a/tests/cypress/integration/wp-module-support/drawer.cy.js b/tests/cypress/integration/wp-module-support/drawer.cy.js index 200484492..19f9f5c1a 100644 --- a/tests/cypress/integration/wp-module-support/drawer.cy.js +++ b/tests/cypress/integration/wp-module-support/drawer.cy.js @@ -35,7 +35,7 @@ export const DrawerActivityForMenu = ( if ( ! isOpen ) { DrawerOpen(); } - cy.get( '.nfd-onboarding-drawer__panel-inner' ) + cy.get( '.nfd-onboarding-drawer__panel-inner' , { timeout:15000 }) .scrollIntoView() .should( 'be.visible' ); cy.get( '.nfd-onboarding-drawer__panel-back' ) @@ -63,7 +63,7 @@ export const DrawerActivityForSubMenu = ( if ( ! isOpen ) { DrawerOpen(); } - cy.get( '.nfd-onboarding-drawer__panel-inner' ) + cy.get( '.nfd-onboarding-drawer__panel-inner' , { timeout:15000 }) .scrollIntoView() .should( 'be.visible' ); cy.get( '.nfd-onboarding-drawer__panel-back', { diff --git a/tests/cypress/integration/wp-module-support/header.cy.js b/tests/cypress/integration/wp-module-support/header.cy.js index 39a4e915c..7f4c93863 100644 --- a/tests/cypress/integration/wp-module-support/header.cy.js +++ b/tests/cypress/integration/wp-module-support/header.cy.js @@ -11,6 +11,6 @@ export const CheckCardHeadingSubheading = ( question = false ) => { }; export const CheckHeadingSubheading = () => { - cy.get( '.nfd-main-heading__title' ).should( 'be.visible' ); + cy.get( '.nfd-main-heading__title', { timeout:15000 } ).should( 'be.visible' ); cy.get( '.nfd-main-heading__subtitle' ).should( 'be.visible' ); }; diff --git a/tests/cypress/integration/wp-module-support/sidebar.cy.js b/tests/cypress/integration/wp-module-support/sidebar.cy.js index 4c6251f36..a321ae5a2 100644 --- a/tests/cypress/integration/wp-module-support/sidebar.cy.js +++ b/tests/cypress/integration/wp-module-support/sidebar.cy.js @@ -66,7 +66,7 @@ export const CheckHelpPanelLinks = ( }; export const BasicSidebarCheck = () => { - cy.get('.nfd-onboarding-sidebar-learn-more__menu-button') + cy.get('.nfd-onboarding-sidebar-learn-more__menu-button' , { timeout:15000 } ) .should('be.visible') .click(); cy.get('.nfd-onboarding-sidebar-learn-more--help-panel__links', {timeout:15000})