Commit Graph

1136 Commits

Author SHA1 Message Date
Debbie O'Brien
7a8eb15820
docs: add titles to config snippets (#22910)
Docs PR: https://github.com/microsoft/playwright.dev/pull/1039

---------

Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-05-10 18:38:12 +02:00
Andrey Lushnikov
ff3275eb3e
chore: add report UUID (#22785) 2023-05-03 05:58:16 -07:00
Pavel Feldman
70011c82f7
chore: unflake ui tests (3) (#22741) 2023-05-01 15:18:34 -07:00
Dmitry Gozman
dbb218a9d5
feat: project.teardown that runs after all dependents have finished (#22696)
This replicates globalTeardown in the deps world.

Fixes #21914.
2023-04-28 14:27:08 -07:00
Andrey Lushnikov
286428fda9
docs: release notes 1.33 (#22615) 2023-04-26 13:00:36 -07:00
Pavel Feldman
a1007bbe2c
chore: introduce expect.configure (#22533) 2023-04-25 10:29:56 -07:00
mindaugasm
be79ee0450
feat(html-report): add attachmentsBaseURL option (#22212)
Fixes https://github.com/microsoft/playwright/issues/21636
2023-04-18 11:25:11 -07:00
Pavel Feldman
00df08b3cf
chore: explicitly control actions with slow mo (#22445)
Fixes https://github.com/microsoft/playwright/issues/22273
2023-04-17 16:19:30 -07:00
Pavel Feldman
8d69fbacf7
chore: introduce ct-core to hard-depend on vite (#22437)
Fixes https://github.com/microsoft/playwright/issues/22233
2023-04-17 16:19:21 -07:00
Andrey Lushnikov
60aba4d394
chore: support browser aliases in roll_browser.js (#22389) 2023-04-13 13:57:47 -07:00
Playwright Service
0c3c6ed683
chore(driver): roll driver to recent Node.js LTS version (#22378)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-04-13 12:24:10 +02:00
Max Schmitt
336d2114c8
chore: have Ubuntu 22 Docker image by default (#22356)
Fixes https://github.com/microsoft/playwright-python/issues/1858
2023-04-12 19:40:23 +02:00
dependabot[bot]
635d180251
chore(deps): bump xml2js from 0.4.23 to 0.5.0 in /utils/flakiness-dashboard (#22346) 2023-04-12 09:55:17 +02:00
MarcNum
fbdafc5fe3
feat: Adding trace option 'on-all-retries' (#21985)
Fixes: #21860
2023-03-31 13:04:24 -07:00
Max Schmitt
0c4eedbabe
docs: support code block titles (#22068)
Fixes https://github.com/microsoft/playwright/issues/21461
2023-03-29 23:15:39 +02:00
Dmitry Gozman
525097d465
feat: Locator.filter(locator) (#21975)
Produces a locator that matches both locators.
Implemented through `internal:and` selector.

Fixes #19551.
2023-03-27 14:29:30 -07:00
Yury Semikhatsky
95e7d3aabc
chore: hide store from public (#21763) 2023-03-17 11:50:44 -07:00
Pavel Feldman
27048adebe
chore: introduce testInfo.testId (#21670) 2023-03-14 15:58:55 -07:00
Dmitry Gozman
46f9fa005e
fix(tracing): do not double-zip entries in remote mode (#21579)
Fixes #21435.
2023-03-10 14:54:32 -08:00
Playwright Service
644a17570f
chore(driver): roll driver to recent Node.js LTS version (#21520) 2023-03-09 12:55:22 +01:00
Max Schmitt
c9eac69f2b
fix(types): accept string in expect().toMatch() (#21454)
Fixes https://github.com/microsoft/playwright/issues/21453
2023-03-07 17:53:50 +01:00
Pavel Feldman
65117702e7
chore: consistent xterm naming (#21446) 2023-03-06 20:39:52 -08:00
Pavel Feldman
cffb6ac269
chore: move sever/isomorphic to utils/ to use it in client (#21445) 2023-03-06 18:49:14 -08:00
Pavel Feldman
47427e87ec
chore: do not use module.exports in the injected esm files (#21412)
Follow up to #17145
2023-03-05 20:01:35 -08:00
Dmitry Gozman
d904a6129f
chore: run check-deps for all packages (#21395) 2023-03-03 14:50:43 -08:00
Sebastian Silbermann
fbaf56a13f
feat(ct-react): Support React 18 only (#19814)
BREAKING CHANGE: Drop support for React 17 and earlier
Support for React 17 an earlier is provided by
`@playwright/experimental-ct-react-17`

Closes #19923
2023-03-03 14:28:33 -08:00
Yury Semikhatsky
f8100bbb25
fix: expect unquoted npde.exe path (#21307)
* It is more common to set env variable value without quotes on Windows
(see the bug)
* Use defined to check for string presence, it will work nicely with
strings that contain whitespaces

https://github.com/microsoft/playwright-java/issues/1213
2023-03-01 09:16:23 -08:00
Pavel Feldman
8ccc02a9d3
chore: use client wall time in traces (#21163) 2023-02-23 14:37:53 -08:00
Max Schmitt
f3ec29e6ad
devops: use default Android emulator gpu (#21170)
Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-02-23 23:07:44 +01:00
Dmitry Gozman
b735e136fe
chore: run non-concurrent steps in watch before everything else (#21164)
This prevents initial errors.
2023-02-23 11:46:20 -08:00
Playwright Service
681d584442
chore(driver): roll driver to recent Node.js LTS version (#21143)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-23 11:09:10 +01:00
Playwright Service
f5b89ff9a9
chore(driver): roll driver to recent Node.js LTS version (#21056)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-21 14:32:52 +01:00
Dmitry Gozman
55f4b670a9
fix(test runner types): allow sync step functions (#20996) 2023-02-17 14:26:40 -08:00
Pavel Feldman
d7a0b3bb4e
chore: implement pick locator in trace viewer (#20965)
Fixes https://github.com/microsoft/playwright/issues/7853
2023-02-17 11:19:53 -08:00
Yury Semikhatsky
09be9d6425
feat: key value store backed by filesystem (#20932)
Keys are used as a relative file path without any sanitization assuming
that the underlying fs will throw on error.
2023-02-16 16:48:28 -08:00
Dmitry Gozman
0b7f9055a3
chore: fix docs for python and java (#20962) 2023-02-16 11:48:38 -08:00
Yury Semikhatsky
90c4e6f9b2
chore: revert sharded html report (#20923)
We've decided not to ship it in the current form.

#10437
2023-02-15 12:38:03 -08:00
Max Schmitt
0484f02145
test: roll android chromium to 1103927 (#20828) 2023-02-10 21:28:36 +01:00
Dmitry Gozman
778dd20403
chore(docs): beautify generated types, put options always last (#20805) 2023-02-09 20:46:33 -08:00
Andrey Lushnikov
bcb2d67c5d
chore: remove experimental dockerfile.remote (#20790)
We didn't find a compelling-enough use case to release this.
2023-02-09 12:18:02 -08:00
Cliff Su
b6eb85a0ba
devops: upgrade linux-browser-dependencies tool to Node.js 18 (#20556) 2023-02-09 18:52:05 +01:00
Dmitry Gozman
190c121e66
chore: bundle chokidar, leave fsevents as an optional dependency (#20762) 2023-02-09 08:40:27 -08:00
Dmitry Gozman
98e2fe184e
chore(docs): sort members instead of validating (#20755) 2023-02-08 09:59:31 -08:00
Yury Semikhatsky
a93cf767a1
feat: html reporter sharded option (#20737)
Make sharded report feature an opt-in:

```ts
{
   reporter: [['html', { sharded: true }]]
};
```

#10437
2023-02-07 22:21:50 -08:00
Andrey Lushnikov
b67cef2c4d
feat: introduce Dockerfile.remote image (#20691)
When this image is launched, it exposes a single endpoint
that can be used to connect to and to launch browsers.
2023-02-07 10:50:44 -08:00
github-actions[bot]
f608f65ce6
chore(driver): roll driver to recent Node.js LTS version (#20708)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-02-07 11:12:49 +01:00
Andrey Lushnikov
0a752f3fd6
chore(docker): remove experimental docker integration (#20676)
This removes everything related to docker integration experiments that
we conducted over the last 6 months.

I'll send a follow-up with an alternative suggestion that was demo'ed on
a team meeting in the end of December.
2023-02-06 10:50:45 -08:00
Dmitry Gozman
e64c623e61
feat(expect): strip down Expect types (#20601)
This only leaves:
- documented assertions;
- asymmetric matchers;
- `resolves`/`rejects`;
- `expect.extend()`;
- `expect.getState()` with selected properties.

References #20432.
2023-02-03 15:56:31 -08:00
Martijn Cornips
5dd2b1ef0c
chore: update node version comment in dockerfile (#20496) 2023-02-02 16:44:20 -08:00
Dmitry Gozman
3180bc9804
fix(types): make most fixtures non-undefined (#20573)
Fixes #20416.
2023-02-02 13:11:50 -08:00
Dmitry Gozman
f46883e58e
feat(expect): add GenericAssertions documentation (#20564)
References #20432.
2023-02-01 16:55:52 -08:00
Pavel Feldman
635b47025e
chore: expose project dependencies api (#20546) 2023-02-01 08:39:07 -08:00
Dmitry Gozman
9c6c31a442
fix(types): update PlaywrightTestConfig types (#20540)
This makes errors more focused on the custom properties.

References #20416.
2023-01-31 15:02:01 -08:00
Max Schmitt
c6bc3ce23f
devops: upgrade Docker images to Node.js 18 (#20361)
Fixes https://github.com/microsoft/playwright/issues/20133
2023-01-26 16:34:32 +01:00
Pavel Feldman
fe1dd7818d
chore: extract task runner for global setup (#20345) 2023-01-25 15:38:23 -08:00
github-actions[bot]
9f97190f99
chore(driver): roll driver to recent Node.js LTS version (#20319)
Since https://github.com/microsoft/playwright/issues/18790 is merged and
got released in 1.30 we can merge this now.

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-01-25 11:07:59 +01:00
Pavel Feldman
147bb6b292
chore: run global setup before onBegin (#20285) 2023-01-23 17:44:23 -08:00
Andrey Lushnikov
c9e3131832
chore: clarify flakiness dashboard deployment docs (#20292) 2023-01-23 06:52:44 -08:00
Andrey Lushnikov
c07afc4382
chore: update flakiness-dashboard extension bundle (#20291)
This way it can work with newer runtimes.
2023-01-23 06:14:21 -08:00
Pavel Feldman
e08168e16e
chore: temporarily remove project and global setup, store (#20181) 2023-01-18 12:56:03 -08:00
Pavel Feldman
d1c161ce99
chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
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
Dmitry Gozman
9a5df720ff
chore: fix build/watch script for bundles and vite-powered packages (#20055) 2023-01-11 18:36:04 -08:00
Max Schmitt
0fe327c21b
chore: return Promise<any> in {page,context}.route (#20005)
Fixes https://github.com/microsoft/playwright/issues/19855
Closes https://github.com/microsoft/playwright/pull/19856
2023-01-10 18:07:17 +01:00
Dmitry Gozman
599ae30313
chore: update .net generator with deprecated/discouraged (#19843) 2023-01-03 23:03:38 +01:00
Hylke Postma
b695478840
fix(driver): AttributeError error when CWD contains space (#19801) 2023-01-02 14:36:07 +01:00
Yury Semikhatsky
137070d889
Revert "chore: hide setup, store, TestProject.setupMatch, storageStat… (#19756)
…eName (#19442)"

This reverts commit 92dd734e04.
2022-12-28 15:39:31 -08:00
Yury Semikhatsky
2922eec8e9
chore: since for classes in api.json (#19639) 2022-12-21 16:30:01 -08:00
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