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

Support specifying browsers in the local.browsers api #58

Open
panuhorsmalahti opened this issue Jan 25, 2016 · 4 comments
Open

Support specifying browsers in the local.browsers api #58

panuhorsmalahti opened this issue Jan 25, 2016 · 4 comments

Comments

@panuhorsmalahti
Copy link

Adding an optional function parameter to specify which browsers to return would fix the following issue (causing slow test ultimately in web-component-tester):
https://github.com/Polymer/wct-local/issues/21

A comment in the issue explains more clearly the cause of the issue:
https://github.com/Polymer/wct-local/issues/21#issuecomment-174602321

The parameter should be added here:
https://github.com/ekryski/launchpad/blob/master/lib/local/index.js#L59

This is just a quick proposal, I'm open to alternative solutions :).

@daffl
Copy link
Contributor

daffl commented Jan 25, 2016

This should already be fixable by specifying the browsers, as added in #52 (also see #51). Additionally, the test could just directly specify what browsers it wants to run (e.g. launch.firefox etc.) without calling .broswers (which in Windows triggers a lengthy search for all browsers).

@panuhorsmalahti
Copy link
Author

Yeah, LAUNCHPAD_BROWSERS is a working workaround, but it's an extra unnecessary step for wct users, since the wct configuration file already has a property for specifying the browsers:
https://github.com/Polymer/web-component-tester/blob/master/runner/config.js#L76

@daffl
Copy link
Contributor

daffl commented Jan 25, 2016

I would recommend changing the wct tests to use that configuration in detect then. local.browsers only needs to be called if you want a list of all locally installed browsers. If they are already specified it doesn't need to run at all, you just call launch.firefox, launch.chrome etc. directly. It will error if a user doesn't have the browser installed but I would assume that having the browsers specified in the configuration are a requirement to run the tests.

@panuhorsmalahti
Copy link
Author

That's a good idea. detect should only use local.browsers if the user didn't specify which browsers to use.

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

No branches or pull requests

2 participants