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]: Console logs mixing up with reports output #33862

Closed
tasawar-hussain opened this issue Dec 4, 2024 · 2 comments
Closed

[Bug]: Console logs mixing up with reports output #33862

tasawar-hussain opened this issue Dec 4, 2024 · 2 comments

Comments

@tasawar-hussain
Copy link
Contributor

tasawar-hussain commented Dec 4, 2024

Version

1.49.0

Steps to reproduce

I am printing the accessibility test errors using console.log to the console. But those console statements get mixed with the reporter's output. I don't want to use assertions for accessibility checks.

Expected behavior

I am expecting something like

2 ✓ handle long test names (515ms)
3 x 1) render expected (691ms)
4 ✓ should timeout (932ms)
5 should repeat each:
6 ✓ should respect enclosing .gitignore (569ms)

Actual behavior

But it's like

Target #6:
Failure Summary: Fix any of the following:
✓ 18 [chromium] › ✓ handle long test names (515ms)
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
HTML:

Target #7:
Failure Summary: Fix any of the following:
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
HTML:


✓ 19 should timeout (932ms)
x 17 x 1) render expected (691ms)
Failure Summary: Fix any of the following:
Element does not have text that is visible to screen readers
aria-label attribute does not exist or is empty
aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
Element has no title attribute
HTML:

Additional context

Is there a way, I can create some global variables and store all the accessibility check info there and print when all the tests are executed..

Environment

Dcoker

System:
    OS: Linux 6.6 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (4) arm64 unknown
    Memory: 10.50 GB / 13.39 GB
    Container: Yes
  Binaries:
    Node: 20.18.1 - /usr/local/bin/node
    Yarn: 4.5.1 - /usr/local/bin/yarn
    npm: 10.8.2 - /usr/local/bin/npm
  Languages:
    Bash: 5.2.15 - /usr/bin/bash
  npmPackages:
    @playwright/test: ^1.49.0 => 1.49.0
@Skn0tt
Copy link
Member

Skn0tt commented Dec 4, 2024

I think you're looking for attachments: https://playwright.dev/docs/api/class-testinfo#test-info-attachments
They will be shown in the HTML reporter and traces.

@Skn0tt Skn0tt closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
@tasawar-hussain
Copy link
Contributor Author

no i am just talking about the console outputs in ci cd and normal machines, the console outputs should not mixup, when using multiple workers

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