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

Upgrade canopy tests to use chrome headless #317

Closed
forki opened this issue Mar 20, 2018 · 6 comments
Closed

Upgrade canopy tests to use chrome headless #317

forki opened this issue Mar 20, 2018 · 6 comments

Comments

@forki
Copy link
Member

forki commented Mar 20, 2018

AFAIk the phantom is no longer in active development. We should move over to chrome headless.
I'd lvoe to get help for that.

/cc @lefthandedgoat

@lefthandedgoat
Copy link

ChromeHeadless should work, if it does not let me know and I will try getting the source of this repo and figuring it out.

https://github.com/lefthandedgoat/canopy/blob/master/src/canopy/canopy.fs#L871

@forki
Copy link
Member Author

forki commented Mar 21, 2018

yeah the question is: how would our buld change? I'd really appreciate a PR which shows best pratice ;-)

@cgravill
Copy link
Contributor

I have headless Chrome working with Canopy and Expecto on another project. I could draft a PR if that would help?

Rather than check in the drivers I used https://www.nuget.org/packages/Selenium.WebDriver.ChromeDriver/ (and the Gecko and Edge variants) which works well for us. That should avoid the need for the RenameDrivers target as well.

@forki
Copy link
Member Author

forki commented Mar 21, 2018

yes that is exactly what I hoped. getting drivers from nuget or npm.

@cgravill
Copy link
Contributor

cgravill commented Mar 21, 2018

Looks possible to switch:

Starting ChromeDriver 2.37.543627 (63642262d9fb93fb4ab52398be4286d844092a5e) on port 11238
Only local connections are allowed.
[0321/105831.498:ERROR:gpu_process_transport_factory.cc(1019)] Lost UI shared context.
DevTools listening on ws://127.0.0.1:12774/devtools/browser/2db2f1af-53ce-46ae-84a3-472b31dcf62f                        
EXPECTO version
[10:58:34 INF] EXPECTO? Running tests... <Expecto>
[0321/105844.828:INFO:CONSOLE(1)] "Error parsing url: http://localhost:8085/", source: http://localhost:8085/public/bundle.js (1)
[0321/105845.125:INFO:CONSOLE(1)] "Error parsing url: http://localhost:8085/", source: http://localhost:8085/public/bundle.js (1)
[0321/105851.322:INFO:CONSOLE(1)] "Error parsing url: http://localhost:8085/", source: http://localhost:8085/public/bundle.js (1)
[0321/105929.504:INFO:CONSOLE(1)] "Error parsing url: http://localhost:8085/", source: http://localhost:8085/public/bundle.js (1)
[11:00:27 INF] EXPECTO! 4 tests run in 00:01:52.9297318 - 4 passed, 0 ignored, 0 failed, 0 errored. Success! <Expecto>

(Windows output, worked on MacOS as well)

The main issue I see is that it expects Chrome to be present. That's true by default on AppVeyor and can be configured on TravisCI (https://docs.travis-ci.com/user/chrome) but a given user may not have it. Think that's an issue?

lefthandedgoat added a commit to lefthandedgoat/SAFE-BookStore that referenced this issue Mar 22, 2018
@lefthandedgoat
Copy link

PR here: #318

Hope this helps, please let me know if it you have any problems and I will do what I can to help.

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

4 participants