fix(trace): merge step hierarchies (#22916)

This commit is contained in:
Pavel Feldman 2023-05-09 14:50:28 -07:00 committed by GitHub
parent 7c76258972
commit 0bf297f523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 5 deletions

View File

@ -122,6 +122,8 @@ function mergeActions(contexts: ContextEntry[]) {
existing.error = action.error;
if (action.attachments)
existing.attachments = action.attachments;
if (action.parentId)
existing.parentId = action.parentId;
continue;
}
map.set(key, action);

View File

@ -104,7 +104,6 @@ test('should update trace live', async ({ runUITest, server }) => {
await expect(listItem).toHaveText([
/Before Hooks[\d.]+m?s/,
/browserContext.newPage[\d.]+m?s/,
/page.gotohttp:\/\/localhost:\d+\/one.html/,
/page.gotohttp:\/\/localhost:\d+\/two.html/,
/After Hooks[\d.]+m?s/,

View File

@ -39,7 +39,6 @@ test('should merge trace events', async ({ runUITest, server }) => {
'action list'
).toHaveText([
/Before Hooks[\d.]+m?s/,
/browserContext.newPage[\d.]+m?s/,
/page.setContent[\d.]+m?s/,
/expect.toBe[\d.]+m?s/,
/locator.clickgetByRole\('button'\)[\d.]+m?s/,
@ -70,7 +69,6 @@ test('should merge web assertion events', async ({ runUITest }, testInfo) => {
'action list'
).toHaveText([
/Before Hooks[\d.]+m?s/,
/browserContext.newPage[\d.]+m?s/,
/page.setContent[\d.]+m?s/,
/expect.toBeVisiblelocator\('button'\)[\d.]+m?s/,
/After Hooks[\d.]+m?s/,
@ -100,7 +98,6 @@ test('should merge screenshot assertions', async ({ runUITest }, testInfo) => {
'action list'
).toHaveText([
/Before Hooks[\d.]+m?s/,
/browserContext.newPage[\d.]+m?s/,
/page\.setContent[\d.]+m?s/,
/expect\.toHaveScreenshot[\d.]+m?s/,
/After Hooks/,
@ -146,7 +143,6 @@ test('should show snapshots for sync assertions', async ({ runUITest, server })
'action list'
).toHaveText([
/Before Hooks[\d.]+m?s/,
/browserContext\.newPage[\d.]+m?s/,
/page\.setContent[\d.]+m?s/,
/locator\.clickgetByRole\('button'\)[\d.]+m?s/,
/expect\.toBe[\d.]+m?s/,