Skip to content

Commit bd2bfd8

Browse files
authored
fix: Update samples.spec.ts (#276)
This change updates Playwright tests to ignore the raster fallback console error if it occurs since it doesn't matter at this point; fallback is due to WebGL not being supported on the CI (tests all pass locally).
1 parent edf2f28 commit bd2bfd8

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

e2e/samples.spec.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ sampleFolders.forEach((sampleFolder) => {
9090
// Navigate to the page.
9191
await page.goto(url);
9292

93-
// There must be no console errors.
93+
// There must be no critical console errors.
9494
await errorPromise;
95-
expect(consoleErrors).toHaveLength(0);
95+
const criticalErrors = consoleErrors.filter(error => !error.includes('Falling back to Raster'));
96+
expect(criticalErrors).toHaveLength(0);
9697

9798
// Wait for the page DOM to load; this does NOT include the Google Maps APIs.
9899
await page.waitForLoadState('domcontentloaded');
@@ -103,9 +104,6 @@ sampleFolders.forEach((sampleFolder) => {
103104
// Insert a delay in ms to let the map load.
104105
await new Promise((resolve) => setTimeout(resolve, 1000));
105106

106-
// Yo dawg, I heard you like tests, so I made you a test for testing your tests.
107-
//await expect(page).toHaveTitle('Simple Map'); // Passes on the simple map page, fails on the other as expected.
108-
109107
// Assertions. These must be met or the test will fail.
110108
// The sample must load the Google Maps API.
111109
const hasGoogleMaps = await page.evaluate(() => {
@@ -125,4 +123,4 @@ sampleFolders.forEach((sampleFolder) => {
125123
viteProcess.kill();
126124
}
127125
});
128-
});
126+
});

0 commit comments

Comments
 (0)