-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore(exitCodes): adding exit code for browser connect errors #3133
Conversation
8793992
to
2b528bd
Compare
Unit tests added for BrowserError for direct connect. |
213a1df
to
8b49b8a
Compare
depends on #3131 |
8b49b8a
to
993f216
Compare
var fs = require('fs'); | ||
var BrowserError = require('../../../built/exitCodes').BrowserError; | ||
|
||
var removeSeleniumFolder = function() { |
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 doing this, just use a config file that points at a different (and invalid) chromedriver location.
4dbd109
to
9def91e
Compare
Instead of using the |
describe('with selenium drivers', function() { | ||
var chromedriver = ''; | ||
beforeEach(function() { | ||
// add files to selenium folder |
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.
Why is it important that the file have the correct version? Aren't we just testing that if the file exists but isn't a proper driver, we get the right error code?
I think this should either just use a bogus file that we create (like os.tpdir() + '/foo/bar') or not specify chromeDriver
in the config and let the driverProvider use its normal logic.
9def91e
to
fe344a9
Compare
8ea25f0
to
602f500
Compare
602f500
to
df2cb56
Compare
7dc0546
to
0dc0b26
Compare
0dc0b26
to
d340ab2
Compare
@@ -3,10 +3,11 @@ | |||
* It is responsible for setting up the account object, tearing | |||
* it down, and setting up the driver correctly. | |||
*/ | |||
import * as request from 'request'; | |||
import * as https from 'https'; |
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.
Can this 'request' removal be split into its own PR?
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.
Done.
A couple clean-up comments. |
* use the thrown error for stack traces instead of creating a new one * use inheritance over creating a new error * read in stacktrace with captureStackTrace * removed default error messages
d4c13bb
to
fe98c6d
Compare
@@ -2,7 +2,11 @@ import {Browser, ElementHelper} from './browser'; | |||
import {ProtractorBy} from './locators'; |
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.
This looks like an unrelated change.
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.
Yes, I need to stop sneaking these in. Will revert this file back.
LGTM once that's done. |
No description provided.