Ajout exo protractor
This commit is contained in:
@ -1,12 +0,0 @@
|
||||
var myApp = angular.module('myApp', []);
|
||||
|
||||
myApp.controller('ExoCtrl', ['$scope', function($scope) {
|
||||
|
||||
$scope.val1 = 1;
|
||||
$scope.val2 = 2;
|
||||
|
||||
$scope.add = function() {
|
||||
$scope.result = $scope.val1 + $scope.val2;
|
||||
};
|
||||
|
||||
}]);
|
4
javascript/angular/exercices/protractor/conf.js
vendored
Normal file
4
javascript/angular/exercices/protractor/conf.js
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
exports.config = {
|
||||
seleniumAddress: 'http://localhost:4444/wd/hub',
|
||||
specs: ['test/todomvc-spec.js']
|
||||
};
|
14
javascript/angular/exercices/protractor/package.json
Normal file
14
javascript/angular/exercices/protractor/package.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "protractor-exo",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"protractor": "^2.0.0"
|
||||
}
|
||||
}
|
13
javascript/angular/exercices/protractor/test/todomvc-spec.js
vendored
Normal file
13
javascript/angular/exercices/protractor/test/todomvc-spec.js
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
describe('TodoMVC spec', function() {
|
||||
|
||||
it('should navigate to TodoMVC/Angular', function() {
|
||||
|
||||
// Documentation API: http://angular.github.io/protractor/#/api
|
||||
|
||||
browser.get('http://todomvc.com/examples/angularjs/');
|
||||
|
||||
expect(browser.getCurrentUrl()).toBe('http://todomvc.com/examples/angularjs/#/');
|
||||
|
||||
});
|
||||
|
||||
});
|
Reference in New Issue
Block a user