Commit Graph

1018 Commits

Author SHA1 Message Date
Pavel Feldman
675f0eb4a0
chore: report error location for fatal errors (#19610) 2022-12-21 09:36:59 -08:00
Max Schmitt
51782cfa5d
chore: fix docs roll (#19605) 2022-12-20 21:19:31 +01:00
Max Schmitt
bb2a2c7331
fix: render discouraged / deprecated types (#19596)
Fixes https://github.com/microsoft/playwright/issues/19591
2022-12-20 16:19:07 +01:00
Sébastien Règne
f78942d835
chore: Fix Firefox logo (#19476) 2022-12-19 14:47:37 -08:00
Pavel Feldman
3afd83c8cc
chore: withdraw locator.enumerate (#19484) 2022-12-15 10:13:56 -08:00
Max Schmitt
1dcb8f643d
chore: fix Android tests (#19426) 2022-12-15 07:56:57 +01:00
Pavel Feldman
0e2732decf
feat(api): introduce expect().toPass (#19463) 2022-12-14 19:23:13 -08:00
Pavel Feldman
17a0074459
feat(api): introduce Locator.all, enumerate (#19461) 2022-12-14 16:42:50 -08:00
Yury Semikhatsky
92dd734e04
chore: hide setup, store, TestProject.setupMatch, storageStateName (#19442) 2022-12-13 22:48:38 -08:00
Andrey Lushnikov
59a41f6051
chore: prepare to publish dockerfile.vrt docker image (#19324)
This patch:
- adds a new `Dockerfile.vrt` image file based on focal that installs
  VRT-related dependencies inside it.
- updates scripts to build & publish the new docker image.

Drive-by: remove stale file
2022-12-07 15:57:01 -08:00
Dmitry Gozman
622c1a8da6
tests: run browserType.connect tests against launchServer and run-server (#19340) 2022-12-07 14:36:32 -08:00
Fernando Garcia Llorente
cd4ccdfa29
feat: allow options in automatic screenshots (#19143)
Closes #9983 

Allowing Automatic Screenshots in `PlaywrightTestConfig` to have
`fullPage` & `omitBackground` as optional parameters.
2022-12-07 08:45:33 -08:00
Yury Semikhatsky
1b3e53697b
chore: TestStorage => TestStore (#19308) 2022-12-06 13:33:43 -08:00
Yury Semikhatsky
3c1b26b9f1
feat: make storage a global variable (#19283) 2022-12-05 21:37:37 -08:00
Dmitry Gozman
81c8620bfe
chore: upgrade internal types to support TypeScript 4.9.3 (#19280)
Fixes https://github.com/microsoft/TypeScript/issues/51619

Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-12-05 17:22:25 -08:00
Pavel Feldman
291ad6e618
fix(md): ensure list offset when rendering (#19241) 2022-12-02 16:33:51 -08:00
Pavel Feldman
89bdaf2441
chore: rename ScreenshotAssertions to SnapshotAssertions (#19150) 2022-11-29 16:57:03 -08:00
Pavel Feldman
be2139f0ac
docs: split assertions list into langs (#19039) 2022-11-24 08:25:24 -08: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
Max Schmitt
6a5552ba24
chore: drop Ubuntu 18.04 support (#18924) 2022-11-21 11:23:45 -10:00
Pavel Feldman
3fb4b3bbf9
chore: normalize api markdown (#18942) 2022-11-21 09:30:32 -08:00
Pavel Feldman
03d2b2ecbf
chore: move doc-specific code into documentation (#18933) 2022-11-19 11:26:11 -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
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
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
Dmitry Gozman
bc6617b4ca
chore: verify tab groups in docs during lint (#18768)
This extracts the logic from playwright.dev so that we get early
warnings.
2022-11-14 13:05:05 -08:00
Yury Semikhatsky
70065ba6dd
Revert "chore(driver): roll driver to recent Node.js LTS version (#18… (#18791)
…636)"

The new node resolves loalhost to ::1 by default which breaks API tests
in the ports (Java in particular). Reverting to the previous LTS to
allow some time to implement happy eyeballs algorithm on our end by next
release.

This reverts commit 63a0b75186.
Reference https://github.com/microsoft/playwright/issues/18790
2022-11-14 11:30:36 -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
Andrey Lushnikov
f52fa4ceba
chore(snapshotPathTemplate): address review comments (#18702) 2022-11-10 11:37:41 -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
github-actions[bot]
63a0b75186
chore(driver): roll driver to recent Node.js LTS version (#18636) 2022-11-08 03:31:27 -08:00
Yury Semikhatsky
d5494edf71
feat(runner): TestOptions.storageStateName (#18587) 2022-11-07 16:27:38 -08:00
Yury Semikhatsky
25dc0bfacb
feat(runner): change storage fixture to TestInfo.storage() (#18584) 2022-11-04 14:28:25 -07:00
Dmitry Gozman
6fef227f43
feat(test runner): test.reset() to reset options to default/config value (#18561) 2022-11-04 09:03:29 -07:00
Yury Semikhatsky
45aa82242d
feat(runner): storage fixture (#18522) 2022-11-02 20:22:35 -07:00
Dmitry Gozman
8292398692
docs: support custom hrefs for api links (#18514) 2022-11-02 13:35:51 -07:00
Pavel Feldman
2183d9e9a2
chore: use codemirror for editor (#18482) 2022-11-01 15:04:30 -07:00
Pavel Feldman
4d53fd9c63
chore: download android driver from the cdn (#18466) 2022-10-31 16:08:26 -07:00
Yury Semikhatsky
7337dd4e28
chore: revert project.{stage,run} (#18462) 2022-10-31 14:04:24 -07:00
Max Schmitt
490513a017
devops: update repo for internal tests 2022-10-30 21:33:30 -07:00
Dmitry Gozman
2d3b2a0768
feat(test runner): test.describe.configure({ retries, timeout }) (#18388)
References #10825.
2022-10-27 15:53:27 -07:00
github-actions[bot]
02499cf589
chore(driver): roll driver to recent Node.js LTS version (#18333)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-26 08:12:39 -07:00
Max Schmitt
5d99719f5d
chore: use Node.js 18 for Docker images (#18334)
Node.js 18 is now LTS and we follow LTS schedule.
2022-10-26 08:11:20 -07:00
Max Schmitt
805312b722
feat(android): add Android.{launchServer,connect} (#18263)
Fixes https://github.com/microsoft/playwright/issues/17538
2022-10-24 17:23:11 -07:00
Yury Semikhatsky
11eb719d13
feat(runner): project run: "always" (#18160)
Projects marked with `run: 'always'` are non shard-able and run after
failures.
2022-10-18 17:18:45 -07:00
Pavel Feldman
739b64a09a
chore: render typed locators in the recorder (#18162) 2022-10-18 16:39:58 -07:00
github-actions[bot]
3f2d58eeec
chore(driver): roll driver to recent Node.js LTS version (#18055)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-13 14:33:07 +03:00
Yury Semikhatsky
08a3a269cd
feat(runner): project.canShard (#18037) 2022-10-12 14:34:22 -07:00