Skip to content

Commit cc59ede

Browse files
authored
Fix disable check in Maps new home integ tests (#1708)
Signed-off-by: Andy Qin <[email protected]>
1 parent 5fd6722 commit cc59ede

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cypress/integration/plugins/custom-import-map-dashboards/7_enable_new_home_ui.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('Add flights dataset saved object', function () {
2121
cy.get(
2222
'[data-test-subj="advancedSetting-editField-home:useNewHomePage"]'
2323
).then(($switch) => {
24-
if ($switch.attr('disabled') === 'disabled') {
24+
if ($switch.prop('disabled')) {
2525
cy.log('Switch is disabled and cannot be changed.');
2626
this.skip(); // Skip all tests in this suite
2727
} else if ($switch.attr('aria-checked') === 'false') {
@@ -43,7 +43,7 @@ describe('Add flights dataset saved object', function () {
4343
cy.get(
4444
'[data-test-subj="advancedSetting-editField-home:useNewHomePage"]'
4545
).then(($switch) => {
46-
if ($switch.attr('disabled') === 'disabled') {
46+
if ($switch.prop('disabled')) {
4747
cy.log('Switch is disabled and cannot be changed.');
4848
} else if ($switch.attr('aria-checked') === 'true') {
4949
cy.wrap($switch).click();

0 commit comments

Comments
 (0)