# Instructions - Following Playwright test failed. - Explain why, be concise, respect Playwright best practices. - Provide a snippet of code with the fix, if possible. # Test info - Name: src/portal/tests/e2e/booking/booking-create.spec.ts >> creates an active booking for a private customer with no insurance or discount and card payment - Location: src/portal/tests/e2e/booking/booking-create.spec.ts:131:7 # Error details ``` Test timeout of 120000ms exceeded. ``` ``` Error: page.waitForURL: Test timeout of 120000ms exceeded. =========================== logs =========================== waiting for navigation to "**/checkout/success?*lang=en" until "load" navigated to "http://booking-spa-dev:8080/5000500053/checkout/step/create-booking?lang=en" ============================================================ ``` # Page snapshot ```yaml - generic [ref=f1e3]: - generic [ref=f1e7]: - banner [ref=f1e8]: - generic [ref=f1e10]: - img "Logo of Storeroom Innsbruck" [ref=f1e13] - complementary - main [ref=f1e14]: - generic [ref=f1e32]: - heading "Error while creating booking" [level=1] [ref=f1e33] - generic [ref=f1e34]: Something went wrong and booking of Unit VI 7 sqm Unit failed. Please try again or contact support. - button "Restart checkout" [ref=f1e35] [cursor=pointer] - contentinfo [ref=f1e37]: - separator [ref=f1e38] - generic [ref=f1e39]: - link "Imprint" [ref=f1e40] [cursor=pointer]: - /url: https://www.storeroom.com/imprint - generic [ref=f1e41]: • - link "Data privacy" [ref=f1e42] [cursor=pointer]: - /url: https://www.storeroom.com/privacy - generic [ref=f1e43]: • - button "Privacy settings" [ref=f1e44] [cursor=pointer] ``` # Test source ```ts 1 | import { BookingStripePaymentElement } from '@/portal/modules/booking/components/BookingStripePaymentElement'; 2 | import { BookingSuccessView } from '@/portal/modules/booking/views/BookingSuccessView'; 3 | import { BaseView } from '@/shared/base/BaseView'; 4 | import { PaymentMethod } from '@/shared/modules/payment-method/payment-method-types'; 5 | 6 | export class BookingPaymentView extends BaseView { 7 | readonly stripeBody = this.host.getByTitle('Secure payment input frame').frameLocator(':scope').locator('body'); 8 | readonly stripePaymentElement = new BookingStripePaymentElement(this.stripeBody); 9 | readonly stripeFieldError = this.stripeBody.locator('.Error'); 10 | readonly stripeAlertError = this.host.getByTestId('stripe-error'); 11 | readonly payNowButton = this.host.getByTestId('pay-now-button'); 12 | 13 | async fill(paymentMethod: PaymentMethod): Promise { 14 | switch (paymentMethod.kind) { 15 | case 'card': 16 | await this.stripePaymentElement.fillCardInfo(paymentMethod); 17 | break; 18 | case 'sepa': 19 | await this.stripePaymentElement.fillSepaInfo(paymentMethod); 20 | break; 21 | } 22 | } 23 | 24 | async confirm(): Promise { > 25 | await Promise.all([this.host.waitForURL('**/checkout/success?*lang=en'), this.submit()]); | ^ Error: page.waitForURL: Test timeout of 120000ms exceeded. 26 | return new BookingSuccessView(this.host); 27 | } 28 | 29 | async submit(): Promise { 30 | await this.payNowButton.click(); 31 | } 32 | } 33 | ```