|
2 | 2 |
|
3 | 3 | /* https://github.com/angular/protractor/blob/master/docs/toc.md */
|
4 | 4 |
|
5 |
| -describe('my app', function() { |
6 |
| - |
7 |
| - |
8 |
| - it('should automatically redirect to /view1 when location hash/fragment is empty', function() { |
| 5 | +describe('my app', () => { |
| 6 | + it('should automatically redirect to /view1 when location hash/fragment is empty', () => { |
9 | 7 | browser.get('index.html');
|
10 | 8 | expect(browser.getLocationAbsUrl()).toMatch("/view1");
|
11 | 9 | });
|
12 | 10 |
|
13 |
| - |
14 |
| - describe('view1', function() { |
15 |
| - |
16 |
| - beforeEach(function() { |
| 11 | + describe('view1', () => { |
| 12 | + beforeEach(() => { |
17 | 13 | browser.get('index.html#/view1');
|
18 | 14 | });
|
19 | 15 |
|
20 |
| - |
21 |
| - it('should render view1 when user navigates to /view1', function() { |
22 |
| - expect(element.all(by.css('[ng-view] p')).first().getText()). |
23 |
| - toMatch(/partial for view 1/); |
| 16 | + it('should render view1 when user navigates to /view1', () => { |
| 17 | + expect(element.all(by.css('[ng-view] p')).first().getText()).toMatch(/partial for view 1/); |
24 | 18 | });
|
25 |
| - |
26 | 19 | });
|
27 | 20 |
|
28 |
| - |
29 |
| - describe('view2', function() { |
30 |
| - |
31 |
| - beforeEach(function() { |
| 21 | + describe('view2', () => { |
| 22 | + beforeEach(() => { |
32 | 23 | browser.get('index.html#/view2');
|
33 | 24 | });
|
34 | 25 |
|
35 |
| - |
36 |
| - it('should render view2 when user navigates to /view2', function() { |
37 |
| - expect(element.all(by.css('[ng-view] p')).first().getText()). |
38 |
| - toMatch(/partial for view 2/); |
| 26 | + it('should render view2 when user navigates to /view2', () => { |
| 27 | + expect(element.all(by.css('[ng-view] p')).first().getText()).toMatch(/partial for view 2/); |
39 | 28 | });
|
40 |
| - |
41 | 29 | });
|
42 | 30 | });
|
0 commit comments