mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	fix(trace): merge step hierarchies (#22916)
This commit is contained in:
		
							parent
							
								
									7c76258972
								
							
						
					
					
						commit
						0bf297f523
					
				@ -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);
 | 
			
		||||
 | 
			
		||||
@ -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/,
 | 
			
		||||
 | 
			
		||||
@ -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/,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user