scottohara / tvmanager

PWA for tracking recorded, watched & upcoming TV shows
MIT License
3 stars 0 forks source link

Instructions to run test suite on a physical device no longer work #70

Open scottohara opened 7 years ago

scottohara commented 7 years ago

In the README, instructions for running the the test suite on a physical device state:

To run the tests in Mobile Safari on a physical device:

  • start the test runner without launching the default browsers (npm run test:coverage -- --browsers)
  • the Karma server will pause waiting for a browser connection
  • manually launch Mobile Safari and browse to the URL shown in the terminal window (eg. http://localhost:9876)

Due to the change in https://github.com/karma-runner/karma/pull/1558, passing nothing for the --browsers argument is no longer allowed (so the only way is to manually comment out the browsers in karma.conf.js).

scottohara commented 7 years ago

Simulator issue is now resolved.

Running tests in the simulator is now handled by npm test and uses karma-ios-simulator-launcher.

Running the app in the simulator is still handled by rake simulator:run. The problem was that splitting the output of xcrun instruments -s devices on new lines was using .split('\n') but needed .split("\n") (double quotes, not single quotes). Note that this loads the app in a Safari browser tab, rather than the standalone version saved to the home screen.

There is still an issue with the instructions for running the test suite on a physical device, as the README still suggests passing nothing for the --browsers arg.

There is also

scottohara commented 5 years ago

As part of the move from thin/shotgun to puma/rerun, removed the rake simulator:run task as it didn't really add much value, required some extra gems (e.g. Open4), and was brittle.

The process for manual testing in the Simulator is not simply to run npm start as normal; then manually fire up the simulator and browse to http://localhost:3001.

Leaving this issue open for the karma start --browsers problem, however.

scottohara commented 3 years ago

Original issue description (saved for historical purposes):

In the README, instructions for running in the simulator are simply rake simulator:run, but this no longer seems to launch the Simulator after starting the server?

Also, instructions for testing in the simulator are rake simulator:test, which attempts to start the test running without the default browsers (eg. karma start --browsers). Due to the change in https://github.com/karma-runner/karma/pull/1558, passing nothing for the --browsers argument is no longer allowed (so the only way is to manually comment out the browsers in karma.conf.js).