Skip to content

Commit 8296d92

Browse files
committed
Improve tests
1 parent 4374173 commit 8296d92

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/tests/test.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,23 @@ test('has title', async ({ page }) => {
55
await expect(page).toHaveTitle(/yFiles Process Mining Component Examples/)
66
})
77

8+
const ignoredConsoleLogs = [
9+
'[vite]',
10+
'React DevTools',
11+
'running in development mode',
12+
// favicon.ico - we should also check failing network requests
13+
'404',
14+
'Automatic fallback to software WebGL has been deprecated.',
15+
'GL Driver Message'
16+
]
17+
818
test('examples', async ({ page }) => {
19+
page.on('console', msg => {
20+
const text = msg.text()
21+
if (!ignoredConsoleLogs.some(ignored => text.includes(ignored))) {
22+
expect.soft(text, `Unexpected console output`).toBeUndefined()
23+
}
24+
})
925
await page.goto('.')
1026

1127
const gcLocator = page.locator('css=.yfiles-canvascomponent:not(.graph-overview-component)')

0 commit comments

Comments
 (0)