Commit Graph

7409 Commits

Author SHA1 Message Date
Ross Wollman
13dedd27ca
test: out-of-viewport should be considered visible (#13134)
Closes #13131.

Per the visibility spec on https://playwright.dev/docs/next/actionability#visible:

> Element is considered visible when it has non-empty bounding box and does not have visibility:hidden computed style. Note that elements of zero size or with display:none are not considered visible.

 non-empty bounding box
 does not have visibility:hidden

Given the above conditions are satisfied, the locator is considered visible.

https://github.com/microsoft/playwright/issues/8740 proposes something like `isInViewport()` that would be better suited for checking if an element is offscreen.
2022-03-28 16:10:16 -07:00
Ross Wollman
ae365dda3b
chore: remove internal dep on FullConfig (#13074)
Resolves #13058.

This blocks adding #8206 since we don't want the new launch configs
publicly available on FullConfig.
2022-03-28 15:53:42 -07:00
Dmitry Gozman
01a39e5b4c
test(role): add tests for implicit role calculation (#13132) 2022-03-28 15:22:50 -07:00
Andrey Lushnikov
db334a8e71
browser(ff-beta): roll Firefox Beta to 99.0b9 (#13084)
Pretty Diff: 0e75c8a0dc
2022-03-28 15:14:20 -07:00
Philip Sanetra
be41c4a35d
fix(registry): Fix support for generic-linux (#13129)
Fixes https://github.com/microsoft/playwright/issues/13128
2022-03-28 14:50:56 -07:00
Dmitry Gozman
9420a53939
fix(esm): make sure import from './foo.js' is supported (#13137)
Drive-by: migrate all @esm tests to esm.spec.ts.
2022-03-28 14:37:46 -07:00
Ross Wollman
bb90ab1471
docs: use case-sensitive keyword (#13136) 2022-03-28 14:16:33 -07:00
Dmitry Gozman
8c19f71c36
feat(selectors): role selector engine (#12999)
This introduces `role=button[name="Click me"][pressed]` attribute-style
role selector. It is only available under `env.PLAYWRIGHT_EXPERIMENTAL_FEATURES`.

Supported attributes:
- `role` is required, for example `role=button`;
- `name` is accessible name, supports matching operators and regular expressions:
  `role=button[name=/Click(me)?/]`;
- `checked` boolean/mixed, for example `role=checkbox[checked=false]`;
- `selected` boolean, for example `role=option[selected]`;
- `expanded` boolean, for example `role=button[expanded=true]`;
- `disabled` boolean, for example `role=button[disabled]`;
- `level` number, for example `role=heading[level=3]`;
- `pressed` boolean/mixed, for example `role=button[pressed="mixed"]`;
- `includeHidden` - by default, only non-hidden elements are considered.
   Passing `role=button[includeHidden]` matches hidden elements as well.
2022-03-28 09:24:58 -07:00
Pavel Feldman
1471bb7177
fix(tests): remove lock from component tests, test real experience (#13095) 2022-03-26 13:54:33 -07:00
Pavel Feldman
a4a2d41705 fix(tests): fix selenium installation tests 2022-03-26 08:36:25 -07:00
Pavel Feldman
a58707b8a6
chore: group tests under tests/ (2) (#13082) 2022-03-25 23:09:02 -07:00
Pavel Feldman
a454328c25
fix(test): follow up to tests refactoring (#13085) 2022-03-25 22:11:29 -07:00
Pavel Feldman
02cac8a066
chore: group tests under tests/ (1) (#13081) 2022-03-25 16:05:50 -07:00
Yury Semikhatsky
5734c18ef8
feat(route): add cors header in route.fulfill (#12943) 2022-03-25 14:56:57 -07:00
Andrey Lushnikov
4ab4c0bda1
feat: detect docker version and Playwright version mismatch (#12806)
This patch prints a friendly instructions in case Docker image version
mismatches Playwright version and there are missing browser
dependencies.

With this patch, Playwright will yield the following error:

```
root@f0774d2b2097:~# node a.mjs
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

browserType.launch:
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers.                                       ║
║ This is most likely due to docker image version not matching Playwright version:           ║
║ - Playwright: 1.22.0                                                                       ║
║ -     Docker: 1.21.0                                                                       ║
║                                                                                            ║
║ Either:                                                                                    ║
║ - (recommended) use docker image "mcr.microsoft.com/playwright:v1.22.0-focal"              ║
║ - (alternative 1) run the following command inside docker to install missing dependencies: ║
║                                                                                            ║
║     npx playwright install-deps                                                            ║
║                                                                                            ║
║ - (alternative 2) use Aptitude inside docker:                                              ║
║                                                                                            ║
║     apt-get install libgbm1                                                                ║
║                                                                                            ║
║ <3 Playwright Team                                                                         ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
    at file:///root/a.mjs:3:10 {
  name: 'Error'
}```

Fixes #12796

Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2022-03-25 14:45:53 -07:00
Pavel Feldman
6b81e76c2b
chore: migrate trace-viewer and recorder to vite (#13076) 2022-03-25 14:12:00 -07:00
Yury Semikhatsky
97e8ead57c
feat: large files upload in ff and wk (#12937) 2022-03-25 13:26:12 -07:00
Max Schmitt
c8cc62a2e6
chore: add link validation for docs (#13047) 2022-03-25 19:30:45 +01:00
Pavel Feldman
3f1cb7b8e6
chore: only restart esm on Node 16+ (#12955) 2022-03-25 08:44:42 -07:00
Pavel Feldman
81d412216a
fix: list files when config writes to output (#13023) 2022-03-25 08:44:27 -07:00
Pavel Feldman
07c1a27732
chore(deps): prepare deps for monorepo (#13057) 2022-03-25 08:43:29 -07:00
github-actions[bot]
7a67c6d264
feat(webkit): roll to r1621 (#13056) 2022-03-25 08:40:19 -07:00
github-actions[bot]
3573bb9b45
browser(chromium): roll to r984778 (#13063)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-25 11:29:34 +01:00
Pavel Feldman
71dd960fec
fix(watch): throttle / batch watch processing (#13054) 2022-03-24 17:38:03 -07:00
Ross Wollman
ddc2cd4a3e
test: mark flaky proxy tests (#13050) 2022-03-24 14:50:59 -07:00
Andrey Lushnikov
0243bb4920
docs: refresh CI docs (#13020)
- Travis CI docs are badly rotten. I recall there was a need to
  list all the custom apt packages in the `travis.yml`, and it's a
  hassle to maintain this list for us. I remove the whole section for now
  since we don't see lots of Travis CI usage among our clients.
- Refresh other bits

Fixes #12855
2022-03-24 14:08:32 -07:00
Diego Pino
f79fd3a5c2
browser(webkit): rebase to 03/16/22 (r291344) (#12978) 2022-03-24 13:43:02 -07:00
Max Schmitt
1797c5c249
chore(test-runner): support self signed certificate in webServer (#13032) 2022-03-24 17:30:52 +01:00
Max Schmitt
434a729396
docs(dotnet): add missing Docker image (#13043) 2022-03-24 16:58:21 +01:00
Max Schmitt
81050c406e
chore: fix snippets in release-notes (#13033) 2022-03-24 07:52:04 -07:00
github-actions[bot]
8f6df440d5
feat(firefox-beta): roll to r1320 (#13010) 2022-03-24 07:49:50 -07:00
github-actions[bot]
920df240d1
feat(firefox): roll to r1321 (#13017) 2022-03-24 07:49:27 -07:00
Yury Semikhatsky
136c4e10e6
Revert "chore: align setInputFiles in webkit with other browsers (#13011)" (#13021)
This reverts commit 7fe763c1fc.
2022-03-24 07:46:37 -07:00
Dmitry Gozman
91408f2c5e
fix(storageState): provide nice error message for storage state issues (#13019) 2022-03-24 07:33:51 -07:00
Dmitry Gozman
3688e74e3e
fix(list mode): print errors to stderr (#13016)
`--list` mode now prints any errors encountered during test collection,
for example syntax errors, to `stderr`.
2022-03-24 07:33:33 -07:00
Andrey Lushnikov
174225697a
devops: cancel primary_tests workflow jobs for stale PR commits (#13018) 2022-03-23 17:16:32 -07:00
Dmitry Gozman
418dc9ea5d
docs(parallel): tell about fully parallel mode (#13013) 2022-03-23 16:43:46 -07:00
Yury Semikhatsky
7fe763c1fc
chore: align setInputFiles in webkit with other browsers (#13011) 2022-03-23 16:07:47 -07:00
Dmitry Gozman
03b08c1ff9
docs(webServer): prefer url over port (#13008) 2022-03-23 16:07:30 -07:00
Andrey Lushnikov
e1700bd167
feat: use package.json directory as a default for outputDir (#12942)
This patch:
- starts using directory of `package.json` to resolve default
  output directory path
- starts using either `package.json` directory or configuration
  directory to resolve all relative paths

References #12970
2022-03-23 16:05:49 -07:00
Ross Wollman
39376cccd8
fix: allow unnamed cookies (#12991)
Fixes #12808.
2022-03-23 15:50:43 -07:00
dependabot[bot]
28b8c8d63a
chore(deps): bump node-forge in /tests-components/ct-react (#12958)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-23 14:08:16 -07:00
dependabot[bot]
3e3de0319c
chore(deps): bump node-forge in /tests-components/ct-vue-cli (#12957)
Bumps [node-forge](https://github.com/digitalbazaar/forge) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/digitalbazaar/forge/releases)
- [Changelog](https://github.com/digitalbazaar/forge/blob/main/CHANGELOG.md)
- [Commits](https://github.com/digitalbazaar/forge/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: node-forge
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-23 14:07:37 -07:00
Andrey Lushnikov
bbc1a4fea0
fix: print all missing libraries when used on unsupported linux distro (#12966)
This patch:
- Adds 3 new host platform types:
  * `generic-linux` and `generic-linux-arm64` for the unsupported
    linux distributions
  * `<unknown>` for non-supported OS versions
- Prints a warning when downloading Ubuntu browser builds on
  unsupported Linux distribution
- Makes sure launch doctor prints all missing shared libraries
  on unknown Linux distributions
- Also prints an `apt` command as an alternative to Playwright CLI
  dependency installation.
2022-03-23 14:06:14 -07:00
Andrey Lushnikov
4d41e51ee5
devops: use goma when compiling chromium (#12998) 2022-03-23 14:04:57 -07:00
github-actions[bot]
53b84541ab
feat(chromium): roll to r983172 (#12995)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-03-23 20:34:23 +01:00
github-actions[bot]
2d5762c842
feat(webkit): roll to r1620 (#12971) 2022-03-23 11:30:42 -07:00
Max Schmitt
b69d0566bb
chore: disable Chromium CertificateTransparencyComponentUpdater feature (#12992) 2022-03-23 19:14:22 +01:00
Yury Semikhatsky
463b4b1c0d
browser(firefox): do not send post data > 10Mb to the client (#12969) 2022-03-23 08:58:29 -07:00
Andrew Hayward
ab39cfcb18
docs: fixing example code in accessibility API docs (#12664)
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-03-23 11:50:35 +01:00