Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ matrix:
firefox: latest
env:
- TEST_COMMAND="xvfb-run npm run test:integration"
- SKIP_REMOTE_BROWSERS=true

- node_js: '9'
addons:
Expand All @@ -55,3 +54,4 @@ matrix:
sauce_connect: true
env:
- TEST_COMMAND="xvfb-run npm run test:integration"
- WCT_SAUCE=true
2 changes: 1 addition & 1 deletion packages/esm-amd-loader/test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"clean": "rm -rf lib/",
"lint": "tslint --project . --format stylish",
"build": "npm run clean && tsc",
"test:wct": "npm run lint && npm run build && wct"
"test:wct": "npm run lint && npm run build && bash run-wct.sh"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does test:wct get invoked? Shouldn't this be test:integration?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

esm-amd-loader's test:integration command cds to this package and calls this script. i thought that made more sense, since it's the integration test for that package, which just happens to be implemented in a separate package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Thanks!

},
"devDependencies": {
"@polymer/esm-amd-loader": "^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/esm-amd-loader/test/run-wct.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

if [ -n "$WCT_SAUCE" ]; then
npx wct --plugin local --plugin sauce
else
npx wct --plugin local
fi
28 changes: 27 additions & 1 deletion packages/esm-amd-loader/test/wct.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,31 @@
"moduleResolution": "node",
"suites": [
"static/**/*.html"
]
],
"plugins": {
"local": {
"disabled": false,
"browsers": ["all"]
},
"sauce": {
"disabled": true,
"browsers": [
{
"browserName": "internet explorer",
"platform": "Windows 8.1",
"version": "11"
},
{
"browserName": "microsoftedge",
"platform": "Windows 10",
"version": "latest"
},
{
"browserName": "safari",
"platform": "OS X 10.13",
"version": "latest"
}
]
}
}
}
8 changes: 6 additions & 2 deletions packages/web-component-tester/test/integration/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@ function loadOptionsFile(dir: string): config.Config {

const testLocalBrowsers = !process.env.SKIP_LOCAL_BROWSERS;
const testLocalBrowsersList = parseList(process.env.TEST_LOCAL_BROWSERS);
const testRemoteBrowsers = !process.env.SKIP_REMOTE_BROWSERS &&
process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY;
const testRemoteBrowsers = process.env.WCT_SAUCE;
if (testRemoteBrowsers &&
!(process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY)) {
throw new Error(
'Must set SAUCE_USERNAME and SAUCE_ACCESS_KEY when WCT_SAUCE is set.');
}
const testRemoteBrowsersList = parseList(process.env.TEST_REMOTE_BROWSERS);
if (testRemoteBrowsersList.length === 0) {
testRemoteBrowsersList.push('default');
Expand Down