From e9320aa59bd0cdc21094d203574713635b30089d Mon Sep 17 00:00:00 2001 From: Jacob Peattie Date: Mon, 7 Mar 2022 21:05:12 +1100 Subject: [PATCH] Adjust saving feature test to handle form submission. --- tests/cypress/integration/features/woocommerce.spec.js | 4 +--- tests/cypress/integration/indexables/user.spec.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/cypress/integration/features/woocommerce.spec.js b/tests/cypress/integration/features/woocommerce.spec.js index 4a6b85296d..dcead96e29 100644 --- a/tests/cypress/integration/features/woocommerce.spec.js +++ b/tests/cypress/integration/features/woocommerce.spec.js @@ -18,9 +18,7 @@ describe('WooCommerce Feature', () => { cy.maybeDisableFeature('woocommerce'); cy.visitAdminPage('admin.php?page=elasticpress'); - cy.get('.ep-feature-woocommerce .settings-button').click(); - cy.get('.ep-feature-woocommerce [name="settings[active]"][value="1"]').click(); - cy.get('.ep-feature-woocommerce .button-primary').click(); + cy.get('.ep-feature-woocommerce form').submit(); cy.on('window:confirm', () => { return true; }); diff --git a/tests/cypress/integration/indexables/user.spec.js b/tests/cypress/integration/indexables/user.spec.js index 1e33486084..ed184b9d4e 100644 --- a/tests/cypress/integration/indexables/user.spec.js +++ b/tests/cypress/integration/indexables/user.spec.js @@ -37,9 +37,7 @@ describe('User Indexable', () => { cy.maybeDisableFeature('users'); cy.visitAdminPage('admin.php?page=elasticpress'); - cy.get('.ep-feature-users .settings-button').click(); - cy.get('.ep-feature-users [name="settings[active]"][value="1"]').click(); - cy.get('.ep-feature-users .button-primary').click(); + cy.get('.ep-feature-users form').submit(); cy.on('window:confirm', () => { return true; });