Skip to content

Commit dc996d2

Browse files
committed
Try adding flags
1 parent 5147d4d commit dc996d2

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

playwright.config.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@ export default defineConfig({
2222
projects: [
2323
{
2424
name: "chromium",
25-
use: { ...devices["Desktop Chrome"], channel: "chromium" },
25+
use: {
26+
...devices["Desktop Chrome"],
27+
channel: "chromium",
28+
...(process.env.CI
29+
? {
30+
args: ["--use-gl=egl", "--ignore-gpu-blocklist"],
31+
}
32+
: {}),
33+
},
2634
},
2735
],
2836

test/e2e/community-events.spec.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,6 @@ test.beforeEach(async ({ page }) => {
55
})
66

77
test("Zurich meetup link works", async ({ page }) => {
8-
const mapCanvas = page.locator("canvas").first()
9-
await expect(mapCanvas).toBeVisible({ timeout: 10000 })
10-
11-
await expect
12-
.poll(async () => {
13-
const box = await mapCanvas.boundingBox()
14-
return box && box.width > 100 && box.height > 100
15-
})
16-
.toBe(true)
17-
18-
const pastEventsSection = page.getByText("Past events & meetups")
19-
await pastEventsSection.scrollIntoViewIfNeeded()
20-
218
const link = page.getByRole("link", { name: /Zurich/i }).first()
229
await link.scrollIntoViewIfNeeded()
2310

@@ -36,6 +23,17 @@ test("map matches screenshot", async ({ page }) => {
3623
await mapContainer.scrollIntoViewIfNeeded()
3724
await expect(mapContainer).toBeVisible({ timeout: 10000 })
3825
await page.waitForTimeout(1500) // we need to wait until Playwright finishes scrolling...
26+
27+
const mapCanvas = page.locator("canvas").first()
28+
await expect(mapCanvas).toBeVisible({ timeout: 10000 })
29+
30+
await expect
31+
.poll(async () => {
32+
const box = await mapCanvas.boundingBox()
33+
return box && box.width > 100 && box.height > 100
34+
})
35+
.toBe(true)
36+
3937
await expect(mapContainer.locator("canvas").first()).toHaveScreenshot(
4038
"meetups-map.png",
4139
{ timeout: 15_000 },

0 commit comments

Comments
 (0)