From 6845ae2979747458702606b582f9df400013197a Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:52:38 -0500 Subject: [PATCH] Fix disable check in Maps new home integ tests (#1708) (#1714) Signed-off-by: Andy Qin (cherry picked from commit cc59edeb30d9b9b524e202ae6318045c2bfae97f) Co-authored-by: Andy --- .../custom-import-map-dashboards/7_enable_new_home_ui.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/plugins/custom-import-map-dashboards/7_enable_new_home_ui.spec.js b/cypress/integration/plugins/custom-import-map-dashboards/7_enable_new_home_ui.spec.js index 75015bbdd..1cfa50e9b 100644 --- a/cypress/integration/plugins/custom-import-map-dashboards/7_enable_new_home_ui.spec.js +++ b/cypress/integration/plugins/custom-import-map-dashboards/7_enable_new_home_ui.spec.js @@ -21,7 +21,7 @@ describe('Add flights dataset saved object', function () { cy.get( '[data-test-subj="advancedSetting-editField-home:useNewHomePage"]' ).then(($switch) => { - if ($switch.attr('disabled') === 'disabled') { + if ($switch.prop('disabled')) { cy.log('Switch is disabled and cannot be changed.'); this.skip(); // Skip all tests in this suite } else if ($switch.attr('aria-checked') === 'false') { @@ -43,7 +43,7 @@ describe('Add flights dataset saved object', function () { cy.get( '[data-test-subj="advancedSetting-editField-home:useNewHomePage"]' ).then(($switch) => { - if ($switch.attr('disabled') === 'disabled') { + if ($switch.prop('disabled')) { cy.log('Switch is disabled and cannot be changed.'); } else if ($switch.attr('aria-checked') === 'true') { cy.wrap($switch).click();