From f2ad4fb9dafd133085fe593bde4ee109ff512ce6 Mon Sep 17 00:00:00 2001 From: Sergey Skorik Date: Mon, 2 Sep 2019 16:26:34 +0300 Subject: [PATCH] [Happy Path] Fix checking application readiness in HappyPath test (#14381) --- e2e/pageobjects/ide/Ide.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/e2e/pageobjects/ide/Ide.ts b/e2e/pageobjects/ide/Ide.ts index 7a050bde6f..24d13a469c 100644 --- a/e2e/pageobjects/ide/Ide.ts +++ b/e2e/pageobjects/ide/Ide.ts @@ -245,19 +245,17 @@ export class Ide { async waitApllicationIsReady(url: string, timeout: number = TestConstants.TS_SELENIUM_DEFAULT_TIMEOUT) { - let res = await axios.get(url); + await this.driverHelper.getDriver().wait(async () => { try { - res = await axios.get(url); + const res = await axios.get(url); if (res.status === 200) { - console.log('Application is ready for use. App url:'); return true; } } catch (error) { - console.log('Application is not yet ready for use'); + await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING); } - await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING); }, timeout); }