Clone the repository using git:
git clone https://github.com/luisgrases/antiloopTest
cd antiloopTest
npm
is preconfigured to automatically run bower
so we can simply do:
npm install
Behind the scenes this will also call bower install
. You should find that you have two new folders in your project.
node_modules
- contains the npm packages for the tools we needapp/bower_components
- contains the angular framework files
Note that the bower_components
folder would normally be installed in the root folder but
this repository changes this location through the .bowerrc
file. Putting it in the app folder makes
it easier to serve the files by a webserver.
The project is preconfigured with a simple development web server. The simplest way to start this server is:
npm start
This command will also compile all .less
files into app.css
. This compilation will occur each time a change is made in any .less
file.
Now browse to the app at http://localhost:8000/index.html
.
The app comes with end-to-end tests, again written in [Jasmine][jasmine]. These tests are run with the [Protractor][protractor] End-to-End test runner. It uses native events and has special features for Angular applications.
- the configuration is found at
e2e-tests/protractor-conf.js
- the end-to-end tests are found in
e2e-tests/scenarios.js
Protractor simulates interaction with our web app and verifies that the application responds correctly. Therefore, our web server needs to be serving up the application, so that Protractor can interact with it.
npm start
In addition, since Protractor is built upon WebDriver we need to install this. The angular-seed project comes with a predefined script to do this:
npm run update-webdriver
This will download and install the latest version of the stand-alone WebDriver tool.
Once you have ensured that the development web server hosting our application is up and running and WebDriver is updated, you can run the end-to-end tests using the supplied npm script:
npm run protractor
This script will execute the end-to-end tests against the application being hosted on the development server.