Merge remote-tracking branch 'origin/feature/INSR-2126' into sshaik/develop
This commit is contained in:
commit
08704dfc7e
2 changed files with 1 additions and 10 deletions
|
|
@ -116,17 +116,13 @@ export class BasePage {
|
|||
}
|
||||
|
||||
async validateURL(issPageValue: string) {
|
||||
console.log(`Checking for page value: ${issPageValue}`);
|
||||
let pass = false;
|
||||
let currentUrl = this.page.url();
|
||||
console.log(`Current URL: ${currentUrl}`);
|
||||
pass = currentUrl.includes(issPageValue);
|
||||
const isBailout = currentUrl.includes('bailout-page');
|
||||
if(!pass && !isBailout) {
|
||||
console.log('Waiting for URL to change');
|
||||
await this.waitForURLToChange(currentUrl);
|
||||
currentUrl = this.page.url();
|
||||
console.log(`New URL: ${currentUrl}`);
|
||||
}
|
||||
expect(currentUrl).toContain(issPageValue);
|
||||
}
|
||||
|
|
@ -135,6 +131,6 @@ export class BasePage {
|
|||
await expect(async () => {
|
||||
const currentUrl = this.page.url();
|
||||
expect(currentUrl).not.toEqual(startingUrl);
|
||||
}).toPass({ timeout: 180_000 });
|
||||
}).toPass({ timeout: 60_000 });
|
||||
}
|
||||
}
|
||||
|
|
@ -113,11 +113,8 @@ export class OrderConfirmationPage extends BasePage {
|
|||
}
|
||||
|
||||
async validateURL() {
|
||||
console.log("Order confirmation validation override")
|
||||
console.log(`Checking for page value: ${this.issPageValue}`);
|
||||
let pass = false;
|
||||
let currentUrl = this.page.url();
|
||||
console.log(`Current URL: ${currentUrl}`);
|
||||
pass = currentUrl.includes(this.issPageValue);
|
||||
while(!pass && currentUrl.includes('payment')) {
|
||||
await this.waitForURLToChange(currentUrl);
|
||||
|
|
@ -126,10 +123,8 @@ export class OrderConfirmationPage extends BasePage {
|
|||
}
|
||||
const isBailout = currentUrl.includes('bailout-page');
|
||||
if(!pass && !isBailout) {
|
||||
console.log('Waiting for URL to change');
|
||||
await this.waitForURLToChange(currentUrl);
|
||||
currentUrl = this.page.url();
|
||||
console.log(`New URL: ${currentUrl}`);
|
||||
}
|
||||
expect(currentUrl).toContain(this.issPageValue);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue