Skip to content

Commit b613838

Browse files
fix(e2e): resolve parallel test race condition in issues-crud
The "should display assignee on issue detail page" test was failing when run with multiple workers because all browsers competed for the same seeded issue (HD-02). Solution: Create a fresh issue in beforeEach following the established pattern from "Issue Detail and Updates" test block. Fixes: PinPoint-6c9 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f34fa4b commit b613838

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

e2e/smoke/issues-crud.spec.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,31 @@ test.describe("Issues System", () => {
181181
});
182182

183183
test.describe("Issue Detail Display", () => {
184+
let issueUrl: string;
185+
let issueTitle: string;
186+
187+
test.beforeEach(async ({ page }) => {
188+
// Create a fresh issue for this worker to avoid parallel test conflicts
189+
const machineInitials = seededMachines.humptyDumpty.initials;
190+
issueTitle = `Assignee Test ${Date.now()}`;
191+
await page.goto(`/report?machine=${machineInitials}`);
192+
await fillReportForm(page, { title: issueTitle, priority: "medium" });
193+
await page.getByRole("button", { name: "Submit Issue Report" }).click();
194+
195+
await expect(page).toHaveURL(/\/m\/[A-Z0-9]{2,6}\/i\/[0-9]+/);
196+
issueUrl = page.url();
197+
rememberIssueId(page);
198+
});
199+
184200
test("should display assignee on issue detail page", async ({ page }) => {
185-
// Navigate to HD-02 (reported by member, so member has permission)
186-
await page.goto("/m/HD/i/2");
201+
// Navigate to the freshly created issue
202+
await page.goto(issueUrl);
187203

188204
// Verify we're on the issue detail page
189205
await expect(
190206
page.getByRole("heading", {
191207
level: 1,
192-
name: /Scoring reels sticking/,
208+
name: new RegExp(issueTitle),
193209
})
194210
).toBeVisible();
195211

0 commit comments

Comments
 (0)