Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Playwright UI Mode Closes Without Reporting Test Results #30729

Closed
jwalkerinterpres opened this issue May 9, 2024 · 4 comments
Closed

Comments

@jwalkerinterpres
Copy link

jwalkerinterpres commented May 9, 2024

Version

1.43.0

Steps to reproduce

  1. Run a test inside the "UI Mode" test runner
  2. Test fails
  3. There's no explanation of why: no failure message or any other output whatsoever

Expected behavior

It doesn't matter whether a test passes, fails, or times out: it should always report the results after.

Actual behavior

No results were reported

Screen.Recording.2024-05-09.at.10.54.07.AM.mov

That output at the end was:


    > 325 |   await expect(priorityIcon).toHaveCSS('fill', PRIORITY_ICON_COLORS[i]);
          |                              ^
      326 |
      327 |   // Each tab should have numeric text
      328 |   await expectToHaveNumericText(tab);

        at expectValidAssociatedThreatElementTab (/Users/jeremywalker/new-ui/interpres-new-ui/e2e/src/dataList/dataListExpectations.ts:325:30)

    Error: Test ended.

    Error: ENOENT: no such file or directory, open '/Users/jeremywalker/new-ui/interpres-new-ui/e2e/test-results/.playwright-artifacts-0/58ba7d6422ad39b41530945866d86262.zip'

  1 failed
    [chromium] › campaign.spec.ts:153:7 › A campaign with a reference › should display properly 

It seems likely this line is responsible:

Error: ENOENT: no such file or directory, open '/Users/jeremywalker/new-ui/interpres-new-ui/e2e/test-results/.playwright-artifacts-0/58ba7d6422ad39b41530945866d86262.zip'

Additional context

I tried changing the test (eg. to a simple throw new Error()); didn't help.

I tried removing my test-results folder, in case old/garbage results were to blame; didn't help

I tried removing node_modules and reinstalling all my packages; didn't help.

Also, as a side note, this is probably a continuation of #29426

Environment

System:
    OS: macOS 14.4.1
    Memory: 2.36 GB / 32.00 GB
  Binaries:
    Node: 21.2.0 - /usr/local/bin/node
    Yarn: 1.22.21 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    playwright: ^1.44.0 => 1.44.0
@jwalkerinterpres
Copy link
Author

If it helps, I think the problem was an unterminated and un-awaited expect statement, something to the effect of:

expect(foo);

@yury-s
Copy link
Member

yury-s commented May 10, 2024

Please try with Playwright 1.44 and if it still reproduces please share a reproduction example.

@yury-s
Copy link
Member

yury-s commented May 14, 2024

We need more information to act on this report. Please file a new one and link to this issue when you get back to it!

@yury-s yury-s closed this as completed May 14, 2024
@jwalkerinterpres
Copy link
Author

jwalkerinterpres commented May 14, 2024

The problem is, if I give you more info, you won't fix this problem: you'll fix the problem I give you info for. This happened already once before in #29426 (and I didn't even provide info for a specific issue there).

To put it generally, my goal for this ticket was to have you add a try/catch, not prevent a specific exception from being thrown.

If we can both agree the test runner should never finish without output, then can't one at least look at how the test runner is completing without output, without needing any specific cases?

P.S. But, for the record, in this specific case I believe the problem was an unfinished expect, ie. expect(foo) with no .anything() after. I'd be happy to make up a dummy case with such an expect if that's helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants