Skip to content

Commit 2e9078b

Browse files
committed
working on unit test
1 parent 06d0507 commit 2e9078b

File tree

2 files changed

+7
-34
lines changed

2 files changed

+7
-34
lines changed

config/karma-e2e.conf.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
basePath = '../';
22

33
files = [
4+
'jquery/jquery-1.9.1.min.js',
45
ANGULAR_SCENARIO,
56
ANGULAR_SCENARIO_ADAPTER,
67
'test/e2e/**/*.js'

test/e2e/scenarios.js

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,16 @@
22

33
/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
44

5-
describe('my app', function() {
5+
describe('timer directive', function() {
66

77
beforeEach(function() {
8-
browser().navigateTo('../../app/index.html');
8+
browser().navigateTo('../../index.html');
99
});
1010

11-
12-
it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
13-
expect(browser().location().url()).toBe("/view1");
14-
});
15-
16-
17-
describe('view1', function() {
18-
19-
beforeEach(function() {
20-
browser().navigateTo('#/view1');
21-
});
22-
23-
24-
it('should render view1 when user navigates to /view1', function() {
25-
expect(element('[ng-view] p:first').text()).
26-
toMatch(/partial for view 1/);
27-
});
28-
11+
it('Simple timer', function() {
12+
sleep(2);
13+
var basicExample = angular.element('#timer1');
14+
console.log('######## basicExample = ', basicExample.html());
2915
});
3016

31-
32-
describe('view2', function() {
33-
34-
beforeEach(function() {
35-
browser().navigateTo('#/view2');
36-
});
37-
38-
39-
it('should render view2 when user navigates to /view2', function() {
40-
expect(element('[ng-view] p:first').text()).
41-
toMatch(/partial for view 2/);
42-
});
43-
44-
});
4517
});

0 commit comments

Comments
 (0)