Commit Graph

2079 Commits

Author SHA1 Message Date
Tom Sparrow
90e3194482
docs(debug.md): clarify what slowMo number means (#18788) 2022-11-29 12:54:18 -08:00
Devin Beliveau
707cb1a0d5
docs: correct CircleCI brand name (#18988) 2022-11-29 12:52:07 -08:00
Shubham Kanodia
3d804ff7cd
chore: rewrite error message for missing snapshot (#19104) 2022-11-29 12:51:15 -08:00
Brian Zelip
7a68e79b7f
docs(js): add step to the cli install command overview (#19089) 2022-11-28 20:02:55 -08:00
Simon Legner
43cde2db10
docs(locator): fix #locate-by-test-id link (#19095) 2022-11-28 20:00:30 -08:00
Dmitry Gozman
65b0fb055d
docs: note assertion methods that only work with playwright test runner (#19116)
Fixes #18963.
2022-11-28 10:32:48 -08:00
Dmitry Gozman
bd07a63683
docs: highlight printsToStdio in reporter reference (#19118)
Fixes #18945.
2022-11-28 10:32:01 -08:00
Simon Legner
9e91ca353c
docs(release-notes): YouTube video for version 1.28 (#19099) 2022-11-27 22:51:03 -10:00
Pavel Feldman
be2139f0ac
docs: split assertions list into langs (#19039) 2022-11-24 08:25:24 -08:00
Max Schmitt
30debb5110
docs(python): expand assertion List types (#18975)
The following was before:

```txt
typing.Union[
    typing.List[typing.Union[typing.Pattern[str], str]],
    typing.Pattern[str],
    str,
]
```

but it should be:

```txt
typing.Union[
    typing.List[typing.Pattern[str]],
    typing.List[str],
    typing.List[typing.Union[typing.Pattern[str], str]],
    typing.Pattern[str],
    str,
]
```

Otherwise mypy yells at us.

See https://github.com/microsoft/playwright-python/issues/1524
2022-11-23 11:32:16 -10:00
Pavel Feldman
f9a32e0927
chore: follow up to deprecation changes (#19025) 2022-11-23 12:32:14 -08:00
Pavel Feldman
f97dcd4c79
docs: annotate deprecated methods (#19005) 2022-11-23 08:40:47 -08:00
ffluk3
e2624979e6
Fix timeout documentation (#18925) 2022-11-21 15:35:35 -08:00
Eduardo Vargas Torres
490ae796f3
docs (test-typescript-js.md): clarify TS ESM config (#18971)
Signed-off-by: Eduardo Vargas Torres <evargast@adobe.com>
2022-11-21 15:31:37 -08:00
Max Schmitt
6a5552ba24
chore: drop Ubuntu 18.04 support (#18924) 2022-11-21 11:23:45 -10:00
Dmitry Gozman
d6ab1a90bf
docs: fix typos in some snippets (#18966)
Fixes #18898.
2022-11-21 10:47:38 -08:00
Pavel Feldman
620e8547d4
chore: generate usage: sections based on snippets (#18965) 2022-11-21 10:40:21 -08:00
Pavel Feldman
3fb4b3bbf9
chore: normalize api markdown (#18942) 2022-11-21 09:30:32 -08:00
Max Schmitt
c2e3704f86
docs(dotnet): wrong AddInitScriptAsync snippet (#18893)
Fixes https://github.com/microsoft/playwright-dotnet/issues/2399
2022-11-17 10:58:49 -10:00
Max Schmitt
3ed9dab1c9
docs(locator): code snippet fixes (#18884)
Follow-up on https://github.com/microsoft/playwright/pull/18839
2022-11-17 10:41:25 -08:00
Pavel Feldman
f7b269d9c6
docs: brush up writing tests section (#18861) 2022-11-16 19:48:20 -08:00
Eduard Bardají Puig
10b8a83b45
docs(parameterize): fix code snippet (#18848) 2022-11-16 11:44:45 -10:00
Christian Clauss
a7f205bf4d
docs(ci): upgrade GitHub Actions (#18845) 2022-11-16 11:42:04 -10:00
Yury Semikhatsky
5fcd8839dc
docs: Java, .NET, Python release notes 1.28 (#18854) 2022-11-16 13:19:20 -08:00
Yury Semikhatsky
05fb3e6de8
Revert "chore: hide TestProject.setup and TestInfo.storage (#18800)" (#18836)
Now that the patch has been cherry-picked to the release branch
reverting it on main.

This reverts commit 6deba5dc21.
2022-11-16 11:23:10 -08:00
Pavel Feldman
7c65b5d1f5
chore: render html cards for locators.md (#18839) 2022-11-16 09:54:40 -08:00
Debbie O'Brien
402b2d499e
docs: update vscode doc (#18809) 2022-11-16 08:12:26 +01:00
Dmitry Gozman
0387d96cd5
chore: multiply overloaded options in csharp (#18818)
This way we'll get the same treatment in docs generator as well as
dotnet api generator.

This also adds non-suffixed aliases for string options, e.g. `Name` in
addition to `NameString` and `NameRegex`.

Fixes #18407.
2022-11-15 15:46:54 -08:00
Pavel Feldman
210a57ea3b
docs: remove images from locators.md (#18832) 2022-11-15 13:13:16 -08:00
Andrey Lushnikov
250bc9fb2f
doc: version 1.28 release notes (#18802) 2022-11-15 11:40:35 -08:00
Yury Semikhatsky
6deba5dc21
chore: hide TestProject.setup and TestInfo.storage (#18800) 2022-11-14 17:03:01 -08:00
Dmitry Gozman
1b0a8122ba
chore: allow py code blocks for python (#18799)
Turns out, we have some snippets that use `py` instead of `python`.
2022-11-14 14:50:01 -08:00
Debbie O'Brien
25605c616c
Selectors quick fix (#18742) 2022-11-14 15:23:25 +01:00
Dmitry Gozman
a7b2b04588
fix(getByRole): name and exact (#18719)
Following the `getByText()` and other methods:

- By default, matching is substring and case-insensitive. Before, it was
only case-insensitive, but not substring.
- With new option `exact: true`, matching is full string and
case-sensitive.
- Matching always normalizes whitespace.
- Codegen generates `exact: false` by default.
- `internal:role` treats `[name="foo"i]` as non-exact match.

Various fixes:
- Updated `getByRole` docs to match the reality.
- Locator generator edge cases.
2022-11-11 15:58:36 -08:00
Andrey Lushnikov
bc78db07df
chore: cut 1.28 branch (#18746) 2022-11-11 15:30:15 -08:00
Andrey Lushnikov
251cc9e229
chore: fix docs (#18751) 2022-11-11 13:44:40 -08:00
Debbie O'Brien
2e84c63f0d
docs: update locators in getting started (#18738) 2022-11-11 16:24:26 +01:00
Debbie O'Brien
ad5fe28416
docs: improve locators examples and flow (#18548) 2022-11-11 16:23:00 +01:00
Andrey Lushnikov
f3a99fdd69
chore: address API review comments for the snapshotPathTemplate (#18716)
This patch:
- updates documentation to lead users from `TestConfig.snapshotDir` and
  `testInfo.snapshotSuffix` to `TestConfig.snapshotPathTemplate` as a
  better and more flexible alternative.
- drops `{snapshotSuffix}` from documentation
- stops using `snapshotSuffix = ''` in our own tests and switches us
  to the `snapshotPathTemplate`.
- adds `{testName}` token.
2022-11-10 17:23:57 -08:00
Chris Alley
1ec614bfc4
docs: fix grammar within class test API documentation (#18627) 2022-11-10 15:53:48 -08:00
Dmitry Gozman
194abc35cd
Revert #18561 "feat(test runner): test.reset() to reset options to default/config value" (#18704)
This reverts commit 6fef227f43.

Not shipping in 1.28.
2022-11-10 14:45:05 -08:00
Dmitry Gozman
6d456d30dc
docs: improve test.describe.configure() (#18705) 2022-11-10 12:29:38 -08:00
Dmitry Gozman
7c80b77c57
feat(clear): remove clear() methods from all classes except Locator (#18703)
The preferred way is to use the locator, so we should not encourage the
use of `ElementHandle` or `Page` in the new APIs.
2022-11-10 12:29:14 -08:00
Andrey Lushnikov
f52fa4ceba
chore(snapshotPathTemplate): address review comments (#18702) 2022-11-10 11:37:41 -08:00
Dante Monaldo
e6a1bdffee
docs(auth): fix session storage examples (#18686)
Co-authored-by: Dante <dante@usebasis.co>
2022-11-10 09:43:42 -08:00
Andrey Lushnikov
6d491f928d
feat(playwright-test): introduce snapshotPathTemplate configuration (#18568)
This configuration option allows to set a string with template
values for precise control over snapshot path location.

An example of `snapshotPathTemplate` usage:

```ts
// playwright.config.ts
// Notice the `testDir` configuration!
export default {
  testDir: './tests',
  snapshotPathTemplate: './__screenshots__/{platform}/{projectName}/{testFilePath}/{arg}{ext}',
}
```

Currently supported "magic tokens" inside the `snapshotPathTemplate`
are:

- `{testDir}` - project's `testDir`
- `{snapshotDir}` - project's `snapshotDir`
- `{platform}` - `process.platform`
- `{projectName}` - Project's sanitized name
- `{testFileDir}` - Directories in relative path from `testDir` to test
  file path (e.g. `page/` in the example below)
- `{testFileName}` - Test file name (with extension) (e.g.
  `page-click.spec.ts` in the example below)
- `{testFilePath}` - Relative path from `testDir` to test file path
  (e.g. `page/page-click.spec.ts` in the example below)
- `{ext}` - snapshot extension (with dots)
- `{arg}` - joined snapshot name parts, without extension (e.g.
`foo/bar/baz` in the example below)
- `{snapshotSuffix}` - `testInfo.snapshotSuffix` value.

Consider the following file structure:

```
playwright.config.ts
tests/
└── page/
    └── page-click.spec.ts
```

The following `page-click.spec.ts`:

```ts
// page-click.spec.ts
import { test, expect } from '@playwright/test';

test('should work', async ({ page }) => {
  await expect(page).toHaveScreenshot(['foo', 'bar', 'baz.png']);
});
```

Fixes #7792
2022-11-09 15:29:07 -08:00
Andrey Lushnikov
9bcb28f25a
Revert "feat: send SIGTERM to webserver before SIGKILL'ing it. (#18220)" (#18661)
This reverts commit c63a0b536d.

Reason: https://github.com/microsoft/playwright/pull/18564
2022-11-09 09:18:33 -08:00
Max Schmitt
06353e9905
docs(trace-viewer): fix broken examples (#18654)
Fixes https://github.com/microsoft/playwright-python/issues/1616
2022-11-08 14:22:14 -08:00
Yury Semikhatsky
d5494edf71
feat(runner): TestOptions.storageStateName (#18587) 2022-11-07 16:27:38 -08:00
Max Schmitt
48d7bfc55f
docs: delete old auth + pom guides (#18615) 2022-11-07 15:31:42 -08:00