fix: tolerate wrongly-typed annotations (#29162)

Fixes https://github.com/microsoft/playwright/issues/29149
This commit is contained in:
Pavel Feldman 2024-01-25 11:35:17 -08:00 committed by GitHub
parent f7fb1e4d4e
commit b5e175e6e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -4,7 +4,7 @@
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable", "ESNext"],
"allowJs": true,
"skipLibCheck": false,
"skipLibCheck": true,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true,

View file

@ -361,7 +361,8 @@ class HtmlBuilder {
botName,
location,
duration,
annotations: test.annotations,
// Annotations can be pushed directly, with a wrong type.
annotations: test.annotations.map(a => ({ type: a.type, description: a.description ? String(a.description) : a.description })),
outcome: test.outcome(),
path,
results,
@ -374,7 +375,8 @@ class HtmlBuilder {
botName,
location,
duration,
annotations: test.annotations,
// Annotations can be pushed directly, with a wrong type.
annotations: test.annotations.map(a => ({ type: a.type, description: a.description ? String(a.description) : a.description })),
outcome: test.outcome(),
path,
ok: test.outcome() === 'expected' || test.outcome() === 'flaky',