fix(tests/frontend): resolve flaky test due to duplicate heading elements on marketplace page (#11369)

This PR fixes a flaky test issue in the signup flow where Playwright's
strict mode was failing due to duplicate heading elements on the
marketplace page.

### Problem
The test was failing intermittently with the following error:

```
Error: strict mode violation: getByText('Bringing you AI agents designed by thinkers from around the world') resolved to 2 elements
```

This occurred because the marketplace page contains two identical `<h3>`
elements with the same text, causing Playwright's strict mode to throw
an error when trying to select a single element.


### Checklist 📋

#### For code changes:
- [x] I have clearly listed my changes in the PR description
- [x] I have made a test plan
- [x] I have tested my changes according to the test plan:
  - [x] Run E2E tests locally multiple times to ensure no flakiness
  - [x] Check CI pipeline runs successfully
This commit is contained in:
Abhimanyu Yadav
2025-11-13 14:41:55 +05:30
committed by GitHub
parent 32bb6705d1
commit be01a1316a

View File

@@ -67,6 +67,7 @@ export async function signupTestUser(
.getByText(
"Bringing you AI agents designed by thinkers from around the world",
)
.first()
.waitFor({ state: "visible", timeout: 10000 });
// Verify user is authenticated (profile menu visible)