Commit Graph

6450 Commits

Author SHA1 Message Date
Max Schmitt
85197e68c9
chore: support range requests in trace viewer http server (#10434) 2021-11-23 21:37:55 +01:00
Pavel Feldman
206a877cea
fix(trace-viewer): multiple iframe and UX fixes (#10486) 2021-11-23 11:36:18 -08:00
Max Schmitt
5a8010cf4f
fix: noncompliant Firefox User-Agents (#10492) 2021-11-23 18:56:22 +01:00
Ross Wollman
854f321532
feat(api): add explicit async testInfo.attach (#10121)
feat(api): add explicit async testInfo.attach

We add an explicit async API for attaching file paths (and Buffers) to
tests that can be awaited to help users ensure they are attaching files
that actually exist at both the time of the invocation and later when
reporters (like the HTML Reporter) run and package up test artifacts.

This is intended to help surface attachment issues as soon as possible
so you aren't silently left with a missing attachment
minutes/days/months later when you go to debug a suddenly breaking test
expecting an attachment to be there.

NB: The current implemntation incurs an extra file copy compared to
manipulating the raw attachments array. If users encounter performance
issues because of this, we can consider an option parameter that uses
rename under the hood instead of copy. However, that would need to be
used with care if the file were to be accessed later in the test.
2021-11-23 09:30:53 -08:00
github-actions[bot]
2d4982e052
feat(chromium): roll to r943925 (#10484)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-23 11:21:15 +01:00
Joel Einbinder
bd5ae9e0cb
fix(dotnet): correctly mark members as deprecated (#9977) 2021-11-23 03:00:12 -05:00
Joel Einbinder
9c1ff08186
test(chromium): ensure that arguments can be passed with spaces (#10057) 2021-11-23 02:59:56 -05:00
Joel Einbinder
0878548238
test(wheel): add test for scrolling while emulating mobile (#10224) 2021-11-23 02:59:32 -05:00
Joel Einbinder
6d3bb458f9
fix(firefox): round down mouse coordinates (#10483) 2021-11-23 02:55:32 -05:00
Dmitry Gozman
7d3672899f
fix(tracing): race in stopChunk (#10481)
Consider the following scenario:
- Tracing is started.
- API call is made (e.g. page.waitForResponse), almost finishes, and
  enters onAfterCall where it starts a snapshot.
- tracing.stopChunk is called, and waits for existing actions to finish.
  However, it does so by calling onAfterCall one more time.
- tracing.stopChunk removes instrumentation listener and returns
  to the client.
- Client starts zipping files.
- Original API call finishes the snapshot and saves it to the trace file.

This results in trace file being written to while the zip is still working.
2021-11-22 20:08:09 -08:00
Alister Scott
80235c47a5
docs(test-parameterize): fixed typo (#10392) 2021-11-22 20:38:48 +01:00
Joel Einbinder
d70e37de80
feat: locator.dragTo (#10287) 2021-11-22 20:27:26 +01:00
Joel Einbinder
06ab3c0fda
feat: consider fieldset and aria-disabled when checking if an element is enabled (#9927)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-11-22 20:25:06 +01:00
Pavel Feldman
daae8d4863
chore: open trace.playwright.dev (#10475) 2021-11-22 10:41:22 -08:00
Dmitry Gozman
e647f0420c
docs: add more references to TestInfo.retry (#10472) 2021-11-22 10:06:20 -08:00
Max Schmitt
eaee864b2c
docs: python assertion type fixes (#10465) 2021-11-22 18:39:10 +01:00
Max Schmitt
14471fd79f
chore: fix CLI --help when used in driver (#10412) 2021-11-22 18:34:22 +01:00
github-actions[bot]
25156f4608
browser(chromium): roll to r943925 (#10462)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-22 11:20:11 +01:00
github-actions[bot]
2290232339
feat(chromium): roll to r943346 (#10452)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-21 00:43:30 +01:00
Yury Semikhatsky
9c23a78c32
chore: throw instead of returning error from fetch (#10451) 2021-11-19 20:32:29 -08:00
Dmitry Gozman
fde2f6a77f
docs: separate doc for test timeouts (#10448) 2021-11-19 17:06:46 -08:00
Yury Semikhatsky
9fed8a9344
docs(api): redo request API for java (#10449) 2021-11-19 16:40:35 -08:00
Pavel Feldman
103b6121b8
fix(trace-viewer): provide hints on how to open trace statically (#10450) 2021-11-19 16:29:27 -08:00
Pavel Feldman
a73e6bbd0e
chore: drop wrapApiCall (2) (#10445) 2021-11-19 16:28:11 -08:00
Dmitry Gozman
4eaeb3b59c
docs: explain that beforeAll/afterAll run again in the new worker process (#10446) 2021-11-19 13:47:30 -08:00
Dmitry Gozman
0302e759df
feat(test runner): allow top-level test.fixme similar to test.skip (#10250)
```js
test.fixme('my test name', () => {});
```
2021-11-19 11:40:40 -08:00
Pavel Feldman
2a98800ac0
chore: drop wrapApiCall (1) (#10428) 2021-11-19 10:12:48 -08:00
Max Schmitt
e87b56a2e5
chore: verify supported Node.js version during runtime (#10406) 2021-11-19 19:05:17 +01:00
Max Schmitt
b8b0d7139c
chore: bump ESLint to version 8 (#10433) 2021-11-19 18:48:33 +01:00
github-actions[bot]
e76edef3e2
feat(webkit): roll to r1579 (#10409)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-11-19 11:11:27 +01:00
github-actions[bot]
f5df3f5f8a
browser(chromium): roll to r943346 (#10432)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-19 11:11:14 +01:00
Bennett Dams
0ff1ebf2f4
docs(test-fixtures): fix wrong comment for fixture example (#10350) 2021-11-19 10:22:28 +01:00
Pavel Feldman
b302152789
chore(zones): prepare to remove wrapApiCall, introduce zones (#10427) 2021-11-18 22:30:09 -08:00
Dmitry Gozman
19f739dec8
docs: update fixtures doc (#10426)
- Introduction
  - Built-in fixtures
  - Without fixtures
  - With fixtures
- Creating a fixture
- Using a fixture
- Overriding fixtures
- Worker-scoped fixtures
- Automatic fixtures
- Fixtures-options
2021-11-18 21:35:21 -08:00
Dmitry Gozman
d9f849fb14
feat(test runner): replace declare/define with "options" (#10293)
1. Fixtures defined in test.extend() can now have `{ option: true }` configuration that makes them overridable in the config. Options support all other properties of fixtures - value/function, scope, auto.
```
const test = base.extend<MyOptions>({
  foo: ['default', { option: true }],
});
```

2. test.declare() and project.define are removed.

3. project.use applies overrides to default option values and nothing else. Any test.extend() and test.use() calls take priority over config options.

Required user changes: if someone used to define fixture options with test.extend(), overriding them in config will stop working. The solution is to add `{ option: true }`.

```
// Old code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: 123,
  myFixture: ({ myOption }, use) => use(2 * myOption),
});

// New code
export const test = base.extend<{ myOption: number, myFixture: number }>({
  myOption: [123, { option: true }],
  myFixture: ({ myOption }, use) => use(2 * myOption),
});
```
2021-11-18 15:45:52 -08:00
divdavem
17a2454226
feat(cli): add --proxy-bypass option (#10181) 2021-11-18 15:41:16 -08:00
Nav-2d
82edd1f4b2
docs/test-configuration: Update code snippet (#10355) 2021-11-18 15:38:18 -08:00
Dmitry Gozman
c470080aec
test: move grid tests to installation-tests (#10418)
- Determine the actual chrome version.
- Download chromedriver.
- Run tests.
2021-11-18 15:32:09 -08:00
Andrey Lushnikov
5eba6d538f
docs: land 1.17 release notes (#10425) 2021-11-18 15:08:49 -08:00
Dmitry Gozman
8f43f4c98f
feat(serial): better errors from beforeAll (#10419)
When beforeAll hook times out or fails with an exception, we now
close the context and show a nice error.
2021-11-18 14:36:55 -08:00
Dmitry Gozman
04dc935265
test: do not print output from child processes in skipped tests (#10422) 2021-11-18 14:35:51 -08:00
github-actions[bot]
24cc266de0
feat(chromium): roll to r941965 (#10372)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2021-11-18 18:46:44 +01:00
Diego Pino
df07ee0c00
browser(webkit): roll to 18/11/21 (#10404) 2021-11-18 11:03:18 +01:00
Andrey Lushnikov
1c85e1563c devops: fix chromium win archiving 2021-11-17 20:20:15 -08:00
Yury Semikhatsky
0ca10da166
fix: compute file field mime type on the server (#10394) 2021-11-17 18:12:26 -08:00
Dmitry Gozman
bd93fc499f
fix(html reporter): show missing attachments as warnings (#10400) 2021-11-17 18:03:13 -08:00
Andrey Lushnikov
8c4e6f4eba
devops: fix Chromium archiving on Windows (#10401)
Chromium moved locales to glob: https://chromium-review.googlesource.com/c/chromium/src/+/3267963

Fixes #10398
2021-11-17 18:02:49 -08:00
Dmitry Gozman
ce2c0c59a7
feat(expect): show expect timeout in the error message (#10388)
Makes it easier to understand that expect does indeed have a separate timeout.

```
    Error: expect(received).toHaveCount(expected) // deep equality

    Expected: 0
    Received: 1

    Call log:
      - expect.toHaveCount with timeout 500ms
      - waiting for selector "span"
      -   selector resolved to 1 element
      -   unexpected value "1"
      -   selector resolved to 1 element
      -   unexpected value "1"
      -   selector resolved to 1 element
      -   unexpected value "1"
```
2021-11-17 17:28:30 -08:00
Andrey Lushnikov
f14e105051 chore: fixes to helper scripts 2021-11-17 17:02:29 -08:00
Andrey Lushnikov
51f714f235
chore: split out Chromium mirroring to a separate script (#10399)
#10398
2021-11-17 16:57:04 -08:00