Skip to content

Commit 906db87

Browse files
Copilothasparus
andcommitted
Fix DOM detachment issues in CI tests
Co-authored-by: hasparus <15332326+hasparus@users.noreply.github.com>
1 parent 491106b commit 906db87

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default defineConfig({
1717
screenshot: "only-on-failure",
1818
},
1919

20-
timeout: 60 * 1000,
20+
timeout: 90 * 1000,
2121

2222
projects: [
2323
{

test/e2e/community-events.spec.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ test("event type filters hide cards and lock the last active tag", async ({
152152
})
153153
.first()
154154

155-
await pastEventsSection.scrollIntoViewIfNeeded()
155+
await pastEventsSection.waitFor({ state: "visible" })
156+
await pastEventsSection.scrollIntoViewIfNeeded({ timeout: 10000 })
157+
await page.waitForTimeout(300) // Brief stabilization to prevent DOM detachment
156158

157159
const filterGroup = pastEventsSection.locator("fieldset")
158160

@@ -233,10 +235,10 @@ test("upcoming and past sections only show events on the correct side of now", a
233235
})
234236
.first()
235237

236-
await Promise.all([
237-
upcomingSection.scrollIntoViewIfNeeded(),
238-
pastEventsSection.scrollIntoViewIfNeeded(),
239-
])
238+
// Scroll sections sequentially to avoid DOM detachment issues on CI
239+
await upcomingSection.scrollIntoViewIfNeeded({ timeout: 10000 })
240+
await page.waitForTimeout(200)
241+
await pastEventsSection.scrollIntoViewIfNeeded({ timeout: 10000 })
240242

241243
const now = Date.now()
242244

0 commit comments

Comments
 (0)