Fix for flakiness in validation flow

This commit is contained in:
JennyNou 2026-03-24 11:00:11 -04:00
parent e44ca49c8c
commit d232267ba0
2 changed files with 5 additions and 4 deletions

View file

@ -37,8 +37,7 @@ export class AfterpayPage extends BasePage {
async executeAfterpayPayment(paymentDetails: IPaymentDetails, claimDetails: IClaimDetails, servicePackage: ServicePackage) {
await this.login(paymentDetails.password!);
try {
await this.confirmButton.waitFor({ state: 'visible', timeout: 5000 });
try {await this.confirmButton.waitFor({ state: 'visible', timeout: 5000 });
await this.confirmButton.isVisible()
await this.confirmButton.click();
} catch {

View file

@ -57,12 +57,14 @@ export class SchedulePage extends BasePage {
async scheduleInShop(appointmentDetails?: IAppointmentDetails){
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.click();
await (await this.getFirstNonDropOffTimeSlot()).click();
} else if (await this.inShopButton.isHidden()) {
} catch {
await this.inShopButton.isHidden()
await (await this.getFirstNonDropOffTimeSlot()).click();
}
} else if (appointmentDetails?.serviceLocation === ServiceLocation.DropOff) {
if (await this.inShopButton.isVisible()){
await this.inShopButton.waitFor({ state: 'visible', timeout: 5000 });