Skip to content

Commit

Permalink
Fix disable check in Maps new home integ tests (#1708) (#1714)
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Qin <qinandy@amazon.com>
(cherry picked from commit cc59ede)

Co-authored-by: Andy <andyqin17@gmail.com>
  • Loading branch information
opensearch-trigger-bot[bot] and q-andy authored Feb 12, 2025
1 parent f30518f commit 6845ae2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand All @@ -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();
Expand Down

0 comments on commit 6845ae2

Please sign in to comment.