From 656fdae498026aa8c9bf92803f6003f16c40ead6 Mon Sep 17 00:00:00 2001 From: ajayadav09 Date: Thu, 12 Dec 2024 21:51:34 +0530 Subject: [PATCH] updated failing test for wonderHelp As the input is being reset after the search. The cypress test in ecomm module fails as it looks for a persisted value in the input box. This change will fix that. Co-Authored-By: Emanuela Antonina Castorina <434283+kreamweb@users.noreply.github.com> --- .../cypress/integration/Home/migration.cy.js | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/cypress/integration/Home/migration.cy.js b/tests/cypress/integration/Home/migration.cy.js index c15e2277..ddd7e5c0 100644 --- a/tests/cypress/integration/Home/migration.cy.js +++ b/tests/cypress/integration/Home/migration.cy.js @@ -69,12 +69,14 @@ describe( cy.get( '.help-container', { timeout: customCommandTimeout, } ).should( 'be.visible' ); - cy.get( '#search-input-box' ) - .should( 'have.attr', 'value' ) - .then( ( value ) => { - expect( value.toLowerCase() ).to.contain( 'nameserver' ); + cy.get( 'div.helpcenter-question-block' ) + .children() + .last() + .invoke( 'text' ) + .then( ( text ) => { + expect( text.toLowerCase() ).to.contain( 'nameserver' ); } ); - } ); + } ); it( 'Verify when connect domain to site clicked', () => { cy.intercept( APIList.connect_domain ).as( 'events' ); @@ -90,11 +92,14 @@ describe( cy.get( '.help-container', { timeout: customCommandTimeout, } ).should( 'be.visible' ); - cy.get( '#search-input-box' ) - .should( 'have.attr', 'value' ) - .then( ( value ) => { - expect( value.toLowerCase() ).to.contain( 'domain' ); + cy.get( 'div.helpcenter-question-block' ) + .children() + .last() + .invoke( 'text' ) + .then( ( text ) => { + expect( text.toLowerCase() ).to.contain( 'domain' ); } ); + } ); } ); it( 'Verify when continue with store setup clicked', () => {