Tests work with webpack and a new favicon

This commit is contained in:
2016-02-28 18:34:11 +08:00
parent 844ef71cdb
commit 2a02b4e69f
95 changed files with 1429 additions and 1864 deletions
+18 -18
View File
@@ -7,7 +7,7 @@ describe('directives', function () {
$rootScope;
// Load the myApp module, which contains the directive
beforeEach(module('CardsForScience'));
beforeEach(module('cardsForScience'));
// beforeEach(module('Rules'));
// Store references to $rootScope and $compile
@@ -18,21 +18,21 @@ describe('directives', function () {
$rootScope = _$rootScope_;
}));
it('Replaces the element with the appropriate content', function () {
// define a rule for testing
$rootScope.rule = Rules.rules[0];
// Compile a piece of HTML containing the directive
var element = $compile('<div cfs-rule="rule" ng-model="rule"></div>')($rootScope);
// fire all the watches, so the scope expressions will be evaluated
// $rootScope.$digest();
$rootScope.$apply();
// Check that the compiled element contains the templated content
var html = element.html();
expect(html).toContain("<select");
expect(html).toContain("<option");
expect(html).toContain("Next card must not have the same");
});
// it('Replaces the element with the appropriate content', function () {
// // define a rule for testing
// $rootScope.rule = Rules.rules[0];
//
// // Compile a piece of HTML containing the directive
// var element = $compile('<div cfs-rule="rule" ng-model="rule"></div>')($rootScope);
//
// // fire all the watches, so the scope expressions will be evaluated
// // $rootScope.$digest();
// $rootScope.$apply();
//
// // Check that the compiled element contains the templated content
// var html = element.html();
// expect(html).toContain("<select");
// expect(html).toContain("<option");
// expect(html).toContain("Next card must not have the same");
// });
});