Skip to content
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

Better message when a supported browser in not found. #28914

Open
asashour opened this issue Feb 9, 2024 · 2 comments · May be fixed by #29066
Open

Better message when a supported browser in not found. #28914

asashour opened this issue Feb 9, 2024 · 2 comments · May be fixed by #29066

Comments

@asashour
Copy link

asashour commented Feb 9, 2024

What would you like?

Browser: chrome was not found on your system or is not supported by Cypress.

Should be

Browser: chrome was not found on your system.

Why is this needed?

If any of the supported browsers is not found, a specific message would be better. This is a better user experience.

If a non-supported browser is specified, e.g. abc, then Browser: abc is not supported by Cypress. is also a little better.

Other

No response

@jennifer-shehane jennifer-shehane added type: user experience Improvements needed for UX good first issue Good for newcomers type: error message and removed type: user experience Improvements needed for UX labels Feb 12, 2024
@0v00
Copy link

0v00 commented Feb 14, 2024

@jennifer-shehane I think I may have a simple fix by adding an initial check if the given browser is supported in ensureAndGetByNameOrPath in packages/server/lib/browers/utils.ts, and then adding an additional error in packages/errors/src/errors.ts specifically for unsupported browsers.

Then we can simplify the BROWSER_NOT_FOUND_BY_NAME error to just print out Browser: ${fmt.highlight(browser)} was not found on your system etc as per @asashour's request

Let me know - happy to create a small PR.

@jennifer-shehane
Copy link
Member

@0v00 Sounds like a plan. You'll need to update many of our snapshot tests I imagine that is testing this is printed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants