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

[Feature] Add test.todo() #10918

Closed
mxschmitt opened this issue Dec 14, 2021 · 8 comments
Closed

[Feature] Add test.todo() #10918

mxschmitt opened this issue Dec 14, 2021 · 8 comments
Labels
feature-test-runner Playwright test specific issues P3-collecting-feedback

Comments

@mxschmitt
Copy link
Member

mxschmitt commented Dec 14, 2021

Discussed in https://github.com/microsoft/playwright/discussions/10914

Originally posted by zomars December 14, 2021
This is pretty helpful for planning future tests and keep track of them.

Jest has it: https://jestjs.io/docs/api#testtodoname

@pavelfeldman
Copy link
Member

We call it test.fixme!

@zomars
Copy link

zomars commented Dec 15, 2021

We call it test.fixme!

I think they should be semantically different IMO.

@unlikelyzero
Copy link
Contributor

unlikelyzero commented Jul 18, 2022

I had a definite need for this when migrating a 5 year old angular app from nightwatch.js to Cypress.io. We almost went with jest-puppeteer over Cypress at the time specifically for this feature.

We needed to keep track of all of the tests which would exist if the app functionality existed separate from the tests which were broken.

Today, this would drastically improve our ability to manage test stubs for a 5 year old angular app which has just completed it's move to vue2.

nasa/openmct#4303

test.fixme() will work for us, but todo() would make it clearer what the open source testing community could contribute vs what has been broken

@orenmizr
Copy link

i really hoped this would be available in 2022. for semantics 👀
fixme says it's broken, we know, no time at this moment to fix the broken test.
todo says, there is nothing here yet. but we do need this test in the near future.

@pavelfeldman
Copy link
Member

If you are looking for the parity with Jest, please use test.fixme and think of it as of test.todo. It has exact same semantics, but is slightly more flexible in that it allows putting some draft code into the test.

@zomars
Copy link

zomars commented Oct 7, 2022

How does it has the same semantics? It clearly doesn't. Just declare that is out of scope and be done with it. But don't ignore the main reason this issue got made in the first place.

@orenmizr
Copy link

orenmizr commented Oct 7, 2022

true. i can understand if it is a very low priority and i respect that completely. but it is not the same semantics. it is like saying that skip and fixme can by used for "skipping" broken tests.

@beorn
Copy link

beorn commented Jan 4, 2024

A few reasons why .todo would be preferable as a way to use tests-as-documentation / specification:

  1. test.todo doesn't require a code callback, but test.fixme does, which is annoying and adds clutter.
  2. test.todo has different semantics than test.fixme.
  3. test.todo is supported in other test systems, so it'll be easier to switch over to playwright from those systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-test-runner Playwright test specific issues P3-collecting-feedback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants