# 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/customer/customer-login.spec.ts >> logs in to customer portal
- Location: src/portal/tests/e2e/customer/customer-login.spec.ts:6:7

# Error details

```
Test timeout of 75000ms exceeded.
```

```
Error: page.waitForURL: Test timeout of 75000ms exceeded.
=========================== logs ===========================
waiting for navigation to "**/customer-portal/account-overview/*" until "load"
  navigated to "http://auth-api-dev:8080/561465857/login"
  navigated to "http://auth-api-dev:8080/561465857/login"
  navigated to "http://auth-api-dev:8080/561465857/login"
============================================================
```

# Page snapshot

```yaml
- generic [ref=e3]:
  - banner [ref=e4]:
    - img "Storeroom" [ref=e8]
  - main [ref=e9]:
    - generic [ref=e11]:
      - heading "Log in" [level=1] [ref=e12]:
        - generic [ref=e13]: Log in
      - generic [ref=e14]:
        - generic [ref=e16]:
          - generic [ref=e17]: Email Address
          - textbox "Email Address" [ref=e19]: max.mustermann@gmail.com
          - paragraph [ref=e20]: These credentials do not match our records.
        - generic [ref=e22]:
          - generic [ref=e23]: Password
          - generic [ref=e24]:
            - textbox "Password" [ref=e25]
            - button [ref=e26] [cursor=pointer]:
              - img [ref=e27]
        - generic [ref=e29]:
          - generic [ref=e31]:
            - checkbox "Remember me" [ref=e32]
            - generic [ref=e33]: Remember me
          - link "Forgot password?" [ref=e35] [cursor=pointer]:
            - /url: http://auth-api-dev:8080/561465857/forgot-password
        - button "Log in" [ref=e37] [cursor=pointer]:
          - generic [ref=e38]: Log in
```

# Test source

```ts
  1  | import { CustomerLoginData } from '@/portal/modules/customer/customer-types';
  2  | import { CustomerAccountView } from '@/portal/modules/customer/views/CustomerAccountView';
  3  | import { BaseView } from '@/shared/base/BaseView';
  4  | 
  5  | export class CustomerLoginView extends BaseView {
  6  |   readonly emailTextField = this.host.locator('input#email');
  7  |   readonly passwordField = this.host.locator('input#password');
  8  |   readonly submitButton = this.host.locator('button[type="submit"]');
  9  | 
  10 |   async login(data: CustomerLoginData): Promise<CustomerAccountView> {
  11 |     await this.fill(data);
> 12 |     await Promise.all([this.host.waitForURL('**/customer-portal/account-overview/*'), this.submit()]);
     |                                  ^ Error: page.waitForURL: Test timeout of 75000ms exceeded.
  13 |     return new CustomerAccountView(this.host);
  14 |   }
  15 | 
  16 |   async fill(data: CustomerLoginData): Promise<void> {
  17 |     await this.emailTextField.fill(data.email);
  18 |     await this.passwordField.fill(data.password);
  19 |   }
  20 | 
  21 |   async submit(): Promise<void> {
  22 |     await this.submitButton.click();
  23 |   }
  24 | }
  25 | 
```