I am trying to have Testem launching my tests into Chrome browser with specific extension(s) loaded, but by default it's a blank Chrome profile which is started, and which doesn't persist extensions from one run to another.
My goal is for example having Testem to launch the Chrome browser pre-loaded with the Ember Inspector so that I can debug tests using that tool.
I wanted to know if that is possible, and if so, how.
Unfortunately there doesn't seem to be a built-in way that I can find.
If you want a quick and dirty solution, I recommend the following:
The available browsers in
testemare defined intestem/lib/browser_launcher.jsIf you want to modify the file thatember-cliuses, this will be the full path:This file has a function called
browsersForPlatform(). Find your platform and the entry for Chrome. For Darwin the relevant entry is as follows:You'll want to change the
argsso it gets called as you like. My guess is the problem is that--user-data-dirpoints to a tmp directory. Perhaps simply removing this will solve the problem.Ideally, testem would offer a way in the testem.json file to override browser options. This would probably be a reasonably straightforward contribution to the testem project if you're interested and there is interest among the maintainers.
If you go the route of changing
browser_launcher.jsjust remember that it will get clobbered every time the node package gets updated. I assume there is a way you can install a forked version and then keep your copy up to date as you see fit.