Commit Graph

902 Commits

Author SHA1 Message Date
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
Yury Semikhatsky
ea1948fabb
test: can open page with mp4 video (#11030) 2021-12-20 12:44:06 -08:00
Dmitry Gozman
e48231655f
chore: roll stable-test-runner to dec-18-2021 (#11008) 2021-12-18 10:12:35 -08:00
Dmitry Gozman
2d00836f0e
fix(test runner): show the location of afterAll timeout (#11007) 2021-12-18 09:32:41 -08:00
Dmitry Gozman
c9ba49936f
feat(reporters): show retry #x when running a test (#11003) 2021-12-17 21:07:04 -08:00
Pavel Feldman
8f98074fc8
chore: add blink-diff third party library (#10984) 2021-12-17 15:53:37 -08:00
Dmitry Gozman
b6aad54b9f
fix(test runner): test.setTimeout whould not break debugging (#11004)
We ignore test.setTimeout() when timeout is already zero for debugging.
2021-12-17 15:17:48 -08:00
Dmitry Gozman
f5780be41b
fix(list reporter): make sure that duration suffix survives truncation (#11002) 2021-12-17 13:08:02 -08:00
musou1500
7d39d345c2
fix(tracing): trace frame (#10846) 2021-12-17 10:43:19 -08:00
Dmitry Gozman
dd57843404
fix(inspector): do not show internal calls (#10982)
Also mark setDefault{Navigation,}Timeout as always internal.
2021-12-16 17:17:24 -08:00
Yury Semikhatsky
707befd6f7
fix(fetch): basic authentication without realm (#10979) 2021-12-16 13:40:52 -08:00
Yury Semikhatsky
921aa02ce4
feat(webkit): roll to r1588 (#10976) 2021-12-16 12:43:57 -08:00
Yury Semikhatsky
fee98947d6
test(tracing): skip test in ff and wk (#10955) 2021-12-15 17:40:34 -08:00
Andrey Lushnikov
2957b7b013
feat(firefox-beta): roll to r1310 (#10954) 2021-12-15 17:33:09 -08:00
Dmitry Gozman
192071d5bc
feat(test runner): save traces for beforeAll/afterAll hooks (#10950) 2021-12-15 16:06:10 -08:00
Yury Semikhatsky
230e0b7049
fix(wheel): throw on wheel access in mobile WebKit (#10946) 2021-12-15 11:57:28 -08:00