Commit Graph

1604 Commits

Author SHA1 Message Date
Andrey Lushnikov
d687c81cd5
chore(flakiness-dashboard): skip API Coverage for realz (#4843) 2019-08-13 16:23:41 -07:00
Andrey Lushnikov
5d2378f15b
chore(ci): fix firefox tests on Travis (#4828)
I forgot Firefox requires explicit installation.
2019-08-09 19:02:47 -07:00
Andrey Lushnikov
85bd4a874f
chore(flakiness): fix flakiness on Appveyour and Travis (#4827)
This patch fixes build URL on Appveyour and splits out
Firefox tests into a separate dashboard on Travis.
2019-08-09 18:37:43 -07:00
Andrey Lushnikov
8f5117b3eb
chore(flakiness): another travis attempt (#4826) 2019-08-09 16:15:00 -07:00
Andrey Lushnikov
d347fcbb29
chore(flakiness): add travis to flakiness dashboard (#4825)
This attempts to add flakiness dashboard for travis builds.
2019-08-09 15:46:00 -07:00
Andrey Lushnikov
763e3901d9
chore(flaky): save build result (#4819) 2019-08-08 20:53:12 -07:00
Andrey Lushnikov
608b15f20d
chore(flakiness): limit max builds to 100 (#4818)
This was missing in #4808
2019-08-08 15:15:33 -07:00
Andrey Lushnikov
f753ec6b04
chore(testrunner): distinguish between TERMINATED and CRASHED (#4821)
`testRunner.run()` might have 4 different outcomes:
- `ok` - all non-skipped tests passed
- `failed` - some tests failed or timed out
- `terminated` - process received SIGHUP/SIGINT while testrunner was running tests. This happens on CI's under certain circumstances, e.g. when
  VM is getting re-scheduled.
- `crashed` - testrunner terminated test execution due to either `UnhandledPromiseRejection` or
  some of the hooks (`beforeEach/afterEach/beforeAll/afterAll`) failures.

As an implication, there are 2 new test results: `terminated` and `crashed`.
All possible test results are:
- `ok` - test worked just fine
- `skipped` - test was skipped with `xit`
- `timedout` - test timed out
- `failed` - test threw an exception while running
- `terminated` - testrunner got terminated while running this test
- `crashed` - some `beforeEach` / `afterEach` hook corresponding to this
test timed out of threw an exception.

This patch changes a few parts of the testrunner API:
- `testRunner.run()` now returns an object `{result: string,
terminationError?: Error, terminationMessage?: string}`
- the same object is dispatched via `testRunner.on('finished')` event
- `testRunner.on('terminated')` got removed
- tests now might have `crashed` and `terminated` results
- `testRunner.on('teststarted')` dispatched before running all related
`beforeEach` hooks, and `testRunner.on('testfinished')` dispatched after
running all related `afterEach` hooks.
2019-08-08 15:15:09 -07:00
Andrey Lushnikov
c047624b68
chore: generate testIds on CIs only (#4817) 2019-08-07 10:26:53 -07:00
Drew Powers
656fe46047 docs(circleci): Improve CircleCI troubleshooting docs (#4813)
Adds note about Jest maxWorkers as well as the base image to start with. This is an improvement over the previous section I wrote, from me banging my head against a YAML file all week 🙃.
2019-08-07 08:51:31 -07:00
Drew Powers
374177b433 docs(circleci): Add CircleCI to troubleshooting docs (#4810)
This came from personal difficulties in running Puppeteer tests on CircleCI. I tried to keep the note as brief as possible, while being helpful for an entire CI platform.
2019-08-06 17:18:10 -07:00
Andrey Lushnikov
dcff850b6f
chore(flakiness): update flakiness format (#4808)
This patch:
- updates Flakiness Dashboard format to define version per-build
  and to pass COMMIT information
- drops the README.md generation - we'll move on to a designated flakiness
  dashboard viewer
2019-08-06 15:32:55 -07:00
Darío Kondratiuk
b9b6ca1825 fix(network): be able to remove headers using request.continue (#4797)
I think this was a regression caused here https://github.com/GoogleChrome/puppeteer/pull/4265/files#diff-d2ac7cb061b0c51644d0a5d6140e3a32R446

Fix #4743
2019-08-05 15:26:17 -07:00
Joel Einbinder
4acce550c4 fix(test): enable cross process viewport test (#4806) 2019-08-05 15:22:16 -07:00
Joel Einbinder
a95ec70635 chore(test): label coverage+debuger test with upstream bug (#4807)
Filed as https://crbug.com/990945
2019-08-05 15:22:01 -07:00
Joel Einbinder
f2056a8e25 fix(test): enable redirect inside sync XHR test (#4805)
The underlying bug appears to have been fixed. Test works.
2019-08-05 15:19:34 -07:00
ylb
f4f21896d2 fix(page): fix page.screenshot method (#4786)
This patch fixes page.screenshot. so that it throws correct error message when options.clip.height===0
2019-08-01 17:09:39 -07:00
Darío Kondratiuk
eb44e260a9 test: add page.bringToFront test (#4778)
Test `page.bringToFront` in headful.
2019-08-01 17:08:29 -07:00
Andrey Lushnikov
f733c334dc
chore(flakiness): revert compression for dashboard.json (#4794)
Compression wins turned out to be 20KB instead of 200KB as I initially
thought.
2019-08-01 16:40:29 -07:00
Andrey Lushnikov
5c7c45f0aa
chore(coverage): fix coverage for events (#4787)
We used to track API Coverage for public events, but this was regressed in the refactoring that
introduced `//lib/Events.js`.

This patch:
- Brings back API Coverage for events
- Combines all coverage-generated tests into a single one. This way
we can generate less data for flakiness dashboard.
2019-08-01 16:09:50 -07:00
Andrey Lushnikov
7ee9af49db
chore(flakiness): enable flakiness dashboard on Appveyor (#4789) 2019-08-01 16:09:28 -07:00
Andrey Lushnikov
e252dcf200
chore(flakiness): Flakiness Dashboard fixes (#4788)
- fix `FLAKINESS_DASHBOARD_BUILD_URL` to point to a task instead of a build
- do not pretty-print `dashboard.json` when serializing flakiness results
- filter out 'COVERAGE' test(s) so that they don't add up to `dashboard.json` payload. These are useless
- validate certain important options of flakiness dashboard
- more logging to STDOUT to actually say which repo and what branch is getting used
- enhance commit message with a build URL
- use a more compact format for JSON. For 100 runs of 700 tests it yields 21MB json instead of 23MB.
- bump default builds number to 100
2019-08-01 16:09:02 -07:00
Yury Semikhatsky
e2db16f898 fix(tests): make eval test resilient to error format (#4793)
Make eval test resilient to variations in error message format between browsers.This will make the test pass without alternations in WebKit as well as Crhrome and Firefox.
2019-08-01 14:18:35 -07:00
Andrey Lushnikov
932c8cbe9a
chore: introduce initial version of flakiness dashboard (#4781)
This patch introduces a dashboard that records test results and
uploads them to https://github.com/aslushnikov/puppeteer-flakiness-dashboard

Since many bots might push results in parallel, each bot pushes
results to its own git branch.

FlakinessDashboard also generates a simple README.md with a flakiness
summary. If this proves to be not enough, we can build a website that
fetches flakiness data and renders it nicely.
2019-07-31 22:23:50 -07:00
Andrey Lushnikov
2f205a4446
feat(chromium): roll Chromium to r681777 (#4771)
Just a healthy roll.
2019-07-30 13:20:10 -07:00
Yury Semikhatsky
1b4a0302fc fix(test): make sure selection is not empty before running copy command (#4772)
If current selection is empty document.execCommand('copy') may return false in some browsers (e.g. WebKit based ones).
2019-07-30 13:19:56 -07:00
Andrey Lushnikov
7406b185d2
chore(testrunner): introduce tests for TestRunner (#4773)
This adds some basic tests for the test runner.
2019-07-30 13:19:12 -07:00
Andrey Lushnikov
3bbc45af8b
chore: improve //utils/check_availability.js (#4770)
This patch teaches `//utils/check_availability.js` to break
when it is run with no arguments and it finds an available revision.
2019-07-29 14:29:50 -07:00
Paul Irish
cc805e750c chore(readme): fix typo (#4749)
s/availabe/available
2019-07-29 14:24:48 -07:00
Yevhen
7fded54903 docs(api.md): fix typo (#4761) 2019-07-29 14:14:31 -07:00
Joel Einbinder
7a607469df fix(tests): background page tests should wait for the page (#4769) 2019-07-29 14:09:34 -07:00
Andrey Lushnikov
62f5dc7375
chore: bump version to v1.19.0-post (#4745) 2019-07-22 22:34:10 -07:00
Andrey Lushnikov
af0d229044
chore: mark version v1.19.0 (#4744) 2019-07-22 22:02:45 -07:00
Andrey Lushnikov
ea28cccfe0 feat(page): introduce file chooser interception (#4653)
This patch introduces a page.waitForFileChooser() method
that adds a watchdog to wait for file chooser dialogs.

This lets Puppeteer users to capture file chooser requests
and fulfill/cancel them if necessary.

Fixes #2946
2019-07-22 21:30:49 -07:00
Yury Semikhatsky
2abaac10aa fix(launcher): make dumpio and pipe options work together (#4727)
Don't ignore stdout and stderr when using pipe for remote debugging and dumpio is true. In that case puppeteer process connects to the stdout/stderr streams of the child process and it will not hang.
2019-07-18 16:42:11 -07:00
Andrey Lushnikov
3982a603cc
chore(testrunner): bump TestRunner version to v0.7.0 (#4719) 2019-07-18 11:25:27 -07:00
Andrey Lushnikov
852c46c1e4
feat(testrunner): async suite descriptions (#4721)
This patch teaches TestRunner to support async suite
descriptions. This is needed to require tests using ES6 dynamic
imports:

```js
const t = new TestRunner();

await t.describe('tests', async () => {
  (await import('./some.spec.js')).addTests(t);
  (await import('./other.spec.js')).addTests(t);
});
```
2019-07-18 11:25:06 -07:00
Andrey Lushnikov
835e8849fd
feat(testrunner): add new testrunner options (#4718)
This patch adds new TestRunner options:
- `disableTimeoutWhenInspectorIsEnabled` - disable test timeout if
  testrunner detects enabled inspector.
- `breakOnFailure` - if testrunner should terminate test running on
  first test failure
2019-07-17 10:32:37 -07:00
Andrey Lushnikov
934d73e526
fix(testreporter): Test Reporter should not terminate node.js process (#4716)
This patch starts assigning process exit codes rather than terminating
parent process. Library should never own/terminate parent node.js
process.
2019-07-16 16:34:41 -07:00
Andrey Lushnikov
eea55bd6c6
fix(testrunner): properly handle testrunner terminations (#4717)
This patch improves the logic for test runner termination.
With this patch:
- TestRunner runs all afterEach/afterAll hooks when a
termination happens, properly terminating browser instances
- TestRunner cleans up all dangling timeout timers so that node.js
process is not retained and is free to exit
2019-07-16 16:26:03 -07:00
Andrey Lushnikov
ad1802188d
fix(launcher): disable component extensions (#4704)
Chrome has a set of component extensions - e.g. CryptoTokenExtension
that helps with 2FA.

These extensions are loaded regardless of the `--disable-extensions`
flag we already pass. To disable these extensions, we need to pass additional
`--disable-component-extensions-with-background-pages` flag.

Fix #4300
2019-07-15 17:54:42 -07:00
Andrey Lushnikov
f8616ed54b
fix(pipe): handle 'error' events on pipes to avoid crashing (#4705)
Fix #4374
2019-07-15 17:53:27 -07:00
Andrey Lushnikov
c9977c8004
fix(page): properly create isolated worlds (#4707)
The following error:
```
Error: Protocol error (Page.createIsolatedWorld): No frame for given id found
```

was mentioned here:
https://github.com/FlowCrypt/flowcrypt-browser/pull/1799#issuecomment-508729602

This indeed seems to be a bug with our creation of isolated worlds.
2019-07-15 17:52:40 -07:00
Yury Semikhatsky
a39d553511 fix(tests): Get TLS version from Node instead of hardcoding it (#4700) 2019-07-14 18:33:31 -07:00
Mohamed Akram
bafda9fbe7 fix(launcher): ensure PUPPETEER_EXECUTABLE_PATH is used if set (#4677)
Without this patch, Puppeteer exits with `Error: Unsupported platform: freebsd` on FreeBSD despite `PUPPETEER_EXECUTABLE_PATH` being set.
2019-07-14 16:37:57 -07:00
Andrey Lushnikov
a582c11b1b
chore(ci): add Node10 and Node12 to Cirrus (#4699) 2019-07-13 23:22:02 -07:00
Yury Semikhatsky
715aad2d67 fix: proper parse Error message on Node 12 (#4698)
Check message prefix rather than strict equality when detecting circular JSON error. The message format has changed in Node 12 which broke the condition and failed a test.
2019-07-12 17:19:02 -07:00
Joel Einbinder
49b27956fe feat(keyboard): feature phone buttons (#4694)
I got a KaiOS phone with some awesome buttons on it I hadn't seen before on the web. This adds the following buttons to our default keyboard layout:

`SoftLeft`
`SoftRight`
`Camera`
`Call`
`EndCall`
`VolumeUp`
`VolumeDown`
2019-07-12 15:41:01 -07:00
Andrey Lushnikov
a17c727b78
chore: release next testrunner (#4697) 2019-07-12 12:50:48 -07:00
Andrey Lushnikov
8e0c2fad39
feat(chromium): roll Chromium to r674921 (#4678)
Just a healthy roll.
2019-07-08 07:29:21 +02:00