Skip to content

[BUG] PW test run button disappears when a conditional exception is thrown in helper code #26609

@pajdekPL

Description

@pajdekPL

Context:

  • Playwright Version: [what Playwright version do you use?]
  • Operating System: Mac
  • Node.js version: v18.16.1
  • Visual Studio Code version: 1.81.1 (Universal)
  • Playwright for VSCode extension version: v1.0.15
  • Browser: All
  • Extra: [any specific details about your environment]

Code Snippet
Here is the repo that you can use to reproduce this bug:
https://github.com/pajdekPL/pw-vcs-potential-bug

Describe the bug

The play test button arrow disappears when I throw an exception in one of my scripts:
image

after commenting those two lines out:

https://github.com/pajdekPL/pw-vcs-potential-bug/blob/2df52bab0786792ad5c32307c0733529c76f0e3b/tests/example.spec.ts#L6
https://github.com/pajdekPL/pw-vcs-potential-bug/blob/2df52bab0786792ad5c32307c0733529c76f0e3b/tests/example.spec.ts#L7

The run button appears again:
image

The test work when executed directly from the console or the test explorer:

image

Add any other details about the problem here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions