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
  • Loading branch information
web-padawan committed Aug 29, 2024
1 parent 3b21cd1 commit dc65625
Show file tree
Hide file tree
Showing 6 changed files with 959 additions and 482 deletions.
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,18 @@
"@esm-bundle/chai": "^4.3.4",
"@fontsource/roboto": "^4.5.1",
"@polymer/iron-component-page": "^4.0.1",
"@rollup/plugin-terser": "^0.4.4",
"@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,19 +61,15 @@
"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",
"rollup-plugin-terser": "^7.0.2",
"rollup": "^4.4.0",
"stylelint": "^15.10.0",
"stylelint-config-vaadin": "^1.0.0-alpha.1",
"typescript": "^5.1.6"
},
"resolutions": {
"puppeteer": "19.9.0",
"puppeteer-core": "19.9.0"
"puppeteer": "23.2.0"
},
"lint-staged": {
"*.{js,ts}": [
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-env node */
const { nodeResolve } = require('@rollup/plugin-node-resolve');
const { terser } = require('rollup-plugin-terser');
const terser = require('@rollup/plugin-terser').default;
const html = require('@web/rollup-plugin-html').default;

module.exports = {
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 dc65625

Please sign in to comment.