-
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
feat: Passing --browser
flag alone will launch after test selection
#28538
Conversation
|
--browser
flag alone will launch after test selection in the GUI, the browser will automatically launch.
--browser
flag alone will launch after test selection in the GUI, the browser will automatically launch.--browser
flag alone will launch after test selection in the GUI, the browser will automatically launch.
--browser
flag alone will launch after test selection in the GUI, the browser will automatically launch.--browser
flag alone will launch after test selection in the GUI, the browser will automatically launch. Addresses [#22003](https://github.com/cypress-io/cypress/issues/22003).
--browser
flag alone will launch after test selection in the GUI, the browser will automatically launch. Addresses [#22003](https://github.com/cypress-io/cypress/issues/22003).--browser
flag alone will launch after test selection
Currently the way the code is, when running the command |
My suggestion is that if we couldn't find the browser that was passed, we should not open any browser and let you see the warning, then you'd have to either relaunch passing in a different browser name, or pick the browser you want from the list. |
@marktnoonan that was exactly how I was trying to assert... but it kept failing. I wasn't sure if it was an actual bug or my misunderstanding! I would have battled for a little while to find that. Thank you for looking into it. Those changes have been made. |
@raygdev Trying to get this in for today's release. If the tests seem to be passing - we'll get it in. PLEASE do not merge in develop. We'll handle keeping the branch up to date. |
@jennifer-shehane sounds good! Thank you for your help! Sorry it took me a while to flesh all of it out. Should I update the cypress documentation for this as well? I haven't done it yet. |
@raygdev You could open a PR against this branch: cypress-io/cypress-documentation#5898 We could also update it later, so it's not a big deal if it doesn't make it into that branch in time. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Additional details
--browser
flag is passed alone, after selecting the testing type, the selected browser will automatically launch.localSettings
field in theOpenBrowser
query to check if the browser was set in the cli. That query was passed as a prop toOpenBrowserList
and used on mount and emits the already definedlaunch
function if the browser was set.Steps to test
In development
yarn cypress:open --browser <browser-name-or-path>
. Select your testing type in the GUI. After testing type selection, the browser specified will automatically launch. Clickingswitch testing type
will navigate back to select another testing type. When a new type is selected the user will have to select the browser from the UI. If an invalid browser name or path is passed, the cached browser will not launch and the error will show as intended. The user will either have to select from the list of available browsers or relaunch from the cli.How has the user experience changed?
Previously, when a user only passed the
--browser
flag, they would still be prompted to select the browser and click theStart testing in <browser-name>
button to open the browser. The only other option was to pass a testing type flag and browser flag together to automatically launch.PR Tasks
cypress-documentation
?type definitions
?