karma-runner / karma-edge-launcher

A Karma plugin. Launcher for Microsoft Edge.
MIT License
21 stars 7 forks source link

Edge does not close its tabs #4

Closed SanderDeWaal1992 closed 5 years ago

SanderDeWaal1992 commented 6 years ago

After running karma tests on edge, it does not close its tabs.

Making use of: karma-webdriverio-launcher@0.0.1 karma-edge-launcher@0.4.2 Edge version: Microsoft Edge 42.17134.1.0

nickserv commented 6 years ago

Thanks for reporting, I was aware of this. This seems to be related to https://github.com/nickmccurdy/karma-edge-launcher/pull/33, we should move it to this new repository and test it.

nickserv commented 6 years ago

I just tested that PR again with my latest stable release of Windows 10 Pro targeted, and unfortunately it still produces the extra tabs. At this point with all the workarounds we've tried, I think this has to be fixed upstream in the following edge-launcher issues:

I'm not experienced in native C# development on Windows, but if anyone can contribute who is I'd be happy to review and test changes in karma-edge-launcher to fix this issue.

jslegers commented 5 years ago

I didn't get either 0.4.2 or 0.4.3 to work as expected.

Version 0.4.2 closed Edge correctly, but open tabs were re-opened during the next run. This caused Edge to have X open tabs after X runs.

Version 0.4.3 failed to close Edge. And next run, Edge refused to start because it already was open.

I combined what worked in 0.4.2 with what worked in 0.4.3 and added some paths of this script, and now everything works as expected in my test environment.

With my changes, Edge now correctly starts with just one tab open every test run, and gets closed correctly afterwards.

For my changes, see https://github.com/karma-runner/karma-edge-launcher/pull/9