-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated devtools + use karma to replace wct (#153)
* Updated devtools + use wtr to replace wtc * Updated package-lock.json for fsevents * Remove skip in the component test * Fixed build * Fixed perf testing * Fixed test-server * Use w3c protocol for saucelab * Updated browser matrix * Modify the test matric * Try out firefox 74 * Prevent default for onerror handler * Use error.message * Removed build/index.html * Use wtr to run testcases so we could have coverage * Use --coverage for collecting coverage * Saucelab with coverage as well * Re-export jsx from snabbdom instead of snabbdom-lite * Upgrade cuid to bypass restrictions * Pin ff to 100 for now * Bring back Chrome * Revive the branch * Use webdriver protocol * Use karma for test running * Remove wtr config * Remove console.log * Fixed typo * Updated os for 10.13 * Fixed typo * Use chrome 75 to be capatible with wdio * Bring back the disconnect config * Remove disconnect tolerance * Try to fix chrome old tests * Use snabbdom-jsx-lite instead * Manually specify target for babel build target * Fixed safari version to 13
- Loading branch information
1 parent
74dc4c2
commit 18c4a2d
Showing
14 changed files
with
19,578 additions
and
21,136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
{ | ||
"presets": ["es2015"] | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"targets": { | ||
"chrome": "90", | ||
"firefox": "91", | ||
"edge": "90", | ||
"safari": "13" | ||
} | ||
}] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ npm-debug.log | |
yarn.lock | ||
/.vscode | ||
/isorender | ||
/coverage | ||
.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
/* eslint-env node */ | ||
|
||
const path = require(`path`); | ||
|
||
process.env.CHROME_BIN = require(`puppeteer`).executablePath(); | ||
process.env.FIREFOX_BIN = require(`playwright`).firefox.executablePath(); | ||
const SAUCE = parseInt(process.env.SAUCE, 10) >= 1; | ||
|
||
// Check out https://saucelabs.com/platforms for all browser/platform combos | ||
const sauceLaunchers = { | ||
sl_chrome_latest: { | ||
base: `SauceLabs`, | ||
browserName: `chrome`, | ||
browserVersion: `latest`, | ||
platformName: `macOS 12`, | ||
'sauce:options': { | ||
extendedDebugging: true, | ||
}, | ||
}, | ||
sl_chrome_old: { | ||
base: `SauceLabs`, | ||
browserName: `chrome`, | ||
browserVersion: `90`, | ||
platformName: `macOS 10.13`, | ||
'sauce:options': { | ||
extendedDebugging: true, | ||
}, | ||
}, | ||
sl_firefox_latest: { | ||
base: `SauceLabs`, | ||
browserName: `firefox`, | ||
browserVersion: `latest`, | ||
platformName: `macOS 12`, | ||
'sauce:options': { | ||
extendedDebugging: true, | ||
}, | ||
}, | ||
sl_firefox_old: { | ||
base: `SauceLabs`, | ||
browserName: `firefox`, | ||
browserVersion: `91`, | ||
platformName: `macOS 10.13`, | ||
'sauce:options': { | ||
extendedDebugging: true, | ||
}, | ||
}, | ||
sl_safari_latest: { | ||
base: `SauceLabs`, | ||
browserName: `safari`, | ||
browserVersion: `latest`, | ||
platformName: `macOS 12`, | ||
}, | ||
sl_safari_old: { | ||
base: `SauceLabs`, | ||
browserName: `safari`, | ||
browserVersion: `13`, | ||
platformName: `macOS 10.13`, | ||
}, | ||
sl_edge_latest: { | ||
base: `SauceLabs`, | ||
browserName: `MicrosoftEdge`, | ||
browserVersion: `latest`, | ||
platformName: `Windows 10`, | ||
}, | ||
sl_edge_old: { | ||
base: `SauceLabs`, | ||
browserName: `MicrosoftEdge`, | ||
browserVersion: `90`, | ||
platformName: `Windows 10`, | ||
}, | ||
}; | ||
|
||
const sauceBrowsers = Object.keys(sauceLaunchers); | ||
|
||
// shared config for all unit tests | ||
module.exports = function (config) { | ||
config.set({ | ||
frameworks: [`mocha`], | ||
preprocessors: { | ||
'**/*.js': [`sourcemap`], | ||
}, | ||
basePath: path.resolve(__dirname, `test/browser/build`), | ||
retryLimit: 2, | ||
files: [`bundle.js`], | ||
client: { | ||
clientDisplayNone: true, | ||
mocha: { | ||
timeout: 30000, // 300s | ||
}, | ||
}, | ||
sauceLabs: { | ||
public: `team`, | ||
build: `panel ${process.env.GITHUB_REF || `local`} build ${process.env.GITHUB_RUN_NUMBER || ``}`, | ||
testName: `Panel tests`, | ||
}, | ||
plugins: [ | ||
require(`karma-mocha`), | ||
require(`karma-spec-reporter`), | ||
require(`karma-chrome-launcher`), | ||
require(`karma-firefox-launcher`), | ||
require(`karma-sauce-launcher`), | ||
require(`karma-sourcemap-loader`), | ||
], | ||
browsers: SAUCE ? sauceBrowsers : [`ChromeHeadless`, `Firefox`], | ||
reporters: SAUCE ? [`spec`, `saucelabs`] : [`spec`], | ||
singleRun: true, | ||
customLaunchers: { | ||
...sauceLaunchers, | ||
ChromeHeadless: { | ||
base: `Chrome`, | ||
flags: [ | ||
`--headless`, | ||
`--disable-gpu`, | ||
`--disable-dev-shm-usage`, | ||
`--remote-debugging-port=9222`, | ||
`--window-size=1280,800`, | ||
`--no-sandbox`, | ||
], | ||
}, | ||
FirefoxHeadless: { | ||
base: `Firefox`, | ||
flags: [`-headless`], | ||
}, | ||
}, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.