블로그 이미지
플로거
Android/J2EE/Web/Spring/Database

calendar

        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Notice

Statistics Graph
2019.01.03 12:59 Programming/Angular

PhoneCat Tutorial App


  • Environment Setup

Install Git - http://git-scm.com/download

Install Node.js - https://nodejs.org/en/download

node --version - Node.js v4+

git clone --depth=16 https://github.com/angular/angular-phonecat.git

cd angular-phonecat


  • npm install

This command reads angular-phonecat's package.json file and downloads the following tools into the node_modules directory:

Running npm install will also automatically use bower to download the AngularJS framework into the app/bower_components directory.

npm install -g bower -> bower install

npm start  -> Running the Development Web Server


  • Running Unit Tests

npm test

Karma - https://karma-runner.github.io/1.0/index.html

app/phone-list.component.spec.js

describe('phoneList', function() {
 // Load the module that contains the `phoneList` component before each test
 beforeEach(module('phonecatApp'));
 // Test the controller
 describe('PhoneListController', function() {
   it('should create a `phones` model with 3 phones', inject(function($componentController) {
     var ctrl = $componentController('phoneList');
     expect(ctrl.phones.length).toBe(3);
   })); }); });


  • Running E2E Tests

The E2E tests are kept in the e2e-tests directory.

cd e2e-tests

npm run update-webdriver

npm start

npm run protractor - seperate terminal/command

protractor.conf.js

scenarios.js


posted by 훈즈 플로거
prev 1 2 3 4 5 6 7 8 next