Commit Graph

9027 Commits

Author SHA1 Message Date
Dmitry Gozman
43304e980d
feat: show browser.close() stack in "Browser has been closed" error (#17376)
Often times we see "Browser has been closed" error, but it's not
entirely clear why. Showing the close stack might help.

```js
page.goto: Connection closed
    ==== Closed by ====
    at /Users/dgozman/code/playwright/tests/library/browsertype-connect.spec.ts:477:32
```
2022-09-15 17:04:41 -07:00
Andrey Lushnikov
24d3a23a66
fix(docker): handle container name conflict usecase. (#17379)
Drive-by: typo in the JSON docker status field.
2022-09-15 16:59:41 -07:00
Ross Wollman
85a5c690a4
docs(python): add missing NotToBe{Visible,Editable,Enabled} params (#17381)
Follow up to:

- https://github.com/microsoft/playwright/pull/17058
- https://github.com/microsoft/playwright/pull/17065
- https://github.com/microsoft/playwright/pull/17207

Blocks https://github.com/microsoft/playwright-python/issues/1534.
2022-09-15 16:54:47 -07:00
Pavel Feldman
872bcc9734
chore: expose driver protocol on the pw object (#17363) 2022-09-15 15:53:18 -07:00
Andrey Lushnikov
b09ea69024
chore(docker): address docker offline comments (#17377)
This patch:
- Removes all `process.exit(1)` from `docker.ts` and instead throws
  errors.
- Drops the `npx playwright docker test` command. We agreed to
  engage docker when `PLAYWRIGHT_DOCKER` environment variable
  is set.
- Introduces hidden `npx playwright docker status` command that
  dumps a JSON with docker status:
  ```sh
  aslushnikov:~/prog/playwright$ npx playwright docker status
  {
    "dockerEngineRunning": true,
    "imageName": "playwright:local-1.27.0-next-focal",
    "imageIsPulled": true,
"containerWSEndpoing":
"ws://127.0.0.1:55077/eafeb84c-571b-4d12-ac51-f6a2b43e9155",
"containerVNCEndpoint":
"http://127.0.0.1:55076/?path=fb6d4add-9adf-4c3c-b335-893bdc235cd7&resize=scale&autoconnect=1"
  }
  ```
2022-09-15 15:48:12 -07:00
Pavel Feldman
30ff27843a
chore: rebuild components on new vite (#17367) 2022-09-15 15:24:01 -07:00
Ross Wollman
2e1ea29614
docs(python): add missing NotToHaveAttribute overloads (#17371)
Follow up to https://github.com/microsoft/playwright/pull/16941
2022-09-15 12:57:47 -07:00
Dmitry Gozman
e1a2f7a168
fix(socks proxy): destroy sockets on close to avoid hanging (#17349) 2022-09-14 21:15:46 -07:00
Pavel Feldman
016883602d
chore: roll test runner to tot (#17351) 2022-09-14 19:51:22 -07:00
Andrey Lushnikov
58873908ba
devops: add docker screenshot expectations for html-reporter tests (#17341) 2022-09-14 15:44:13 -07:00
Andreas Jim-Hartmann
d6d593234e
docs(test-configuration-js.md): Removed 'video' from trace section (#17332) 2022-09-14 15:31:11 -07:00
Andrey Lushnikov
8466c436c9
fix(list reporter): properly count new lines for long stdout (#17339) 2022-09-14 15:25:24 -07:00
Andrey Lushnikov
a12112c24d
devops(docker): add docker integration smoke tests (#17267) 2022-09-14 15:05:18 -07:00
Pavel Feldman
854c783019
chore: project.id, configFile in reporter apis (#17346) 2022-09-14 14:56:28 -07:00
Max Schmitt
59c32bf2c6
Revert "chore(generator): use new .NET test attributes (#17172)" (#17344)
This reverts commit 15add13a6a.
2022-09-14 22:44:38 +02:00
Max Schmitt
4b8a85e69d
docs(release-notes): add 1.26 release notes for language ports (#17345) 2022-09-14 22:38:19 +02:00
Andrey Lushnikov
e295eea450
fix(ignoreSnapshots): print a notice when ignoreSnapshots option is on (#17317)
<img width="1161" alt="image"
src="https://user-images.githubusercontent.com/746130/190032155-ae454c3e-1a7d-4a64-8cd6-bb27f9075ef3.png">
2022-09-14 09:16:41 -07:00
Andrey Lushnikov
37e1dad684
doc: fix docker doc snippet indentation (#17310) 2022-09-13 17:20:33 -07:00
Andrey Lushnikov
210f7b2203
fix(docker): stop containers started with npx playwright docker start (#17316)
This patch makes `npx playwright docker stop` command to stop
containers that were launched with previous playwright version.
2022-09-13 17:08:01 -07:00
Andrey Lushnikov
dfcd2a273d
fix(docker): do not pollute stdout when used with JSON reporter (#17315)
This patch moves parts of docker configuration to a plugin so that
it can rely on repoter for stdout.

Drive-by: provide all plugins with reporter in the `setup` callback.
2022-09-13 17:05:37 -07:00
Andrey Lushnikov
881f3101bd
chore(docker): consolidate docker code (#17314)
This patch consolidates all of docker implementation under the
`docker/` folder.
2022-09-13 16:14:49 -07:00
Yury Semikhatsky
35a86a2d02
docs(fetch): post file examples (#17312) 2022-09-13 16:05:57 -07:00
Andrey Lushnikov
4f11a4d5e7
feat(docker): use the __screenshots__ dir for snapshots by default (#17311)
This patch opts into the `__screnshots__` folder snapshot management
for docker.

With this patch, docker-originating snapshots will be stored in the
following folder:

```
{testDir}/__screenshots__/{projectName}/{testFilePath}/{snapshotName}
```

Where `{testFilePath}` is a test file path relative to `testDir`

Drive-by: introduce and document the `PLAYWRIGHT_DOCKER` environment
variable that enables docker integration.
2022-09-13 15:49:04 -07:00
Dmitry Gozman
68072a5d5c
test: improve debugability of installation tests (#17277)
Put more details into the error message. This way it is immediately seen
on the bots.
2022-09-13 14:43:11 -07:00
Andrey Lushnikov
705bc28e92
feat(docker): auto-bind container ports to host ports (#17307)
Drive-by: make sure docker container does not expose ports on `0.0.0.0`
and instead registers to localhost. This way websocket and vnc ports
are not exposed to the public internet.
2022-09-13 13:23:04 -07:00
Andrey Lushnikov
462fa7d79d
devops: upload reports to a new container (#17298)
This patch:
- adds `gitBranchName` to the infra metadata to the report
- starts uploading persistent reports to a different container, prefixed
with utc year-month-date.
2022-09-13 10:55:39 -07:00
Andrey Lushnikov
ebfefefc8e
chore: refactor docker integration code (#17297)
This patch splits out `dockerApi` namespace that is solely
responsible for docker API manipulation.
2022-09-13 10:55:11 -07:00
Max Schmitt
b2e8cf7121
docs: fix release notes did not compile docusaurus (#17302) 2022-09-13 18:32:54 +02:00
Max Schmitt
00a3b1b0a2
fix: make evaluate work with overridden Window/Document/Node (#17288)
Fixes https://github.com/microsoft/playwright/issues/17287
2022-09-13 18:21:07 +02:00
Andrey Lushnikov
31743a12c1
chore: add release notes for js (#17282) 2022-09-13 05:58:02 -07:00
Andrey Lushnikov
8640d29ce4
chore(docker): address review comments (#17279)
Co-authored-by: Ross Wollman <rwoll@users.noreply.github.com>
2022-09-13 05:55:26 -07:00
yogabonito
809c5d8a98
docs: fix typo (#17235) 2022-09-12 21:41:42 -07:00
ilovehackathons
b689c51429
doc(todomvc): correctly test that the edit is cancelled (#17128) 2022-09-12 21:39:30 -07:00
sand4rt
f61d3c9cc4
feat(ct): svelte type-safe hook config (#17237) 2022-09-12 21:00:41 -07:00
sand4rt
eb3666328d
feat(ct): vue2 type-safe hook config (#17236) 2022-09-12 21:00:09 -07:00
Max Schmitt
ab4876242f
docs(dotnet): use modern namespace syntax for api testing snippets (#17271) 2022-09-12 23:17:27 +02:00
Max Schmitt
c7367b7065
chore(dotnet): no nested namespace in transport channels (#17273) 2022-09-12 23:13:59 +02:00
Dmitry Gozman
48ac918cec
test: unflake "should load web server w/o esm loader in ems module" (#17269) 2022-09-12 11:42:04 -07:00
Max Schmitt
0b4de0df7f
chore(dotnet): use csharp 10 namespace declaration (#17248) 2022-09-12 11:01:49 -07:00
Andrey Lushnikov
bc942ef9ea
chore: cut v1.26.0 (#17265) 2022-09-12 10:45:27 -07:00
sand4rt
344077b04e
feat(ct): svelte mount type (#17228) 2022-09-12 09:30:04 -07:00
sand4rt
72a18754ef
core(ct): rename tests (#17216) 2022-09-12 09:27:53 -07:00
Jean-François Greffier
81bcbd284f
docs: migration typos (#17247) 2022-09-12 17:41:49 +02:00
Max Schmitt
b12cd9fb21
docs: have npm test -> npx playwright test (#17250) 2022-09-12 17:24:23 +02:00
Nav-2d
dce7cbb446
docs(intro-section): fix links (#17241) 2022-09-12 15:11:52 +02:00
Yury Semikhatsky
04ed32e531
chore: run webview2 tests only when cq1 is present (#17230) 2022-09-09 16:55:39 -07:00
Andrey Lushnikov
af042beb13
feat: introduce docker integration (#16382)
This patch introduces the following commands:
- `npx playwright docker build` that builds a VRT docker image
  locally that is based off the `mcr.microsoft.com/playwright:jammy`
- `npx playwright docker start` that launches a docker container with
  browsers.
- `npx playwright docker stop` that stops given docker container.
- `npx playwright docker test` that runs all the tests inside a
  launched docker container.
2022-09-09 15:25:42 -07:00
Dmitry Gozman
fa7caf4193
feat(cli): remove -i (#17229) 2022-09-09 15:07:15 -07:00
Yury Semikhatsky
24ee456d43
chore: make maxRedirects available in java, improve docs. tests (#17227) 2022-09-09 13:25:36 -07:00
Vincenzo Gasparo
17b203affb
feat: added follow and redirect arguments to fetch (#17033) 2022-09-09 12:14:42 -07:00