[Happy Path] Fix checking application readiness in HappyPath test (#14381)
parent
3cc77bc453
commit
f2ad4fb9da
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue