Commit Graph

18 Commits

Author SHA1 Message Date
Pavel Feldman
e065d608b6
chore: introduce defineConfig for easier JS typing (#20061)
Fixes https://github.com/microsoft/playwright/issues/19694
2023-01-12 13:12:02 -08:00
Eduard Bardají Puig
10b8a83b45
docs(parameterize): fix code snippet (#18848) 2022-11-16 11:44:45 -10:00
Pavel Feldman
8810b55504
feat(api): shorted getByLabel, getByPlaceholder (#17816) 2022-10-04 10:29:26 -07:00
Dmitry Gozman
b07690f408
docs: use getBy... in documentation (#17795) 2022-10-03 17:02:46 -07:00
Debbie O'Brien
da1598d45f
docs: Remove tocs (#17133) 2022-09-07 12:30:31 +02:00
Kian-Meng Ang
22f0723c72
docs: fix typos in docs (#16370)
Co-authored-by: Debbie O'Brien <debs-obrien@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-08-09 15:47:17 +02:00
Max Schmitt
ee7d60fcee
docs: migrate page actions to locator actions 2/n (#15603) 2022-07-13 11:50:18 +02:00
Pavel Feldman
76abb3a5be
chore: unify tab generation (#14802) 2022-06-10 17:34:31 -07:00
Pavel Feldman
f724fa570f
docs: make ts snippets esm-friendly (#14451) 2022-05-27 12:36:59 -07:00
Max Schmitt
fc32ec9944
docs: fix wrong nesting level in test-parameterize.md (#12499) 2022-03-04 00:07:59 +01:00
Max Schmitt
c2b6614e41
docs: add CSV guide for the test-runner (#12488) 2022-03-03 18:36:12 +01:00
Dmitry Gozman
26d6537119
docs: document environment variables usage (#12294) 2022-02-22 15:24:35 -08:00
Dmitry Gozman
4a52bc9465
docs: add option fixtures section to release notes (#11794) 2022-02-01 14:34:47 -08:00
Alister Scott
80235c47a5
docs(test-parameterize): fixed typo (#10392) 2021-11-22 20:38:48 +01:00
Dmitry Gozman
d9f849fb14
feat(test runner): replace declare/define with "options" (#10293)
1. Fixtures defined in test.extend() can now have `{ option: true }` configuration that makes them overridable in the config. Options support all other properties of fixtures - value/function, scope, auto.
```
const test = base.extend<MyOptions>({
  foo: ['default', { option: true }],
});
```

2. test.declare() and project.define are removed.

3. project.use applies overrides to default option values and nothing else. Any test.extend() and test.use() calls take priority over config options.

Required user changes: if someone used to define fixture options with test.extend(), overriding them in config will stop working. The solution is to add `{ option: true }`.

```
// Old code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: 123,
  myFixture: ({ myOption }, use) => use(2 * myOption),
});

// New code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: [123, { option: true }],
  myFixture: ({ myOption }, use) => use(2 * myOption),
});
```
2021-11-18 15:45:52 -08:00
Yevhen Laichenkov
724dc2ff2f
docs(test-parameterize): fix snippet typo (#10280) 2021-11-12 07:00:41 -08:00
Max Schmitt
d97fe4e2af
docs(test-parameterize): fixed snippet typo (#10276) 2021-11-12 05:50:45 -08:00
Max Schmitt
97b6a344ac
docs: add docs page for how to parameterize your tests (#9291)
Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
Co-authored-by: Joel Einbinder <joel.einbinder@gmail.com>
2021-10-05 20:22:16 +02:00