fix: tolerate wrongly-typed annotations (#29162)
Fixes https://github.com/microsoft/playwright/issues/29149
This commit is contained in:
parent
f7fb1e4d4e
commit
b5e175e6e2
|
|
@ -4,7 +4,7 @@
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"skipLibCheck": false,
|
"skipLibCheck": true,
|
||||||
"esModuleInterop": false,
|
"esModuleInterop": false,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,8 @@ class HtmlBuilder {
|
||||||
botName,
|
botName,
|
||||||
location,
|
location,
|
||||||
duration,
|
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(),
|
outcome: test.outcome(),
|
||||||
path,
|
path,
|
||||||
results,
|
results,
|
||||||
|
|
@ -374,7 +375,8 @@ class HtmlBuilder {
|
||||||
botName,
|
botName,
|
||||||
location,
|
location,
|
||||||
duration,
|
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(),
|
outcome: test.outcome(),
|
||||||
path,
|
path,
|
||||||
ok: test.outcome() === 'expected' || test.outcome() === 'flaky',
|
ok: test.outcome() === 'expected' || test.outcome() === 'flaky',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue