Commit Graph

6728 Commits

Author SHA1 Message Date
Pavel Feldman
e1772f15b5
fix(click): don't fail on stale context while clicking (#11228) 2022-01-06 15:15:11 -08:00
Dmitry Gozman
8e75dbffaa
fix(errors): waitForEvent/Request/Response should point to the api call (#11229) 2022-01-06 14:47:52 -08:00
Yury Semikhatsky
d629fe57ab
docs: make toBeOK async, expose in java (#11227) 2022-01-06 14:40:44 -08:00
Max Schmitt
d49bf00183
docs: enable BrowserType.connect in .NET (#10985) 2022-01-06 15:26:33 -05:00
Pavel Feldman
5fa7d19f1c
feat(html): render inline attachments as monospace (#11214) 2022-01-06 09:29:55 -08:00
Pavel Feldman
373042ed89
chore: don't allow importing @playwright/test twice (#11218) 2022-01-06 09:29:05 -08:00
Yury Semikhatsky
2496355665
test: no crash in showDirectoryPicker (#11213) 2022-01-06 09:08:13 -08:00
Yury Semikhatsky
8b580110b7
test: mark video & audio test as passing on mac12 (#11216) 2022-01-06 09:08:00 -08:00
Yury Semikhatsky
2cc4dfc96f
test: set-cookie response header after route.fulfill (#11044) 2022-01-05 17:35:26 -08:00
Yury Semikhatsky
a96cb5aff5
test: mark test as failing until next wk roll (#11215) 2022-01-05 17:06:31 -08:00
Dmitry Gozman
be896848bb
fix(selectors): properly determine visibility of display:contents (#11212) 2022-01-05 16:54:15 -08:00
Dmitry Gozman
3ecac56cc0
fix(test runner): testInfo.attach api review changes (#11211)
Remove overload, require name, merge options.
2022-01-05 16:39:33 -08:00
Diego Pino
1857a16381
browser(webkit): roll to 23/12/21 (#11105) 2022-01-05 15:56:22 -08:00
Dmitry Gozman
f77c874e8a
feat(test runner): make _extendTest experimental (#11210)
Hidden from types and docs.
2022-01-05 15:54:00 -08:00
Pavel Feldman
913c9ab59f
test: add a failing test for #11202 (#11206) 2022-01-05 15:53:53 -08:00
Dmitry Gozman
ccc61e31ea
chore(test runner): preparation for TestRunner api (#11209) 2022-01-05 15:49:01 -08:00
Dmitry Gozman
3839917eb6
chore(test runner): move config loading to runner (#11186)
In preparation for the TestRunner api.
2022-01-05 13:44:29 -08:00
Yury Semikhatsky
576a9c1ae3
docs(java): api testing guide (#11185) 2022-01-05 13:02:46 -08:00
Ross Wollman
3a4b7fa792
fix(html reporter): skip img bits with non-images (#11188) 2022-01-05 09:04:08 -08:00
Pavel Feldman
328f3e265e
test: add a failing canvas screenshot test (#11180) 2022-01-04 17:41:04 -08:00
Dmitry Gozman
1dbbcd1b37
fix(codegen): polyfill CSS.escape (#11181)
Some site (for example, fb.com) delete CSS.escape, so we should use the polyfill.
2022-01-04 17:24:53 -08:00
Dmitry Gozman
16a779a5ff
fix(test runner): show codeframe and location from the error top stack frame (#11179)
Previously, reporter would look for a stack frame directly in the test file.
Often times, that is not a top stack frame, especially when the test uses
some helper functions.

This changes error snippets and locations to use the top frame. When top
frame does not match the test file, we additionally show the location
to avoid confusion:

```
  1) a.spec.ts:7:7 › foobar ========================================================================

    Error: oh my

       at helper.ts:5

      3 |
      4 |       export function ohMy() {
    > 5 |         throw new Error('oh my');
        |               ^
      6 |       }
      7 |

        at ohMy (.../reporter-base-should-print-codeframe-from-a-helper/helper.ts:5:15)
        at .../reporter-base-should-print-codeframe-from-a-helper/a.spec.ts:8:9
        at FixtureRunner.resolveParametersAndRunHookOrTest (.../src/fixtures.ts:281:12)
```
2022-01-04 16:00:55 -08:00
Dmitry Gozman
9fcb8ace4e
test: reenable Chromium Windows cookies test (#11176) 2022-01-04 12:14:35 -08:00
Andrey Lushnikov
13dd41c2e3
devops: fix self-hosted runner stack collection (#11169)
In case of self-hosted github runners, it's much easier to checkout
under `playwright-internal` folder name instead of a default
`playwright` name. This confuses our stack collection.

This patch makes it generic.
2022-01-04 06:23:28 -08:00
github-actions[bot]
0332b2a7a9
feat(chromium): roll to r954870 (#11163)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-04 04:54:59 -08:00
Pavel Feldman
7bfa6f9b5f
feat(html): group similar items in the report (#11160) 2022-01-03 21:17:17 -08:00
Dmitry Gozman
976dedda45
feat(input): restore modified layout shift check (#11032)
This changes previous layout shift attempt (see #9546)
to account for more valid usecases:
- On the first event that is intercepted we enforce the hit target. This
  is similar to the current mode that checks hit target before the action,
  but is better timed.
- On subsequent events we assume that everything is fine. This covers more
  scenarios like react rerender, glass pane on mousedown, detach on mouseup.

This check is enabled by default, with `process.env.PLAYWRIGHT_NO_LAYOUT_SHIFT_CHECK`
to opt out.
2022-01-03 17:46:04 -08:00
Pavel Feldman
a0aeaeb929
test: expose repeatEachIndex (#11158) 2022-01-03 17:29:54 -08:00
Andrey Lushnikov
e8263b8f48
test: skip fill tests for android (#11155)
This will drastically speedup our Android bots and free compute faster.
2022-01-03 15:02:31 -08:00
Pavel Feldman
38801a3b85
test: add a test for leading and trailing spaces (#11156) 2022-01-03 12:51:58 -08:00
github-actions[bot]
4106274f6b
browser(chromium): roll to r954870 (#11151)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-03 13:18:00 -05:00
github-actions[bot]
c0201f26b5
feat(chromium): roll to r954674 (#11147)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-03 09:48:35 -08:00
github-actions[bot]
11e5b9bb9b
browser(chromium): roll to r954674 (#11144)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-31 05:58:01 -07:00
github-actions[bot]
a090907305
feat(firefox-beta): roll to r1313 (#11140)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-30 14:59:39 -08:00
Andrey Lushnikov
a28935dcb8
browser(ff-beta): roll Firefox beta to 96.0b11 (#11139) 2021-12-29 21:18:43 -08:00
Andrey Lushnikov
237b4d5821
devops: download new MacOS 12 WebKit builds (#11066)
Drive-by: simplify management of executable paths since they are
the same for each platform.

References #11031
2021-12-29 20:40:45 -08:00
Andrey Lushnikov
056d310e20
feat(ffmpeg): roll ffmpeg to 1007 (#11081)
This build:
- Includes a native build for Mac Arm64
- Changes executable name for the linux arm64 build
2021-12-29 20:10:29 -08:00
Andrey Lushnikov
c27a27d561
devops: move docker tests to internal (#11137)
We'll re-use M1 hardware to run Ubuntu arm64 smoke tests.
2021-12-29 19:14:15 -08:00
Andrey Lushnikov
b6c2b32b53
test: introduce #smoke tests (#11135)
This patch introduces 109 "#smoke" tests - a subset of tests that makes
sure that basic Playwright functionality works. This set is loosely
defined; feel free to add/remove tests to the set. The only goal is to
keep this set minimal & fast to run.

I tried to pick tests so that various parts of Playwright functionality
are exercised.
2021-12-29 18:51:28 -08:00
github-actions[bot]
d43f78f384
feat(firefox): roll to r1312 (#11124)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2021-12-29 17:47:32 -08:00
github-actions[bot]
450c8086b9
feat(firefox-beta): roll to r1312 (#11125)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-29 16:54:58 -08:00
Andrey Lushnikov
fba29aa319
browser(firefox): fix HTTP->HTTPS fallback for refused connection (#11123)
In this case, there's no protocol version that we can extract for
nsIHttpChannel.

The code that does the redirect is here: 7f3d9fce41/docshell/base/nsDocShell.cpp (L6079-L6095)

To trigger this codepath, we'd need to run test inside a special
docker container that has https server running on the 443 port. We lack
infrastructure for this kind of tests (but it'll be cool to have it).

References #11118
2021-12-28 12:23:53 -08:00
Ross Wollman
dadb5cbc30
fix(html reporter): fix too much strikethrough in diffs (#11115)
Textual snapshot diffs were previously broken in the HTML Report. The strikethrough'd text extended beyond the intended region.

HTML Report Before: 
<img width="693" alt="Screen Shot 2021-12-27 at 4 43 35 PM" src="https://user-images.githubusercontent.com/11915034/147518750-a60f9002-6eed-48a1-a412-20fabd076fa6.png">

HTML Report After:
<img width="206" alt="Screen Shot 2021-12-27 at 4 48 37 PM" src="https://user-images.githubusercontent.com/11915034/147518762-19a4c8f9-ccc3-4a3c-a962-5a42edc6fc5d.png">

This now matches what's expected and shown in the terminal (which has always been correct):

<img width="1384" alt="Screen Shot 2021-12-27 at 4 36 29 PM" src="https://user-images.githubusercontent.com/11915034/147518799-f538259e-5a45-4d6f-916c-a12ccb620c5b.png">

NB: This MR is a workaround, but not a root cause fix. It works, but I never fully got to the root cause so a bug upstream may be required. It's unclear whether it's (1) in [`colors`](https://www.npmjs.com/package/colors), (2) in [`ansi-to-html`](https://www.npmjs.com/package/ansi-to-html), or (3) Playwright's use of the two. Since the terminal output is correct, I suspect it is in `ansi-to-html`. For example:

```js
const colors = require("colors");
const Convert = require('ansi-to-html');
const convert = new Convert();

// original (strike incorrectly wraps everything in the HTML)
console.log(convert.toHtml(colors.strikethrough("crossed out") + ' ' + colors.red("red")))
// prints: <strike>crossed out <span style="color:#A00">red<span style="color:#FFF"></span></span></strike>

// workaround
console.log(convert.toHtml(colors.reset(colors.strikethrough("crossed out")) + ' ' + colors.red("red")))
// prints: <strike>crossed out</strike> <span style="color:#A00">red<span style="color:#FFF"></span></span>
```

Fixes #11116
2021-12-28 09:56:34 -08:00
github-actions[bot]
db47b3e392
feat(chromium): roll to r953978 (#11097)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-27 10:13:18 -07:00
github-actions[bot]
74da6240fd
browser(chromium): roll to r954117 (#11107)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-27 10:12:45 -07:00
github-actions[bot]
6358c9813d
browser(chromium): roll to r953978 (#11094)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-12-24 07:54:48 -07:00
Andrey Lushnikov
fdf750522a
devops: attempt to use ubuntu 18.04 for docker tests (#11093)
Folks on the internet claim 18.04 never runs out of disk space for them
for github actions.
2021-12-23 22:08:44 -08:00
spaniardmaximus
dbac5a5298
docs(selectors.md and locators.md): Fixed typos and added missing words (#11088) 2021-12-23 13:32:28 -08:00
Andrey Lushnikov
db227e1059
devops: attempt to free space before running docker tests (#11084)
Docker runs fail with "No space left on device" error.
This patch follows advice given here: https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173
2021-12-22 18:13:07 -08:00
Andrey Lushnikov
bc78faba70
devops: bring back channel installation sanity test inside docker (#11083)
This was regressed in https://github.com/microsoft/playwright/pull/11079/files
2021-12-22 16:54:41 -08:00