Ajout exo protractor

This commit is contained in:
William Petit 2015-04-10 01:01:21 +02:00
parent 22eb8175fe
commit 1d015b15d5
13 changed files with 156 additions and 19 deletions

View File

@ -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;
};
}]);

View File

@ -0,0 +1,4 @@
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['test/todomvc-spec.js']
};

View 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"
}
}

View 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/#/');
});
});

View File

@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
width="681.96252"
height="187.5"
id="svg2"
xml:space="preserve"><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs6"><clipPath
id="clipPath18"><path
d="M 0,1500 0,0 l 5455.74,0 0,1500 L 0,1500 z"
inkscape:connector-curvature="0"
id="path20" /></clipPath></defs><g
transform="matrix(1.25,0,0,-1.25,0,187.5)"
id="g10"><g
transform="scale(0.1,0.1)"
id="g12"><g
id="g14"><g
clip-path="url(#clipPath18)"
id="g16"><path
d="m 1544,599.434 c 0.92,-40.352 25.68,-81.602 71.53,-81.602 27.51,0 47.68,12.832 61.44,35.754 12.83,22.93 12.83,56.852 12.83,82.527 l 0,329.184 -71.52,0 0,104.543 266.83,0 0,-104.543 -70.6,0 0,-344.77 c 0,-58.691 -3.68,-104.531 -44.93,-152.218 -36.68,-42.18 -96.28,-66.02 -153.14,-66.02 -117.37,0 -207.24,77.941 -202.64,197.145 l 130.2,0"
inkscape:connector-curvature="0"
id="path22"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 2301.4,662.695 c 0,80.703 -66.94,145.813 -147.63,145.813 -83.44,0 -147.63,-68.781 -147.63,-151.301 0,-79.785 66.94,-145.801 145.8,-145.801 84.35,0 149.46,67.852 149.46,151.289 z m -1.83,-181.547 c -35.77,-54.097 -93.53,-78.859 -157.72,-78.859 -140.3,0 -251.24,116.449 -251.24,254.918 0,142.129 113.7,260.41 256.74,260.41 63.27,0 118.29,-29.336 152.22,-82.523 l 0,69.687 175.14,0 0,-104.527 -61.44,0 0,-280.598 61.44,0 0,-104.527 -175.14,0 0,66.019"
inkscape:connector-curvature="0"
id="path24"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 2622.33,557.258 c 3.67,-44.016 33.01,-73.348 78.86,-73.348 33.93,0 66.93,23.824 66.93,60.504 0,48.606 -45.84,56.856 -83.44,66.941 -85.28,22.004 -178.81,48.606 -178.81,155.879 0,93.536 78.86,147.633 165.98,147.633 44,0 83.43,-9.176 110.94,-44.008 l 0,33.922 82.53,0 0,-132.965 -108.21,0 c -1.83,34.856 -28.42,57.774 -63.26,57.774 -30.26,0 -62.35,-17.422 -62.35,-51.348 0,-45.847 44.93,-55.93 80.69,-64.18 88.02,-20.175 182.47,-47.695 182.47,-157.734 0,-99.027 -83.44,-154.039 -175.13,-154.039 -49.53,0 -94.46,15.582 -126.55,53.18 l 0,-40.34 -85.27,0 0,142.129 114.62,0"
inkscape:connector-curvature="0"
id="path26"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 2988.18,800.254 -63.26,0 0,104.527 165.05,0 0,-73.355 c 31.18,51.347 78.86,85.277 141.21,85.277 67.85,0 124.71,-41.258 152.21,-102.699 26.6,62.351 92.62,102.699 160.47,102.699 53.19,0 105.46,-22 141.21,-62.351 38.52,-44.938 38.52,-93.532 38.52,-149.457 l 0,-185.239 63.27,0 0,-104.527 -238.42,0 0,104.527 63.28,0 0,157.715 c 0,32.102 0,60.527 -14.67,88.957 -18.34,26.582 -48.61,40.344 -79.77,40.344 -30.26,0 -63.28,-12.844 -82.53,-36.672 -22.93,-29.355 -22.93,-56.863 -22.93,-92.629 l 0,-157.715 63.27,0 0,-104.527 -238.41,0 0,104.527 63.28,0 0,150.383 c 0,29.348 0,66.023 -14.67,91.699 -15.59,29.336 -47.69,44.934 -80.7,44.934 -31.18,0 -57.77,-11.008 -77.94,-35.774 -24.77,-30.253 -26.6,-62.343 -26.6,-99.941 l 0,-151.301 63.27,0 0,-104.527 -238.4,0 0,104.527 63.26,0 0,280.598"
inkscape:connector-curvature="0"
id="path28"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 3998.66,951.547 -111.87,0 0,118.293 111.87,0 0,-118.293 z m 0,-431.891 63.27,0 0,-104.527 -239.33,0 0,104.527 64.19,0 0,280.598 -63.27,0 0,104.527 175.14,0 0,-385.125"
inkscape:connector-curvature="0"
id="path30"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 4159.12,800.254 -63.27,0 0,104.527 175.14,0 0,-69.687 c 29.35,54.101 84.36,80.699 144.87,80.699 53.19,0 105.45,-22.016 141.22,-60.527 40.34,-44.934 41.26,-88.032 41.26,-143.957 l 0,-191.653 63.27,0 0,-104.527 -238.4,0 0,104.527 63.26,0 0,158.637 c 0,30.262 0,61.434 -19.26,88.035 -20.17,26.582 -53.18,39.414 -86.19,39.414 -33.93,0 -68.77,-13.75 -88.94,-41.25 -21.09,-27.5 -21.09,-69.687 -21.09,-102.707 l 0,-142.129 63.26,0 0,-104.527 -238.4,0 0,104.527 63.27,0 0,280.598"
inkscape:connector-curvature="0"
id="path32"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 5082.48,703.965 c -19.24,70.605 -81.6,115.547 -154.04,115.547 -66.04,0 -129.3,-51.348 -143.05,-115.547 l 297.09,0 z m 85.27,-144.883 c -38.51,-93.523 -129.27,-156.793 -231.05,-156.793 -143.07,0 -257.68,111.871 -257.68,255.836 0,144.883 109.12,261.328 254.91,261.328 67.87,0 135.72,-30.258 183.39,-78.863 48.62,-51.344 68.79,-113.695 68.79,-183.383 l -3.67,-39.434 -396.13,0 c 14.67,-67.863 77.03,-117.363 146.72,-117.363 48.59,0 90.76,18.328 118.28,58.672 l 116.44,0"
inkscape:connector-curvature="0"
id="path34"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 690.895,850.703 90.75,0 22.543,31.035 0,243.122 -135.829,0 0,-243.141 22.536,-31.016"
inkscape:connector-curvature="0"
id="path36"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 632.395,742.258 28.039,86.304 -22.551,31.04 -231.223,75.128 -41.976,-129.183 231.257,-75.137 36.454,11.848"
inkscape:connector-curvature="0"
id="path38"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 717.449,653.105 -73.41,53.36 -36.488,-11.875 -142.903,-196.692 109.883,-79.828 142.918,196.703 0,38.332"
inkscape:connector-curvature="0"
id="path40"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 828.52,706.465 -73.426,-53.34 0.011,-38.359 L 898.004,418.07 1007.9,497.898 864.973,694.609 828.52,706.465"
inkscape:connector-curvature="0"
id="path42"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 812.086,828.586 28.055,-86.32 36.484,-11.836 231.225,75.117 -41.97,129.183 -231.239,-75.14 -22.555,-31.004"
inkscape:connector-curvature="0"
id="path44"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 736.301,1335.88 c -323.047,0 -585.875,-262.78 -585.875,-585.782 0,-323.118 262.828,-585.977 585.875,-585.977 323.019,0 585.809,262.859 585.809,585.977 0,323.002 -262.79,585.782 -585.809,585.782 l 0,0 z m 0,-118.61 c 257.972,0 467.189,-209.13 467.189,-467.172 0,-258.129 -209.217,-467.348 -467.189,-467.348 -258.074,0 -467.254,209.219 -467.254,467.348 0,258.042 209.18,467.172 467.254,467.172"
inkscape:connector-curvature="0"
id="path46"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 1091.13,619.883 -175.771,57.121 11.629,35.808 175.762,-57.121 -11.62,-35.808"
inkscape:connector-curvature="0"
id="path48"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="M 866.957,902.074 836.5,924.199 945.121,1073.73 975.586,1051.61 866.957,902.074"
inkscape:connector-curvature="0"
id="path50"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="M 607.465,903.445 498.855,1052.97 529.32,1075.1 637.93,925.566 607.465,903.445"
inkscape:connector-curvature="0"
id="path52"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 380.688,622.129 -11.626,35.801 175.758,57.09 11.621,-35.801 -175.753,-57.09"
inkscape:connector-curvature="0"
id="path54"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /><path
d="m 716.289,376.59 37.6406,0 0,184.816 -37.6406,0 0,-184.816 z"
inkscape:connector-curvature="0"
id="path56"
style="fill:#8a4182;fill-opacity:1;fill-rule:nonzero;stroke:none" /></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -42,6 +42,7 @@
'projet-outils-2',
'projet-outils-3',
'projet-outils-4',
'projet-outils-5',
'questions',
'licence'
];

