-
Notifications
You must be signed in to change notification settings - Fork 21
Add more browser testing with Sauce Labs. #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: solution
Are you sure you want to change the base?
Conversation
sauceUser: process.env.SAUCE_USERNAME, | ||
sauceKey: process.env.SAUCE_ACCESS_KEY, | ||
|
||
directConnect: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of trying to override an existing with an Object.assign, could we instead do something like:
var defaultConfig = require('./protractor.conf.js').config;
defaultConfig.directConnect = undefined;
defaultConfig.seleniumAddress = undefined;
defaultConfig.sauceUser
...
exports.config = defaultConfig;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, defaultConfig.capabilities = undefined
to get rid of the warning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out the problem was I was using an old Sauce Labs account, which didn't have any VM minutes for automated testing. Instead of throwing an error, Sauce would just hang forever waiting to launch.
Also, this uncovered a bug in Protractor. The way 'beforeLaunch' is used to set up ts-node doesn't actually work with multiCapabilities, because of the way we fork in the launcher. I suspect that if you used test sharding, that would also break.
4953489
to
e9c713a
Compare
There seems to be an issue with 'beforeLaunch' and multicapabilities that breaks ts-node when launching.
e9c713a
to
d97b02f
Compare
Here's a simple example of one way to add support for testing on Sauce Labs. No need to actually merge this, it's just intended as an example.