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

Adding playground link when a test fails #837

Closed
nofar9792 opened this issue Nov 25, 2020 · 8 comments
Closed

Adding playground link when a test fails #837

nofar9792 opened this issue Nov 25, 2020 · 8 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nofar9792
Copy link

Describe the feature you'd like:

The playground link is really useful.
Each time find/get function fails, it prints a really long HTML.
Maybe you can add the playground link by default, each time

  1. find/get function fails
  2. One of the expect fails. like expect(element).toBeChecked();

Suggested implementation:

  1. Adding the link to getElementError.
  2. I would like to hear what do you think
@kentcdodds
Copy link
Member

I think that's a pretty good idea personally. Maybe it could be disabled globally?

@AlonMiz
Copy link

AlonMiz commented Nov 25, 2020

That sounds like a great idea.

@delca85
Copy link
Member

delca85 commented Nov 25, 2020

It sounds good to me too, it could be very useful but I agree with @kentcdodds that should be disabled globally.

@nickmccurdy nickmccurdy added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Nov 26, 2020
@kentcdodds
Copy link
Member

To be clear, I think it should be enabled by default. Just something you can disable globally.

@kentcdodds
Copy link
Member

Also, to be clear further, anyone can claim this. Feel free to volunteer to implement this :)

@AmirTugi
Copy link

Ooo sounds neat.
I'd definitely wan't this in my pipeline.

Aren't the expects standalone, and don't relate to any testing lib?
How can we put the the link in that case without binding jest-dom to testing-library?

@lidoravitan
Copy link

lidoravitan commented Nov 26, 2020

@kentcdodds @nickmccurdy i'd like to help with it

@kentcdodds
Copy link
Member

Go for it 💯

@nickmccurdy nickmccurdy removed the help wanted Extra attention is needed label Nov 28, 2020
mathiassoeholm added a commit to mathiassoeholm/dom-testing-library that referenced this issue Dec 19, 2020
mathiassoeholm added a commit to mathiassoeholm/dom-testing-library that referenced this issue Dec 23, 2020
mathiassoeholm added a commit to mathiassoeholm/dom-testing-library that referenced this issue Dec 23, 2020
mathiassoeholm added a commit to mathiassoeholm/dom-testing-library that referenced this issue Jan 4, 2021
mathiassoeholm added a commit to mathiassoeholm/dom-testing-library that referenced this issue Jan 24, 2021
mathiassoeholm added a commit to mathiassoeholm/dom-testing-library that referenced this issue May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

7 participants