View File

@ -36,11 +36,11 @@
- Les filtres (exercice filtres-1)
- Création de directives
- Utilisation de modules
- Routage avec module ngRoute
- Routage avec module ngRoute (exercice routage)
- API REST & ngResource
- Menée de projet et outils
- Structuration d'un projet
- Batarang
- ng-inspector
- Tests unitaires
- Tests fonctionnels
- Mise en pratique

View File

@ -1,4 +1,4 @@
# .cadoles-slide-title[Menée de projet & outils (1/)]
# .cadoles-slide-title[Menée de projet & outils (1/5)]
**Organisation d'un petit projet**
```text

View File

@ -1,4 +1,4 @@
# .cadoles-slide-title[Menée de projet & outils (2/)]
# .cadoles-slide-title[Menée de projet & outils (2/5)]
**Organisation d'un projet plus important**
```text

View File

@ -1,4 +1,4 @@
# .cadoles-slide-title[Menée de projet & outils (3/)]
# .cadoles-slide-title[Menée de projet & outils (3/5)]
**Extension Chromium: ng-inspector**

View File

@ -1,7 +1,13 @@
# .cadoles-slide-title[Menée de projet & outils (4/)]
# .cadoles-slide-title[Menée de projet & outils (4/5)]
**Tests unitaires avec Karma & Jasmine**
.cadoles-center[
- [Jasmine](https://jasmine.github.io/), librairie de tests unitaires
- [Karma](https://karma-runner.github.io), dérouleur de tests unitaire, basé sur la technologie Webdriver.
.cadoles-left-column[
<img src="img/karma.png" style="max-width: 100%" />
]
.cadoles-right-column[
<img src="img/jasmine-horizontal.svg" style="max-width: 100%" />
]

View File

@ -0,0 +1,9 @@
# .cadoles-slide-title[Menée de projet & outils (5/5)]
**Tests fonctionnels avec Protractor**
- [Protractor](http://angular.github.io/protractor/), dérouleur de tests fonctionnels
.cadoles-center[
<img src="img/protractor-logo-450.png" style="max-width: 100%" />
]