puppeteer/test
Maja Frydrychowicz c5a72e9887 feat(launcher): add option to run Puppeteer with different browsers (#5137)
* feat: Set which browser to launch via PUPPETEER_PRODUCT

This change introduces a PUPPETEER_PRODUCT environment
variable as a first step toward using Puppeteer with
many different browsers. Setting PUPPETEER_PRODUCT=firefox, for
example, enables Firefox-specific Launcher settings.

The state is also exposed as `puppeteer.product` in the API
to support adding other product-specific behaviour as needed.

The bulk of the change is a refactoring in Launcher
to decouple generic browser start-up from product-specific
configuration.

Respecting the puppeteer-core restriction for PUPPETEER_
environment variables, lazily instantiate the Launcher
based on a `product` Puppeteer.launch option, if available.

* test: Distinguish Juggler unit tests from Firefox

The funit script is renamed to fjunit (j for Juggler, which is
used only by the experimental puppeteer-firefox package.

In contrast, the funit script now refers to running Puppeteer
unit tests against the main puppeteer package with Firefox.
To do so with Firefox Nightly, run:

`BINARY=path/to/firefox npm run funit`

A number of changes in this patch make it easier to run
Puppeteer unit tests in Mozilla's CI.
2019-11-26 10:23:19 +01:00
..
assets fix(launcher): disable component extensions (#4704) 2019-07-15 17:54:42 -07:00
fixtures fix(launcher): make dumpio and pipe options work together (#4727) 2019-07-18 16:42:11 -07:00
golden-chromium test: add page.screenshot viewport clipping test (#5079) 2019-10-24 14:05:13 +02:00
golden-firefox test: add page.screenshot viewport clipping test (#5079) 2019-10-24 14:05:13 +02:00
accessibility.spec.js feat: root option in page.accessibility.snapshot() (#4318) 2019-05-09 23:39:42 -07:00
browser.spec.js fix(test): browser.disconnect should not be awaited (#4446) 2019-05-21 17:26:04 +03:00
browsercontext.spec.js fix(test): browser.disconnect should not be awaited (#4446) 2019-05-21 17:26:04 +03:00
CDPSession.spec.js test: cleanup tests (#4078) 2019-02-26 20:36:55 -08:00
chromiumonly.spec.js feat(page): introduce file chooser interception (#4653) 2019-07-22 21:30:49 -07:00
click.spec.js fix(firefox): fix missing awaits in mouse.click (#4561) 2019-06-10 16:53:38 -07:00
cookies.spec.js test: add cookie tests (#4365) 2019-04-30 00:35:41 -07:00
coverage.spec.js chore(test): label coverage+debuger test with upstream bug (#4807) 2019-08-05 15:22:01 -07:00
defaultbrowsercontext.spec.js fix(firefox): fix cookies in default browser context (#4850) 2019-08-15 11:52:02 -07:00
dialog.spec.js test: split out dialog tests (#3586) 2018-11-20 20:18:57 -08:00
diffstyle.css Implement FrameManager 2017-06-21 14:11:52 -07:00
elementhandle.spec.js feat(firefox): support Page.emualteMedia (#4056) 2019-02-22 14:04:40 -08:00
emulation.spec.js feat(api): add page.emulateTimezone(timezoneId) (#4949) 2019-10-23 15:49:39 +02:00
evaluation.spec.js chore: drop Node.js v6 support (#5045) 2019-10-16 17:00:20 +02:00
fixtures.spec.js feat(launcher): add option to run Puppeteer with different browsers (#5137) 2019-11-26 10:23:19 +01:00
frame.spec.js test: make sure frames are reported from-inside shadow DOM (#4167) 2019-03-15 21:01:36 -07:00
golden-utils.js fix: set JPG background to white when omitBackground option is used (#3240) 2018-09-14 11:03:33 +01:00
headful.spec.js chore: drop Node.js v6 support (#5045) 2019-10-16 17:00:20 +02:00
ignorehttpserrors.spec.js fix(tests): Get TLS version from Node instead of hardcoding it (#4700) 2019-07-14 18:33:31 -07:00
input.spec.js feat(page): introduce file chooser interception (#4653) 2019-07-22 21:30:49 -07:00
jshandle.spec.js fix(firefox): enable more firefox tests (#4007) 2019-02-13 23:59:38 -08:00
keyboard.spec.js fix(firefox): keyboard tests (#4082) 2019-02-27 15:13:17 -08:00
launcher.spec.js feat(launcher): add option to run Puppeteer with different browsers (#5137) 2019-11-26 10:23:19 +01:00
mouse.spec.js fix(test): enable cross process viewport test (#4806) 2019-08-05 15:22:16 -07:00
navigation.spec.js feat(chromium): roll Chromium to r705776 (#5058) 2019-10-23 11:41:44 +02:00
network.spec.js test: split out request interception tests (#4278) 2019-04-11 21:33:01 -04:00
oopif.spec.js feat(chromium): roll Chromium to r665405 (#4516) 2019-06-04 11:03:15 -07:00
page.spec.js feat(chromium): roll Chromium to r705776 (#5058) 2019-10-23 11:41:44 +02:00
puppeteer.spec.js feat(launcher): add option to run Puppeteer with different browsers (#5137) 2019-11-26 10:23:19 +01:00
queryselector.spec.js test: split queryselector tests into separate file (#3579) 2018-11-20 18:45:37 -08:00
requestinterception.spec.js feat(chromium): roll Chromium to r705776 (#5058) 2019-10-23 11:41:44 +02:00
run_static_server.js chore(testserver): prepare test server (#3294) 2018-09-24 12:46:39 -07:00
screenshot.spec.js test: add page.screenshot viewport clipping test (#5079) 2019-10-24 14:05:13 +02:00
target.spec.js feat(workers): create workers from service workers and shared workers (#4397) 2019-05-09 17:29:18 -07:00
test.js feat(launcher): add option to run Puppeteer with different browsers (#5137) 2019-11-26 10:23:19 +01:00
touchscreen.spec.js feat(puppeteer): introduce puppeteer.errors and puppeteer.devices (#4312) 2019-04-19 15:33:06 -07:00
tracing.spec.js fix(tracing): start without options (#4388) 2019-05-09 17:15:33 -07:00
utils.js chore(flakiness-dashboard): skip API Coverage for realz (#4843) 2019-08-13 16:23:41 -07:00
waittask.spec.js feat(chromium): roll Chromium to r705776 (#5058) 2019-10-23 11:41:44 +02:00
worker.spec.js chore(firefox): mark all Puppeteer tests that are failing on FF (#3924) 2019-02-05 22:32:41 -08:00