diff --git a/tests/search/e2e/integration/features/woocommerce.spec.js b/tests/search/e2e/integration/features/woocommerce.spec.js index ee0c65f288c..0bbd64e79db 100644 --- a/tests/search/e2e/integration/features/woocommerce.spec.js +++ b/tests/search/e2e/integration/features/woocommerce.spec.js @@ -92,7 +92,6 @@ describe('WooCommerce Feature', { tags: '@slow' }, () => { cy.get('#billing-address_1').type(userData.address); cy.get('#billing-city').type(userData.city); cy.get('#billing-postcode').type(userData.postCode); - cy.get('#billing-phone').type(userData.phoneNumber); cy.get('button.wc-block-components-checkout-place-order-button').trigger('click'); // VIP: Need to use .trigger('click') because Cypress can't click on the button. // VIP: Give some time for the order to be placed. diff --git a/tests/search/e2e/support/commands.js b/tests/search/e2e/support/commands.js index 94ba01a5b2c..ae7bbaa1e22 100644 --- a/tests/search/e2e/support/commands.js +++ b/tests/search/e2e/support/commands.js @@ -28,16 +28,14 @@ import 'cypress-file-upload'; import './commands/block-editor'; Cypress.Commands.add('login', (username = 'test@test.com', password = 'password') => { - cy.session([username,password], () => { - cy.visit(`/wp-admin`); - cy.get('body').then(($body) => { - if ($body.find('#wpwrap').length === 0) { - cy.get('input#user_login').clear(); - cy.get('input#user_login').click().type(username); - cy.get('input#user_pass').type(`${password}{enter}`); - } - }); - }) + cy.visit(`/wp-admin`); + cy.get('body').then(($body) => { + if ($body.find('#wpwrap').length === 0) { + cy.get('input#user_login').clear(); + cy.get('input#user_login').click().type(username); + cy.get('input#user_pass').type(`${password}{enter}`); + } + }); }); Cypress.Commands.add('visitAdminPage', (page = 'index.php') => {