Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit a899b67

Browse files
author
Erin Altenhof-Long
committed
test(ngHint): begin implementation of e2e tests
1 parent 0f95525 commit a899b67

File tree

8 files changed

+57
-1
lines changed

8 files changed

+57
-1
lines changed

conf.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
exports.config = {
2+
seleniumAddress: 'http://localhost:4444/wd/hub',
3+
4+
capabilities: {
5+
'browserName': 'chrome'
6+
},
7+
8+
specs: ['hint_test.js'],
9+
10+
jasmineNodeOpts: {
11+
showColors: true
12+
}
13+
};

e2e/inclusiveHint/app-controller.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
angular.module('sampleInclusiveHint').
2+
controller('HintController', ['$scope', function($scope) {
3+
var element = document.getElementById('test');
4+
}]);

e2e/inclusiveHint/app.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
angular.module('sampleInclusiveHint', ['ngRoute']).
2+
config(['$routeProvider', function($routeProvider) {
3+
$routeProvider.when('/inclusiveHint', {
4+
controller: 'HintController',
5+
controllerAs: 'hintCtrl',
6+
templateUrl: 'inclusiveHint.html'
7+
}).
8+
otherwise({redirectTo: '/inclusiveHint'});
9+
}]);

e2e/inclusiveHint/inclusiveHint.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
<div id="test"></div>
3+
</div>

e2e/inclusiveHint/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!doctype html>
2+
<html ng-app="sampleInclusiveHint">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Angular Hint Example</title>
6+
7+
<script src="../../bower_components/angular/angular.js"></script>
8+
<script src="../../bower_components/angular-route/angular-route.js"></script>
9+
<script src="../../dist/hint.js"></script>
10+
11+
<script src="app.js"></script>
12+
<script src="app-controller.js"></script>
13+
14+
</head>
15+
<body ng-hint-include="dom">
16+
<div ng-view></div>
17+
</body>
18+
</html>

example/noHint.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div id='noHint'></div>

hint_test.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ describe('angularHint', function() {
1212

1313

1414
it('should have an inclusive mode', function() {
15-
15+
//spyOn(console, 'log');
16+
browser.get('http://localhost:8080/e2e/inclusiveHint/#/inclusiveHint');
17+
//expect(console.log).toHaveBeenCalled();
1618
});
1719

1820

1921
it('should have an exclusive mode', function() {
2022

2123
});
24+
25+
it('should not bootstrap if ng-hint is not included', function() {
26+
27+
});
2228
});
2329
});

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
},
2626
"homepage": "https://github.com/angular/angular-hint",
2727
"dependencies": {
28+
"browserify": "^4.2.0",
2829
"controller-training": "git://github.com/angular/angular-hint-dom",
2930
"directive-director": "git://github.com/angular/angular-hint-directives",
31+
"gulp": "^3.8.5",
3032
"karma": "^0.12.16",
3133
"karma-chrome-launcher": "^0.1.4",
3234
"karma-jasmine": "^0.1.5"

0 commit comments

Comments
 (0)