Commit Graph

2591 Commits

Author SHA1 Message Date
Max Schmitt
421872f130
test: rewrite 'should fulfill json' test (#23735) 2023-06-15 18:46:19 +02:00
Yury Semikhatsky
b032e10973
chore: roll stable test runner to jun-15-2023 (#23722) 2023-06-14 18:41:42 -07:00
Yury Semikhatsky
77d322028c
feat(blob): zip .jsonl report files (#23720)
For linux tests without tracing blob-report-1.zip takes 19M, while
unpacked size is 228 MB. That size is counted for GitHub artifact
billing:

<img width="434" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/5bc32511-6686-4581-a348-acb6a54cd99b">

We zip individual .jsonl reports so that they still have unique names
and can be easily uploaded into the same artifacts directory without
name collisions.
2023-06-14 17:10:39 -07:00
Andrey Lushnikov
3c0fab489b
chore: miscellaneous trace viewer fixes (#23695)
- properly annotate continued requests
- nest `attach` steps inside the related `expect` step
- fix primary-id-to-non-primary-id mapping
- make sure images in trace are not draggable

Fixes #23693

---------

Signed-off-by: Andrey Lushnikov <aslushnikov@gmail.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-06-14 09:37:19 -07:00
Max Schmitt
9e636687ea
chore: add more logging for browser install process (#23675) 2023-06-14 15:33:06 +02:00
Dmitry Gozman
5b2e8a6a7a
chore: optional root for generateSelector (#23692) 2023-06-13 21:25:39 -07:00
Dmitry Gozman
c80a23842b
fix(css): relative-to-scope selectors work (#23665)
Chained selectors where the second part starts with a scope did not work
before:

```ts
page.locator('div').locator(':scope + span')
page.locator('div >> +span')
```
2023-06-13 10:27:25 -07:00
Dmitry Gozman
dd417d83d9
fix(locators): escape >> inside a regular expression (#23631)
To avoid selector being parsed as a chain.

Fixes #23540.
2023-06-12 10:34:37 -07:00
Yury Semikhatsky
dd9a49690b
test: speculative fix for reporter-blob (#23630) 2023-06-09 17:16:45 -07:00
Yury Semikhatsky
abdfe264fa
chore: run html reporter tests with merged report (#23626) 2023-06-09 15:41:15 -07:00
Yury Semikhatsky
400c7cd529
fix: serialize attachment to base64 in tele reporter (#23590) 2023-06-09 11:52:18 -07:00
Dmitry Gozman
734705e9b3
chore: elementHandle getters implemented through Frame (#23557)
This is a step towards not using handles for locator operations.
2023-06-09 07:18:13 -07:00
Sander
c9cedc78b1
chore(ct): inline reporter in ci (#23608) 2023-06-08 16:23:59 -07:00
Dmitry Gozman
11659ceb73
fix(role): handle display:contents elements (#23607)
Fixes #23521.
2023-06-08 16:00:48 -07:00
Dmitry Gozman
5cfd6d9fe9
fix(cr network): emit sw-handled requests when routing is enabled (#23589)
Previously, such requests were skipped because they never receive
`Fetch.requestPaused` as there was no real network.

Also cleanup some redundant tests and move them from chromium-only file.

Fixes #23424.
2023-06-08 10:33:28 -07:00
Yury Semikhatsky
ded4a294f4
fix(merge): populate TestResult.stdout/stderr when merging (#23587) 2023-06-07 23:00:57 -07:00
Yury Semikhatsky
843034d83d
chore: roll stable test runner to 1.35.0-alpha-jun-7-2023 (#23585)
This fixes following error in the merged reports:

```
(index):9825 TypeError: Cannot read properties of null (reading 'toFixed')
    at msToString ((index):18917:15)
    at TestFilesView ((index):19373:9)
    at Uh ((index):9372:7)
    at kj ((index):10444:7)
    at Uk ((index):12508:86)
    at Tk ((index):12134:11)
```
2023-06-07 15:54:14 -07:00
Dmitry Gozman
4f8680f7a3
fix(pause): revert timeouts after pause (#23578)
Fixes #23523.
2023-06-07 12:30:10 -07:00
Andrey Lushnikov
2e327c9d0c
fix: miscellaneous improvements for tracing UI (#23558)
- feat(tracing): mark API requests with "API" label
- feat(tracing): do not attribute any resources to `route.` API calls;
  otherwise, network traffic might get inside the `route.` actions.
- fix(tracing): map actionIds from primary contexts to actionIds from
  non-primary contexts
- fix(tracing): show leading `/` in URL path in network panel

This is a result of a pair-programming session with @pavelfeldman
2023-06-06 17:38:44 -07:00
Andrey Lushnikov
0f4090472c
feat: add maskColor option to the toHaveScreenshot method (#23555) 2023-06-06 17:15:55 -07:00
Pavel Feldman
7579572688
chore: unflake the network status test (#23551) 2023-06-06 16:55:53 -07:00
Yury Semikhatsky
874f4525b4
fix(merger): total time is sum of shard total times (#23534) 2023-06-05 19:10:41 -07:00
Yury Semikhatsky
ceaa29cec1
chore: clear message for no reports (#23492) 2023-06-05 17:20:54 -07:00
Pavel Feldman
eacfff8127
chore: make trace viewer work over http (#23531) 2023-06-05 16:30:30 -07:00
Dmitry Gozman
6b687b6d69
fix(toHaveScreenshot): attach newly created missing expectations (#23528)
Fixes #23090.
2023-06-05 14:57:06 -07:00
Pavel Feldman
2200892ac3
chore: unmute the console flush test (#23525)
Closes https://github.com/microsoft/playwright/issues/23107
2023-06-05 12:19:25 -07:00
Dmitry Gozman
b518d1f6da
chore: update error message when using wrong cli (#23512)
Now recommends uninstalling other packages. Fixes #23314.

Example messages:

```
Please install @playwright/test package before running "npx playwright show-report"
  npm uninstall playwright playwright-firefox
  npm install -D @playwright/test
```

```
Please install @playwright/test package before running "yarn playwright show-report"
  yarn remove playwright playwright-chromium playwright-firefox playwright-webkit
  yarn add -D @playwright/test
```

```
Please install @playwright/test package before running "pnpm exec playwright show-report"
  pnpm remove playwright
  pnpm add -D @playwright/test
```
2023-06-05 09:51:08 -07:00
Max Schmitt
75971af55b
feat(cli): introduce npx playwright uninstall (#23128)
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2023-06-05 18:50:21 +02:00
Kristo Jorgenson
d5d155df1f
fix(typescript): allow directory imports (#23254)
This updates previous work in #22887 to align more fully with
`--moduleResolution=bundler`, allowing index files to be imported with
the /index extension

---------

Signed-off-by: Kristo Jorgenson <kristojorg@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2023-06-05 08:58:25 -07:00
Yury Semikhatsky
9cd49d5dd5
test: unflake "should stop tracing on requestContext.dispose()" (#23489)
Use Chromium instead of Firefox as it navigates faster and remove
timeout from the slow request handler, just make it hang.

Fixes #23116
2023-06-02 16:37:50 -07:00
Dmitry Gozman
e4a1273afa
test: enable user agent override for download in Chromium (#23479)
Fixes #22843.
2023-06-02 15:02:54 -07:00
Pavel Feldman
5a14619bab
chore: render route markers in the trace network panel (#23476)
Fixes https://github.com/microsoft/playwright/issues/23040


![net](https://github.com/microsoft/playwright/assets/883973/5191163e-63f9-4999-9197-d10dcd09a665)
2023-06-02 13:00:27 -07:00
Max Schmitt
3c2a8fa306
chore: enable no-floating-promises ESLint rule for tests (#23376)
https://github.com/microsoft/playwright/issues/23339
2023-06-02 21:59:12 +02:00
Max Schmitt
af893a1019
chore: inherit apiRequestContext timeout from actionTimeout (#23481)
Fixes https://github.com/microsoft/playwright/issues/23344
2023-06-02 21:36:09 +02:00
Max Schmitt
b21c81d344
devops: add bot for Chromium --headless=new (#23440)
https://github.com/microsoft/playwright/issues/23389
2023-06-02 20:40:12 +02:00
Max Schmitt
a97bdd0016
chore: update typescript to 5.1.3 (#23461)
https://devblogs.microsoft.com/typescript/announcing-typescript-5-1/
2023-06-02 18:57:09 +02:00
Dmitry Gozman
835f14d7c9
fix(pause): ignore page.pause on the server (#23417)
Fixes #23051.
2023-06-02 08:32:30 -07:00
Dmitry Gozman
1d5add6d99
test: fix should not fulfill with redirect status (#23459) 2023-06-01 23:11:03 -07:00
Pavel Feldman
d1666d2dde
chore: include test-end-screenshot in a trace (#23457)
Fixes https://github.com/microsoft/playwright/issues/23222
2023-06-01 20:29:32 -07:00
Pavel Feldman
96b2247e28
chore: allow marking scripts as external for transform (#23449)
Fixes https://github.com/microsoft/playwright/issues/22874
2023-06-01 20:28:49 -07:00
Dmitry Gozman
14a1eaa474
chore: add Playwright to attribution (#23447)
This makes it easier to plumb all kinds of options around.
2023-06-01 17:54:43 -07:00
Pavel Feldman
84942aa992
chore: render successful toPass as such (#23411)
Fixes https://github.com/microsoft/playwright/issues/23302
2023-06-01 13:22:08 -07:00
Dmitry Gozman
5d5314e006
test: make sure trace is recorded for custom fixtures (#23418)
References #23220.
2023-05-31 21:50:20 -07:00
Max Schmitt
5701ff1e9b
chore: do not always return 200 on component testing network requests (#23408)
Fixes https://github.com/microsoft/playwright/issues/23364

See here about their AppTypes:
https://vitejs.dev/config/shared-options.html#apptype
2023-06-01 01:33:48 +02:00
Dmitry Gozman
6bb5c0a549
fix: make evaluate not wait for scheduled navigations (#23402)
Fixes #23141.
2023-05-31 14:08:44 -07:00
Dmitry Gozman
2505d48b32
test: skip and unflake tests (#23399)
- `should respect tracesDir and name` does not work with service mode;
- `isVisible during navigation should not throw` had a short timeout.
2023-05-31 10:52:29 -07:00
João Neves
7e6e5f0706
feat: Support React forwards refs and memo (#23262)
This PR fixes the react selector behavior to support components that are
wrapped by the memo or forwardRef React builtin functions.

Previously these components couldn't be selected. This PR fixes that
behavior, enabling selecting those components.

Current behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> undefined
```

Fixed behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> <div id ="foo_component" />
```
2023-05-30 17:14:47 -07:00
Pavel Feldman
7ad03027fb
chore: remove output dir before each test (#23380) 2023-05-30 16:03:50 -07:00
Dmitry Gozman
6db6498565
chore: replace sigint handler per browser with a single one (#23317)
Otherwise, multiple sigint handlers (one from each browser) would try to
`process.exit(130)` each.
2023-05-30 13:54:04 -07:00
Max Schmitt
2710fd8d6f
fix: should be able to upload multiple large files (#23360)
Fixes https://github.com/microsoft/playwright/issues/23258
2023-05-30 18:41:09 +02:00