Commit Graph

917 Commits

Author SHA1 Message Date
Pavel Feldman
daa2f00bfb
chore: roll stable-test-runner to ToT (#11445) 2022-01-17 19:45:59 -08:00
Ross Wollman
33f32368e5
fix(test runner): dispatcher transformation of empty attachments (#11414) 2022-01-17 18:47:24 -08:00
Pavel Feldman
8ecf581b45
chore: focus by line should override only (#11427) 2022-01-16 08:47:09 -08:00
Yury Semikhatsky
cfb86a74fa
fix(webkit): filechooer interception after process swap (#11415) 2022-01-14 17:33:07 -08:00
Max Schmitt
fb22c859d6
chore: add browser like UA to browser fetcher (#11006)
Drive-by: unify all Playwright user agents across the board.

Co-authored-by: Andrey Lushnikov <lushnikov@chromium.org>
2022-01-14 02:46:17 -08:00
Dmitry Gozman
93a20ee419
test: add a failing test for filechooser after navigation (#11381) 2022-01-13 11:24:21 -08:00
Dmitry Gozman
9d5bf0e90d
fix(test runner): fixture teardown double error, testInfo.attach() (#11365)
- Use file path, not content to calculate the attachment hash.
- Always cleanup fixture from the list on teardown, to avoid reporting
  teardown error multiple times: from the test, and from the cleanup.
2022-01-13 10:38:47 -08:00
Andrey Lushnikov
bd837b5863
test: enable autowaiting test on webkit (#11343)
Fixes #11219
2022-01-12 01:52:58 -08:00
Dmitry Gozman
359d523ec3
fix(selectors): allow :scope with additional css (#11338) 2022-01-11 18:40:29 -08:00
Dmitry Gozman
4efb30999f
feat(request): show request context methods as steps (#11337) 2022-01-11 17:33:41 -08:00
Dmitry Gozman
d36ff8a96c
fix(test runner): remove test output for failures (#11308) 2022-01-10 13:22:09 -08:00
Dmitry Gozman
14fd837e94
fix(test runner): hide beforeAll/afterAll hooks from the reporter api (#11306)
This api is not ready yet.
2022-01-10 12:09:51 -08:00
Andrey Lushnikov
7b1fecc009
fix: default to en-US locale in all browsers in Playwright Test (#11133)
It makes sense to default to en-US by default across all our browsers in Playwright Test.

Fixes #11127
2022-01-10 08:37:55 -08:00
github-actions[bot]
d31f13468a
feat(webkit): roll to r1592 (#11261)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-01-10 05:02:07 -08:00
Andrey Lushnikov
5a325a5a1d
test(gardening): disable mp4 capabilities test on firefox (#11289)
Firefox is unhappy with our mp4 file and crashes / moves to faulty
state.

Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1697004
2022-01-10 03:56:50 -08:00
Pavel Feldman
dc07fa6da6
fix(locator.count): do not touch main workd when computing count (#11256) 2022-01-07 15:52:14 -08:00
Pavel Feldman
ee0ea82d46
test: improve click-during-navigation (#11252) 2022-01-07 12:12:24 -08:00
Yury Semikhatsky
37a97c4201
feat(tracing): capture network failures (#11237) 2022-01-07 11:22:01 -08:00
Dmitry Gozman
058f98d3dd
fix(test runner): revert error location from top frame (#11250)
This does not play nicely with some internal Playwright errors, so
it needs more tweaks.
2022-01-07 11:06:47 -08:00
Pavel Feldman
f0269e7144
test: gardening (#11235) 2022-01-07 09:11:54 -08:00
Pavel Feldman
eaf2507ec1
test(webkit): add a failing test for #11219 (#11233) 2022-01-06 17:13:55 -08:00
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
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
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
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
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
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
Dmitry Gozman
0514ecc1af
test: mark trace-viewer tests as slow, unflake resource order (#11070) 2021-12-22 11:17:43 -08:00
Dmitry Gozman
af153b9826
test: unflake some websocket tests (#11069) 2021-12-22 11:17:34 -08:00
Andrey Lushnikov
1ee2d01f1c
test: unflake page-click.spec.ts test (#11050) 2021-12-21 17:31:13 -08:00
Dmitry Gozman
f5304e3bda
fix(fixtures): await fixture teardown when shutting down the worker (#11033) 2021-12-20 16:19:21 -08:00