End-to-end user journey test complete

This commit is contained in:
Kira 2023-09-15 15:17:15 -07:00
parent 743c57f13b
commit d6c643a39b
2 changed files with 6 additions and 2 deletions

View File

@ -62,7 +62,6 @@ export class PaymentPage {
}
fillPaymentDetails = async (paymentDetails) => {
await this.cardOwner.waitFor()
await this.cardOwner.fill(paymentDetails.owner)
await this.cardNumber.waitFor()
@ -71,7 +70,11 @@ export class PaymentPage {
await this.cardDate.fill(paymentDetails.date)
await this.cardCVC.waitFor()
await this.cardCVC.fill(paymentDetails.cvc)
}
completePayment = async () => {
await this.payButton.waitFor()
await this.payButton.click()
await this.page.waitForURL(/\/thank-you/, {timeout: 3000})
}
}

View File

@ -56,6 +56,7 @@ test.only("New user full end-to-end test journey", async ({page}) => {
await paymentPage.activateDiscount()
await paymentPage.fillPaymentDetails(paymentDetails)
await paymentPage.completePayment()
// Hold