microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.92k stars 3.67k forks source link

[Regression]: Reporter API: steps after timed-out step are incorrectly located inside after hooks #30075

Open vitalets opened 7 months ago

vitalets commented 7 months ago

Last Good Version

1.41

First Bad Version

1.42

Steps to reproduce

Check-out readme in the repo: https://github.com/vitalets/playwright-issues/tree/reporter-steps-inside-fixture

Expected behavior

I expect all steps to be on the top level of TestResult.steps. E.g. step 2 title path is [ 'step 2' ]

Actual behavior

Step 2 title path is [ 'After Hooks', 'fixture: myFixture', 'step 2' ]

Additional context

No response

Environment

System:
    OS: macOS 13.4.1
    CPU: (8) arm64 Apple M1
    Memory: 472.55 MB / 16.00 GB
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v18.16.0/bin/yarn
    npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
    pnpm: 7.27.1 - ~/Library/pnpm/pnpm
  IDEs:
    VSCode: 1.87.2 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: 1.42.1 => 1.42.1
yury-s commented 7 months ago

Reproduced it with 1.42, works fine in 1.41.2.