Commit Graph

874 Commits

Author SHA1 Message Date
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
github-actions[bot]
0b86fbde90
feat(chromium): roll to r950899 (#10930)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-12-15 11:23:01 -08:00
Yury Semikhatsky
ce225e50f4
test: lower screenshot count expectation (#10945) 2021-12-15 10:40:18 -08:00
Dmitry Gozman
0d54afab9c
feat(test runner): show beforeAll/afterAll hooks similar to tests (#10923)
Reporters now get notified about hooks start/end/steps.
2021-12-15 10:39:49 -08:00
Pavel Feldman
04e82ce71c
feat(api): make withText an option (#10922) 2021-12-14 15:37:31 -08:00
Dmitry Gozman
34b84841b0
chore(test runner): create TestResult instances lazily in dispatcher (#10921)
This prepares for beforeAll/afterAll hooks to be handled in the same way.
Since we do not know in advance whether a hook will run, we must create
TestResults lazily.
2021-12-14 14:10:56 -08:00
Dmitry Gozman
5c4ebdce54
fix(line reporter): clarify about retries when going over total counter (#10901) 2021-12-13 19:06:13 -08:00
Max Schmitt
40bd156173
test: add test for playing audio (#10890) 2021-12-13 15:02:06 -08:00
Yury Semikhatsky
a436cc8aa0
test: wait for screenshots to get into trace before stopping (#10891) 2021-12-13 14:37:44 -08:00
Dmitry Gozman
9491f6652d
fix(steps): do not show unnecessary steps for internal waitForEventInfo (#10889) 2021-12-13 13:32:53 -08:00
Joel Einbinder
c27491cd4d
feat(test-runner): shorten long output paths (#10523) 2021-12-13 10:56:03 -08:00
Joel Einbinder
7a02c52144
feat(test-runner): specific playwright types for expect (#10670) 2021-12-13 13:42:36 -05:00
Pavel Feldman
6521a6f3ab
chore: split html report into files (#10876) 2021-12-12 14:56:12 -08:00
musou1500
81ab6b3fde
fix(tracing): overwrite attr value specifies charset other than utf-8 (#10848) 2021-12-12 14:54:00 -08:00
Mateusz Burzyński
8b5e146b90
test(mouse): add a test for pointerdown event with custom button (#10697) 2021-12-12 10:01:45 -08:00
Yury Semikhatsky
aaa8b07770
chore(tracing): collect source names on server (#10862) 2021-12-10 14:07:22 -08:00
Ross Wollman
fde427d890
feat(proxy): unify local network proxy behavior (#10719)
When configuring a proxy, Chromium requires a magic tokens to get some
local network requests to go through the proxy. This has tripped up a
few users, so we make the behavior default to the expected: proxy
everything including the local requests. This matches the other vendors
as well.

NB: This can be disabled via
`PLAYWRIGHT_DISABLE_FORCED_CHROMIUM_PROXIED_LOOPBACK=1`

Supercedes: #8345
Fixes: #10631
2021-12-10 14:01:56 -08:00
Andrey Lushnikov
c0aecbfd57
test: add test for firefox proxy failure (#10853)
References #10095
2021-12-10 13:12:14 -08:00
Andrey Lushnikov
3c633f58f9
test: close runaway browser from headful tests (#10866) 2021-12-10 13:10:46 -08:00
Max Schmitt
0b120c7f03
fix: use HTTP/2.0 instead of h2 as Response.httpVersion (#10812) 2021-12-10 11:24:52 -08:00
Yury Semikhatsky
976af162b0
feat(tracing): pack sources to trace on the driver side (#10815) 2021-12-09 17:21:17 -08:00
Dmitry Gozman
a52c6219a7
fix(inspector): do not swallow keyup when not recording (#10842) 2021-12-09 17:15:38 -08:00
Dmitry Gozman
1d50db809d
fix(snapshot): render sandboxed iframes and svg iframes (#10835) 2021-12-09 17:10:31 -08:00
Pavel Feldman
b5933db279
feat(tsconfig): respect baseUrl and paths from tsconfig (#10525) 2021-12-08 22:43:00 -08:00
Yury Semikhatsky
df64c20a09
test: entire viewport is captured on hidpi (#10813) 2021-12-08 18:13:12 -08:00
Dmitry Gozman
4996e184bf
fix(electron): make recordVideo work (#10810) 2021-12-08 17:34:50 -08:00
Max Schmitt
a4e68dbac1
test: fix console-api tests when tracing was enabled (#10782) 2021-12-08 15:44:07 -08:00
Max Schmitt
aca350d17c
test: fix failing accessibility tests in msedge-dev (#10806) 2021-12-08 15:21:09 -08:00
Yury Semikhatsky
3272af9f96
test: mark "fill color input" test as dailing on wk windows (#10792) 2021-12-08 09:39:14 -08:00