Demonstration showing benefits using framework like Angular in our search widget part. For all our front-end magic we use Grunt. Current setup:
- Github (purely for this demo)
- CodeShip (hook to github, doing unit/e2e tests, build package and deploy to cloud)
- Travis-ci (purely to show how e2e looks like in console, task itself is in CodeShip)
- Sauce Labs (virtual browsers)
- Heroku (sample cloud)
- https://github.com/SquadraCorse/angular-poc (source code)
- https://www.codeship.io/projects/20027 (codeship setup: from commit master to publishing on Heroku)
- https://travis-ci.org/SquadraCorse/angular-poc (travis: do grunt build (packaging) and unit and e2e testing)
- http://travel-search.herokuapp.com/ (heroku: deploy app)
- Run
npm start - navigate your browser to
http://localhost:8000/src/app/index.htmlto see the app running in your browser.
We recommend using [Jasmine][jasmine] and [Karma][karma] for your unit tests/specs, but you are free to use whatever works for you.
- Ensure the tools are installed: run
npm install. - Start Karma with
grunt test:unit- A browser will start and connect to the Karma server. Chrome is the default browser, others can be captured by loading the same url as the one in Chrome.
- Karma will sit and watch your application and test JavaScript files. To run or re-run tests just change any of your these files.
We recommend using [Jasmine][jasmine] and [Protractor][protractor] for end-to-end testing.
Requires a webserver that serves the application. See Running the app during development, above.
- Ensure that the tools are installed: run
npm install. - Start the end2end tests with:
grunt e2e:dev. Protractor will execute the end2end test scripts against the web application itself.- The configuration is set up to run the tests on Chrome directly. If you want to run against
other browsers then you must install the webDriver,
npm run update-webdriver. - Currently integration with Sauce Labs is done in order to test multiple browsers
- The configuration is set up to run the tests on Chrome directly. If you want to run against
other browsers then you must install the webDriver,