Skip to content

Commit

Permalink
chore: use puppeteer launcher to run Chrome tests (#7701)
Browse files Browse the repository at this point in the history
* test: use puppeteer launcher to run Chrome tests

* chore: also use Puppeteer for snapshots and integration
  • Loading branch information
web-padawan committed Aug 29, 2024
1 parent 3b21cd1 commit 2bfe5ad
Show file tree
Hide file tree
Showing 5 changed files with 1,000 additions and 457 deletions.
20 changes: 9 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@
"@polymer/iron-component-page": "^4.0.1",
"@types/sinon": "^17.0.2",
"@vaadin/testing-helpers": "^0.6.0",
"@web/dev-server": "^0.2.1",
"@web/dev-server-esbuild": "^1.0.1",
"@web/dev-server": "^0.4.3",
"@web/dev-server-esbuild": "^1.0.2",
"@web/rollup-plugin-html": "^2.0.0",
"@web/test-runner": "^0.16.1",
"@web/test-runner-commands": "^0.7.0",
"@web/test-runner-playwright": "^0.10.0",
"@web/test-runner-saucelabs": "^0.10.0",
"@web/test-runner-visual-regression": "^0.8.0",
"@web/test-runner": "^0.18.1",
"@web/test-runner-commands": "^0.9.0",
"@web/test-runner-playwright": "^0.11.0",
"@web/test-runner-puppeteer": "^0.16.0",
"@web/test-runner-saucelabs": "^0.11.1",
"@web/test-runner-visual-regression": "^0.9.0",
"axios": "^1.4.0",
"dotenv": "^16.0.3",
"eslint": "^8.49.0",
Expand All @@ -59,8 +60,6 @@
"postcss-lit": "^1.1.0",
"prettier": "^2.8.8",
"prettier-plugin-package": "^1.3.0",
"puppeteer": "19.9.0",
"puppeteer-core": "19.9.0",
"replace-in-file": "^6.3.5",
"rimraf": "^5.0.1",
"rollup": "^3.23.0",
Expand All @@ -70,8 +69,7 @@
"typescript": "^5.1.6"
},
"resolutions": {
"puppeteer": "19.9.0",
"puppeteer-core": "19.9.0"
"puppeteer": "23.2.0"
},
"lint-staged": {
"*.{js,ts}": [
Expand Down
11 changes: 10 additions & 1 deletion web-test-runner-it.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
/* eslint-env node */
const { puppeteerLauncher } = require('@web/test-runner-puppeteer');
const { createIntegrationTestsConfig } = require('./wtr-utils.js');
const devServerConfig = require('./web-dev-server.config.js');

const unitTestsConfig = createIntegrationTestsConfig();
const unitTestsConfig = createIntegrationTestsConfig({
browsers: [
puppeteerLauncher({
launchOptions: {
headless: 'shell',
},
}),
],
});

module.exports = {
...unitTestsConfig,
Expand Down
11 changes: 10 additions & 1 deletion web-test-runner-snapshots.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
/* eslint-env node */
const { puppeteerLauncher } = require('@web/test-runner-puppeteer');
const { createSnapshotTestsConfig } = require('./wtr-utils.js');

module.exports = createSnapshotTestsConfig();
module.exports = createSnapshotTestsConfig({
browsers: [
puppeteerLauncher({
launchOptions: {
headless: 'shell',
},
}),
],
});
8 changes: 8 additions & 0 deletions web-test-runner.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
/* eslint-env node */
const { puppeteerLauncher } = require('@web/test-runner-puppeteer');
const { createUnitTestsConfig } = require('./wtr-utils.js');
const devServerConfig = require('./web-dev-server.config.js');

const unitTestsConfig = createUnitTestsConfig({
browsers: [
puppeteerLauncher({
launchOptions: {
headless: 'shell',
},
}),
],
coverageConfig: {
include: ['packages/**/src/**/*', 'packages/*/*.js'],
threshold: {
Expand Down
Loading

0 comments on commit 2bfe5ad

Please sign in to comment.