-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Launch browsers by path: --browser /path/to/browser
#3337
Conversation
…ser/Browser distinction
…at to work 100 percent
db8f628
to
373d6c5
Compare
373d6c5
to
3674af6
Compare
@brian-mann Updated the error messages like we talked about. @lilaconlee's changes make CLI error looks better now too: |
Love the error, it does look much better. Look what you did @lilaconlee :P |
expectedExitCode: 1 | ||
}) | ||
|
||
it "works with an installed browser path", -> |
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.
Here's a slightly more condensed version of this taking advantage of bluebird...
launcher.detect()
.then (browsers) =>
_.find(browsers, { family: 'chrome' })
.tap (browser) =>
if !browser
throw new Error("A 'chrome' family browser must be installed for this test. None were found.")
.get('path')
## turn binary browser names ("google-chrome") into their absolute paths
## so that server recognizes them as a path, not as a browser name
.then(absPath)
.then (foundPath) =>
e2e.exec(@, {
project: Fixtures.projectPath("e2e")
spec: "simple_spec.coffee"
browser: foundPath
snapshot: true
expectedExitCode: 0
})
Fixtures = require("../support/helpers/fixtures") | ||
launcher = require("@packages/launcher") | ||
|
||
absPath = (pathStr) -> |
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.
I'm going to approve this PR - but this feels like this is something that should be part of the found browsers objects in launcher
.
It looks like we have a path
property... but apparently that only returns the binary executable and not the actual path to it?
Closes #1026
Depends on merging #3225
Todo: