refactor(test/e2e): restore consistency across tests (just because)
This commit is contained in:
committed by
Peter Bacon Darwin
parent
26dac5784a
commit
fa81df4779
@@ -1,10 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="test">
|
||||
<div ng-controller="TestCtrl">
|
||||
<p>{{text}}</p>
|
||||
</div>
|
||||
<body>
|
||||
<div ng-controller="TestController">
|
||||
<p>{{text}}</p>
|
||||
</div>
|
||||
|
||||
<script src="angular.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="script.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+4
-3
@@ -1,4 +1,5 @@
|
||||
angular.module("test", []).
|
||||
controller("TestCtrl", function($scope) {
|
||||
$scope.text = "Hello, world!";
|
||||
angular.
|
||||
module('test', []).
|
||||
controller('TestController', function($scope) {
|
||||
$scope.text = 'Hello, world!';
|
||||
});
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="test">
|
||||
<div ng-controller="TestCtrl">
|
||||
<p>{{text}}</p>
|
||||
</div>
|
||||
<body>
|
||||
<div ng-controller="TestController">
|
||||
<p>{{text}}</p>
|
||||
</div>
|
||||
|
||||
<script src="angular-loader.js"></script>
|
||||
<script src="angular-touch.js"></script>
|
||||
<script src="angular-sanitize.js"></script>
|
||||
<script src="angular-route.js"></script>
|
||||
<script src="angular-resource.js"></script>
|
||||
<script src="angular-parse-ext.js"></script>
|
||||
<script src="angular-messages.js"></script>
|
||||
<script src="angular-message-format.js"></script>
|
||||
<script src="angular-cookies.js"></script>
|
||||
<script src="angular-aria.js"></script>
|
||||
<script src="angular-animate.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="script.js"></script>
|
||||
<!-- Load modules before `angular.js` -->
|
||||
<script src="angular-loader.js"></script>
|
||||
<script src="angular-touch.js"></script>
|
||||
<script src="angular-sanitize.js"></script>
|
||||
<script src="angular-route.js"></script>
|
||||
<script src="angular-resource.js"></script>
|
||||
<script src="angular-parse-ext.js"></script>
|
||||
<script src="angular-messages.js"></script>
|
||||
<script src="angular-message-format.js"></script>
|
||||
<script src="angular-cookies.js"></script>
|
||||
<script src="angular-aria.js"></script>
|
||||
<script src="angular-animate.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -11,6 +11,6 @@ angular.
|
||||
'ngAria',
|
||||
'ngAnimate'
|
||||
]).
|
||||
controller('TestCtrl', function TestCtrl($scope) {
|
||||
controller('TestController', function($scope) {
|
||||
$scope.text = 'Hello, world!';
|
||||
});
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
window[''] = window.jQuery;
|
||||
</script>
|
||||
<script src="angular.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
angular.module('test', [])
|
||||
.run(function($rootScope) {
|
||||
angular.
|
||||
module('test', []).
|
||||
run(function($rootScope) {
|
||||
$rootScope.jqueryVersion = window.angular.element().jquery || 'jqLite';
|
||||
});
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="test" ng-jq="jQuery_2_1_0">
|
||||
<body>
|
||||
{{jqueryVersion}}
|
||||
{{jqueryVersion}}
|
||||
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
|
||||
<script>
|
||||
var jQuery_2_1_0 = jQuery.noConflict();
|
||||
</script>
|
||||
<script src="../../../../bower_components/jquery/dist/jquery.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</body>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
|
||||
<script>
|
||||
var jQuery_2_1_0 = jQuery.noConflict();
|
||||
</script>
|
||||
<script src="../../../../bower_components/jquery/dist/jquery.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
angular.module('test', [])
|
||||
.run(function($rootScope) {
|
||||
angular.
|
||||
module('test', []).
|
||||
run(function($rootScope) {
|
||||
$rootScope.jqueryVersion = window.angular.element().jquery || 'jqLite';
|
||||
});
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html ng-app="test">
|
||||
<div ng-controller="TestCtrl">
|
||||
<p>{{text}}</p>
|
||||
</div>
|
||||
<body>
|
||||
<div ng-controller="TestController">
|
||||
<p>{{text}}</p>
|
||||
</div>
|
||||
|
||||
<script src="angular.js"></script>
|
||||
<script src="script.js"></script>
|
||||
<script src="angular.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
angular.module("test", []).
|
||||
controller("TestCtrl", function($scope) {
|
||||
$scope.text = "Hello, world!";
|
||||
angular.
|
||||
module('test', []).
|
||||
controller('TestController', function($scope) {
|
||||
$scope.text = 'Hello, world!';
|
||||
});
|
||||
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
describe('App where angular is loaded more than once', function() {
|
||||
beforeEach(function() {
|
||||
loadFixture("angular-already-loaded").andWaitForAngular();
|
||||
loadFixture('angular-already-loaded').andWaitForAngular();
|
||||
});
|
||||
|
||||
it('should have the interpolated text', function() {
|
||||
expect(element(by.binding('text')).getText())
|
||||
.toBe('Hello, world!');
|
||||
expect(element(by.binding('text')).getText()).toBe('Hello, world!');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
describe('loader', function() {
|
||||
describe('angular-loader', function() {
|
||||
beforeEach(function() {
|
||||
loadFixture("loader").andWaitForAngular();
|
||||
loadFixture('loader').andWaitForAngular();
|
||||
});
|
||||
|
||||
it('should not be broken by loading the modules before core', function() {
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
describe('Customizing the jqlite / jquery version', function() {
|
||||
|
||||
it('should be able to force jqlite', function() {
|
||||
loadFixture("ngJq").andWaitForAngular();
|
||||
describe('Customizing the jqLite / jQuery version', function() {
|
||||
it('should be able to force jqLite', function() {
|
||||
loadFixture('ngJq').andWaitForAngular();
|
||||
expect(element(by.binding('jqueryVersion')).getText()).toBe('jqLite');
|
||||
});
|
||||
|
||||
it('should be able to use a specific version jQuery', function() {
|
||||
loadFixture("ngJqJquery").andWaitForAngular();
|
||||
loadFixture('ngJqJquery').andWaitForAngular();
|
||||
expect(element(by.binding('jqueryVersion')).getText()).toBe('2.1.0');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
// Sample E2E test:
|
||||
//
|
||||
describe('Sample', function() {
|
||||
beforeEach(function() {
|
||||
loadFixture("sample").andWaitForAngular();
|
||||
loadFixture('sample').andWaitForAngular();
|
||||
});
|
||||
|
||||
it('should have the interpolated text', function() {
|
||||
expect(element(by.binding('text')).getText())
|
||||
.toBe('Hello, world!');
|
||||
expect(element(by.binding('text')).getText()).toBe('Hello, world!');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user