Fix for flakiness in validation flow
This commit is contained in:
parent
e44ca49c8c
commit
d232267ba0
2 changed files with 5 additions and 4 deletions
|
|
@ -37,8 +37,7 @@ export class AfterpayPage extends BasePage {
|
||||||
async executeAfterpayPayment(paymentDetails: IPaymentDetails, claimDetails: IClaimDetails, servicePackage: ServicePackage) {
|
async executeAfterpayPayment(paymentDetails: IPaymentDetails, claimDetails: IClaimDetails, servicePackage: ServicePackage) {
|
||||||
await this.login(paymentDetails.password!);
|
await this.login(paymentDetails.password!);
|
||||||
|
|
||||||
try {
|
try {await this.confirmButton.waitFor({ state: 'visible', timeout: 5000 });
|
||||||
await this.confirmButton.waitFor({ state: 'visible', timeout: 5000 });
|
|
||||||
await this.confirmButton.isVisible()
|
await this.confirmButton.isVisible()
|
||||||
await this.confirmButton.click();
|
await this.confirmButton.click();
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,14 @@ export class SchedulePage extends BasePage {
|
||||||
async scheduleInShop(appointmentDetails?: IAppointmentDetails){
|
async scheduleInShop(appointmentDetails?: IAppointmentDetails){
|
||||||
|
|
||||||
if (appointmentDetails?.serviceLocation === ServiceLocation.InShop) {
|
if (appointmentDetails?.serviceLocation === ServiceLocation.InShop) {
|
||||||
await this.inShopButton.waitFor({ state: 'visible', timeout: 5000 });
|
try {await this.inShopButton.waitFor({ state: 'visible', timeout: 5000 });
|
||||||
await this.inShopButton.isVisible()
|
await this.inShopButton.isVisible()
|
||||||
await this.inShopButton.click();
|
await this.inShopButton.click();
|
||||||
await (await this.getFirstNonDropOffTimeSlot()).click();
|
await (await this.getFirstNonDropOffTimeSlot()).click();
|
||||||
} else if (await this.inShopButton.isHidden()) {
|
} catch {
|
||||||
|
await this.inShopButton.isHidden()
|
||||||
await (await this.getFirstNonDropOffTimeSlot()).click();
|
await (await this.getFirstNonDropOffTimeSlot()).click();
|
||||||
|
}
|
||||||
} else if (appointmentDetails?.serviceLocation === ServiceLocation.DropOff) {
|
} else if (appointmentDetails?.serviceLocation === ServiceLocation.DropOff) {
|
||||||
if (await this.inShopButton.isVisible()){
|
if (await this.inShopButton.isVisible()){
|
||||||
await this.inShopButton.waitFor({ state: 'visible', timeout: 5000 });
|
await this.inShopButton.waitFor({ state: 'visible', timeout: 5000 });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue