diff --git a/packages/playwright-core/src/utils/isomorphic/ariaSnapshot.ts b/packages/playwright-core/src/utils/isomorphic/ariaSnapshot.ts index 165cf1c92a795..7ffe9b4de9f3e 100644 --- a/packages/playwright-core/src/utils/isomorphic/ariaSnapshot.ts +++ b/packages/playwright-core/src/utils/isomorphic/ariaSnapshot.ts @@ -180,8 +180,9 @@ export function parseAriaSnapshot(yaml: YamlLibrary, text: string, options: yaml // - role "name": // - child - const valueIsSequence = value instanceof yaml.YAMLSeq ; + const valueIsSequence = value instanceof yaml.YAMLSeq; if (valueIsSequence) { + container.children.push(childNode); convertSeq(childNode, value as yamlTypes.YAMLSeq); continue; } diff --git a/packages/trace-viewer/src/ui/inspectorTab.tsx b/packages/trace-viewer/src/ui/inspectorTab.tsx index 8656e4a9f8493..b6882a6a042e9 100644 --- a/packages/trace-viewer/src/ui/inspectorTab.tsx +++ b/packages/trace-viewer/src/ui/inspectorTab.tsx @@ -60,6 +60,7 @@ export const InspectorTab: React.FunctionComponent<{
Text
`); + const error = await expect(page.locator('body')).toMatchAriaSnapshot(` + - paragraph: + - button "bogus" + `).catch(e => e); + expect(stripAnsi(error.message)).toContain(` +- - paragraph: +- - button "bogus" ++ - paragraph: Text`); +});