playwright/packages/playwright-test
Tomáš Hübelbauer e550df060e
Enhance the forbidOnly mode message to guide the user towards the configuration option (#23146)
Hi, I am putting this PR out as a feeler to see if there's interested in
improving this error message, but the copy is by no means final and I am
open to improvement suggestions.

My intention here is to:
- Explain what a "focused item" is - that we're talking about a test and
it being focused is most likely down it using `only`
  
Are there other types of "items"? Are there other ways to make them
focused other than `only`?

- Explain why we're even in focused mode and how to control it

The default scaffolded Playwright config file includes a forbidMode
expression driven by whether `CI=1` is set.
I ran into this when trying to reproduce a CI issue locally so I had it
set and unknowingly entered focus only mode.
I wasn't aware this mode was a thing because I was using the default
configuration from `npm init` and did not familiarize myself with all
the options in it.

Is there a way to tell if we're in a TypeScript or JavaScript project in
this function? I would use that to display the configuration file name
with the right extension.

---------

Signed-off-by: Tomáš Hübelbauer <tomas@hubelbauer.net>
2023-05-25 13:32:49 -07:00
..
bundles chore: move transform to its own folder (for loader worker) (#23247) 2023-05-23 21:05:33 -07:00
src Enhance the forbidOnly mode message to guide the user towards the configuration option (#23146) 2023-05-25 13:32:49 -07:00
types feat(shard): introduce mode: 'default' (#23023) 2023-05-18 13:07:22 -07:00
.eslintrc.js lint: prevent object string concatenation (#23172) 2023-05-19 15:17:43 -07:00
.npmignore chore: babel, expect, zip bundles (#13588) 2022-04-18 11:31:58 -07:00
cli.js chore: fix playwright-core cli (#23203) 2023-05-22 12:37:08 -07:00
index.d.ts feat: support experimental doc entries (#13446) 2022-04-13 16:13:30 -07:00
index.js chore: have pretty error if CT config has no defineConfig (#21318) 2023-03-02 00:47:05 +01:00
index.mjs chore: introduce defineConfig for easier JS typing (#20061) 2023-01-12 13:12:02 -08:00
jsx-runtime.js chore: allow stub JSX instances in type module (#23211) 2023-05-22 15:34:50 -07:00
jsx-runtime.mjs chore: allow stub JSX instances in type module (#23211) 2023-05-22 15:34:50 -07:00
package.json chore: support esm loader on Node 20 (#23269) 2023-05-24 20:17:44 -07:00
README.md chore: add README's for packages (#9432) 2021-10-11 19:28:10 +02:00
reporter.d.ts chore: move test runner types into the playwright test package (#9472) 2021-10-14 11:55:08 +02:00
reporter.js feat(test-runner): export reporter api as @playwright/test/reporter (#7692) 2021-07-16 21:15:03 -07:00
reporter.mjs feat(test-runner): export reporter api as @playwright/test/reporter (#7692) 2021-07-16 21:15:03 -07:00
ThirdPartyNotices.txt chore: allow ts decorators (#22080) 2023-03-29 20:43:08 -07:00

@playwright/test

This package contains Playwright Test. A test-runner for writing idiomatic and reliable end-to-end tests with Playwright.