From 212a973bcaaa9b70bef9e750b62315544d6d6bb4 Mon Sep 17 00:00:00 2001 From: Bryan Lai Date: Wed, 16 Aug 2023 14:10:39 -0400 Subject: [PATCH] fix chart button disabled error --- .../remote/specs/core/studyview.spec.js | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/end-to-end-test/remote/specs/core/studyview.spec.js b/end-to-end-test/remote/specs/core/studyview.spec.js index ad4aee394f8..687a96951d9 100644 --- a/end-to-end-test/remote/specs/core/studyview.spec.js +++ b/end-to-end-test/remote/specs/core/studyview.spec.js @@ -395,9 +395,13 @@ describe('crc_msk_2017 study tests', () => { $(ADD_CHART_BUTTON).waitForDisplayed({ timeout: WAIT_FOR_VISIBLE_TIMEOUT, }); - $(ADD_CHART_BUTTON).waitForEnabled({ - timeout: WAIT_FOR_VISIBLE_TIMEOUT, - }); + browser.waitUntil( + () => + !$(ADD_CHART_BUTTON) + .getAttribute('class') + .includes('disabled'), + { timeout: WAIT_FOR_VISIBLE_TIMEOUT } + ); setDropdownOpen( true, ADD_CHART_BUTTON, @@ -723,9 +727,13 @@ describe('submit genes to results view query', () => { }); it('generic assay chart should be added in the summary tab', function() { this.retries(0); - $(ADD_CHART_BUTTON).waitForEnabled({ - timeout: 60000, - }); + browser.waitUntil( + () => + !$(ADD_CHART_BUTTON) + .getAttribute('class') + .includes('disabled'), + { timeout: 60000 } + ); $(ADD_CHART_BUTTON).click(); // Change to GENERIC ASSAY tab