|
1 | 1 | 'use strict';
|
2 | 2 |
|
3 | 3 | /* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
|
| 4 | +describe('Angular Timer E2E Tests', function () { |
4 | 5 |
|
5 |
| -describe('timer directive', function() { |
6 |
| - |
7 |
| - beforeEach(function() { |
8 |
| - browser().navigateTo('angular-timer/index.html'); |
| 6 | + beforeEach(function () { |
| 7 | + browser().navigateTo('/index.html'); |
9 | 8 | });
|
10 | 9 |
|
11 |
| - it('should stop when user click on stop button [Simple Timer]', function() { |
12 |
| - sleep(1); |
13 |
| - element('#basic-timer button:last-child').click(); |
14 |
| - var oldValue = element('#basic-timer span').text(); |
15 |
| - sleep(1); |
16 |
| - expect( element('#basic-timer span').text() ).toBe( oldValue ); |
17 |
| - }); |
18 |
| - |
19 |
| - it('should be reset when user click on start button again [Simple Timer]', function() { |
20 |
| - sleep(1); |
21 |
| - var oldValue = element('#basic-timer span').text(); |
22 |
| - element('#basic-timer button:nth-child(3)').click(); |
23 |
| - element('#basic-timer button:last-child').click(); |
24 |
| - expect( element('#basic-timer span').text() ).toBeLessThan( oldValue ); |
| 10 | + it("Simple Timer - Should stop ticking when user clicks 'Stop' button", function () { |
| 11 | + sleep(1); |
| 12 | + element('#basic-timer button:last-child').click(); |
| 13 | + var oldValue = element('#basic-timer span').text(); |
| 14 | + sleep(1); |
| 15 | + expect( element('#basic-timer span').text() ).toBe( oldValue ); |
25 | 16 | });
|
26 | 17 |
|
| 18 | + it('Simple Timer - Should reset timer value when user click on start button again', function () { |
| 19 | + sleep(1); |
| 20 | + var oldValue = element('#basic-timer span').text(); |
| 21 | + element('#basic-timer button:nth-child(3)').click(); |
| 22 | + element('#basic-timer button:last-child').click(); |
| 23 | + expect( element('#basic-timer span').text() ).toBeLessThan( oldValue ); |
| 24 | + }); |
27 | 25 | });
|
0 commit comments