Commit Graph

2893 Commits

Author SHA1 Message Date
Max Schmitt
5f0d91a42c
test: add test for multipart keeping order (#27787)
Test for https://github.com/microsoft/playwright/issues/27720
2023-10-25 19:33:00 +02:00
Pavel Feldman
7de0ccd36e
chore: support await using for close() and dispose() (#27766)
This change assumes that the user has Node 18 with Symbol.dispose
available.

Fixes https://github.com/microsoft/playwright/issues/27141
2023-10-24 12:25:53 -07:00
Dmitry Gozman
c8134bca5d
feat(html): show top-level errors (#27763)
Drive-by:
- extract `TestErrorView`;
- replace `data-test-id` with `data-testid` and `getByTestId()`.

---

<img width="1001" alt="top-level errors in html report"
src="https://github.com/microsoft/playwright/assets/9881434/2d6c0c52-8df1-46a9-b3fd-06ddc6f16796">
2023-10-24 09:35:07 -07:00
Dmitry Gozman
210168e36d
chore(test runner): remove fake skipped test results (#27762)
Fixes #27455.
2023-10-24 09:31:30 -07:00
Max Schmitt
fe7847b126
fix: require JSX inside PWT with pnpm (#27744)
Fixes https://github.com/microsoft/playwright/issues/27285
2023-10-23 22:48:12 +02:00
Yury Semikhatsky
5e51a734e7
fix: interrupt request.allHeaders()/response() on page.close() (#27695)
Reference https://github.com/microsoft/playwright/issues/27227
2023-10-23 12:45:35 -07:00
Pavel Feldman
5752a28f87
chore: make tests strict (1) (#27731) 2023-10-23 09:31:30 -07:00
Max Schmitt
f48861ddee
fix(inspector): highlight xpath/css locators without engine prefix (#27742)
Motivation: As of today when a user inspects a Locator which is a xpath,
it won't work if the user has not prefixed it with `xpath=` because we
internally compare the given with the generated locator.

Works: `locator('xpath=//div[contains(@class, "foo")]')`
Does not work: `locator('//div[contains(@class, "foo")]')`

Relates
https://github.com/microsoft/playwright/issues/27707#issue-1952360264
Fixes
https://github.com/microsoft/playwright-dotnet/issues/2718#issuecomment-1771073816

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-10-23 18:23:28 +02:00
Dmitry Gozman
b8678ef902
chore(test runner): simplify some dispatcher logic (#27732)
- remove `onlyStartedTests` in favor of explicit branch with comments;
- produce one "test not found" error per test instead of a single large
error;
- extract `_failTestWithErrors` from `_massSkipTestsFromRemaining`.
2023-10-23 09:15:13 -07:00
Dmitry Gozman
85112be25c
fix(test runner): properly handle uncaught errors in test.fail() (#27734)
Before this fix, unhandled error during test.fail():
- marks this test as "interrupted";
- fails next test in the file with "fatal error".

After this fix:
- marks this test as "failed as expected";
- restarts worker for the next test.
2023-10-23 09:14:31 -07:00
Max Schmitt
6d7d37061d
fix(recorder): Locator picker had wrong initial language in language bindings (#27706)
**Description**

When a language port was using Inspector with the "Locator Picker"
feature, it only recognised JavaScript as a language by default. As a
workaround the user was able to click record, interact with the page and
then the language would be correctly used -> csharp e.g. would work in
the "Locator Picker".

**Why?**

Our language bindings are setting `PW_LANG_NAME=<sdkLanguage>` env var
-> good. Our recorder harness also uses this along its internal state
here:


b9b289b641/packages/playwright-core/src/server/recorder.ts (L369)

and it gets used here (no parameter means: we use the first language
aka. primary language):


b9b289b641/packages/playwright-core/src/server/recorder.ts (L95)

The only issue is that the Inspector frontend in the beginning does not
know which language it should use and pass over to the server side, it
then falls back to JavaScript.

**Proposed fix**

Instead of passing it over from the frontend to the server side, we just
always use it from the server side, aka. "currentLanguage". When the
user switches languages in the frontend, "currentLanguage" already gets
updated properly via the "fileChanged" event.

https://github.com/microsoft/playwright-dotnet/issues/2718

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-10-22 13:02:14 +02:00
Dmitry Gozman
d1d5fc67dc
fix(recorder): show action point in main frame only (#27719) 2023-10-20 20:58:09 -07:00
Dmitry Gozman
d67515f6c1
chore(test runner): do not produce some of the fake skipped test results (#27730) 2023-10-20 17:01:46 -07:00
Sander
27daa5e7b1
fix(ct): solid render array as child (#27715) 2023-10-20 11:44:30 -07:00
Dmitry Gozman
6fe31ab52c
feat: support alternative quotes in js parseLocator() (#27718)
Fixes #27707.
2023-10-20 08:42:29 -07:00
Pavel Feldman
f46c889449
chore: fix total progress reporting w/ deps (#27716) 2023-10-19 20:07:47 -07:00
Pavel Feldman
d003945a7b
chore(ui): do not watch output folders (#27694) 2023-10-19 15:53:57 -07:00
Dmitry Gozman
6e62a11643
fix(trace): EPERM on windows (#27693)
When merging trace files, we sometimes left open read streams from the
zip, which prevents it from being removed.

Fixes #27286.
2023-10-19 11:14:17 -07:00
Max Schmitt
b1325c9208
fix(keyboard): event order for Escape key (#27711)
This test was failing in Chromium before this change.

Caused by
40d5e3a3c9/packages/playwright-core/src/server/chromium/crInput.ts (L54-L55)

which messes up the order of the protocol calls.

Fixes https://github.com/microsoft/playwright/issues/27709.
2023-10-19 18:18:29 +02:00
Yury Semikhatsky
bd58c0d5d2
fix: preserve lastModified timestamp in setInputFiles (#27671)
Fixes #27452
2023-10-18 14:05:09 -07:00
Sander
562938b271
fix(ct): baseURL playwright config (#27689)
closes: https://github.com/microsoft/playwright/issues/27627
2023-10-18 13:53:58 -07:00
Dmitry Gozman
fd82b2b3fa
feat(json report): add expected/unexpected/skipped/flaky stats (#27685)
Fixes #27498.
2023-10-18 12:55:31 -07:00
Playwright Service
5262e5ab35
feat(chromium-tip-of-tree): roll to r1159 (#27605) 2023-10-17 22:41:23 +02:00
Pavel Feldman
d4296dbff4
chore: break dowload.path() to throw (#27662) 2023-10-17 12:56:56 -07:00
Max Schmitt
0a49c3dbb9
chore: bump @babel dependencies (#27632)
This fixes:

```
Run npm audit --omit dev
# npm audit report

@babel/traverse  <7.23.2
Severity: critical
Babel vulnerable to arbitrary code execution when compiling specifically crafted malicious code - https://github.com/advisories/GHSA-[6](https://github.com/microsoft/playwright/actions/runs/6535308689/job/17744452034?pr=27631#step:10:7)[7](https://github.com/microsoft/playwright/actions/runs/6535308689/job/17744452034?pr=27631#step:10:8)hx-6x53-jw[9](https://github.com/microsoft/playwright/actions/runs/6535308689/job/17744452034?pr=27631#step:10:10)2
fix available via `npm audit fix`
node_modules/@babel/traverse

1 critical severity vulnerability

To address all issues, run:
  npm audit fix
Error: Process completed with exit code 1.
```
2023-10-17 20:52:41 +02:00
Pavel Feldman
a54dbfdadf
chore: plumb the target close reason when test fails (#27640) 2023-10-16 20:32:13 -07:00
Yury Semikhatsky
4e845e7b1d
fix(fetch): JSON.stringify on client (#27644)
Fixes https://github.com/microsoft/playwright/issues/27602
2023-10-16 16:33:49 -07:00
Dmitry Gozman
e8b4c03e54
fix(chromium): do not cancel downloads when intercepting (#27638)
Fixes #27575.
2023-10-16 15:12:52 -07:00
Max Schmitt
fd2fbe9d2f
fix: merge{Tests,Expects} via ESM imports (#27630)
Backport to 1.39.X?

Fixes https://github.com/microsoft/playwright/issues/27617
2023-10-17 00:09:44 +02:00
Yury Semikhatsky
b2dc0d2fbd
test: unskip "should keep selection in multiple pages" (#27611)
https://github.com/microsoft/playwright/pull/27609 fixed the
functionality in WebKit.

Fixes https://github.com/microsoft/playwright/issues/27475
2023-10-16 09:47:05 -07:00
Dmitry Gozman
fc32ca676b
feat: check client version on the server (#27585) 2023-10-13 21:02:30 -07:00
Yury Semikhatsky
80c408023e
test: unflake "should fail without credentials" (#27606)
Speculative fix. The test marked as failed => we reuse the browser
without closing the context.
2023-10-13 14:15:12 -07:00
Yury Semikhatsky
d6adfee7c0
test: update expectation on windows for "should reject if launched br… (#27603)
…owser fails immediately"

The test has been failing on Windows since
f212fd1a83
2023-10-13 14:02:55 -07:00
Yury Semikhatsky
bc59565d77
fix(webkit): support clipboard.readText (#27581)
Reference #27475
2023-10-13 09:10:35 -07:00
Pavel Feldman
f8a30fb726 chore: follow up to target close message 2023-10-12 14:58:19 -07:00
Yury Semikhatsky
9d76c09ddb
test: preserve selection when switching pages (#27578)
Reference https://github.com/microsoft/playwright/issues/27475
2023-10-12 12:52:06 -07:00
Pavel Feldman
f212fd1a83
chore: unify target closed errors (#27540) 2023-10-12 11:05:34 -07:00
Pavel Feldman
393bd36e0a
chore: composed->merge (#27555) 2023-10-11 13:56:27 -07:00
Dmitry Gozman
3a43aaa700
chore: roll stable-test-runner to 1.39.0-beta-1697048429000 (#27553) 2023-10-11 13:42:04 -07:00
Dmitry Gozman
a5be8ce86a
test: unflake some more tests (#27546) 2023-10-11 10:34:11 -07:00
Dmitry Gozman
d05c865389
test: unflake a few tests (#27519) 2023-10-10 09:14:58 -07:00
Pavel Feldman
fd6bf8aa2c
chrome: improve error messages on vscode side (#27521) 2023-10-09 19:55:24 -07:00
Pavel Feldman
11a4b3f7f5
chore: remove parsed stack trace (#27496) 2023-10-09 17:04:16 -07:00
Dmitry Gozman
40ba5ebc1d
test: unflake a launcher test in driver mode (#27518) 2023-10-09 14:52:05 -07:00
Dmitry Gozman
e8523abea5
test: mark some --headless=new tests as fixme (#27516) 2023-10-09 14:07:22 -07:00
Pavel Feldman
b807c974c3
chore: allow passing path to property in toHaveJSProperty (#27495)
Fixes https://github.com/microsoft/playwright/issues/27487
2023-10-06 15:47:07 -07:00
Dmitry Gozman
0717b386f9
test: disable some failing tests (#27463) 2023-10-05 15:00:08 -07:00
Pavel Feldman
70dbb9d83a
feat(trace): allow navigating from error to source (#27464) 2023-10-05 14:59:59 -07:00
Jim Hays
dcc8dcca73
Fix various typos (Fixes #27396) (#27391)
Fixes https://github.com/microsoft/playwright/issues/27396
2023-10-04 19:56:42 -07:00
Yury Semikhatsky
0eb7a09967
test: screenshot of css box-shadow (#27438)
Reference #21620
2023-10-04 17:26:01 -07:00