]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | import { $ } from 'protractor'; |
2 | import { CrushMapPageHelper } from './crush-map.po'; | |
11fdf7f2 TL |
3 | |
4 | describe('CRUSH map page', () => { | |
9f95a23c | 5 | let crushmap: CrushMapPageHelper; |
11fdf7f2 TL |
6 | |
7 | beforeAll(() => { | |
9f95a23c | 8 | crushmap = new CrushMapPageHelper(); |
11fdf7f2 TL |
9 | }); |
10 | ||
9f95a23c TL |
11 | afterEach(async () => { |
12 | await CrushMapPageHelper.checkConsole(); | |
11fdf7f2 TL |
13 | }); |
14 | ||
9f95a23c TL |
15 | describe('breadcrumb test', () => { |
16 | beforeAll(async () => { | |
17 | await crushmap.navigateTo(); | |
18 | }); | |
19 | ||
20 | it('should open and show breadcrumb', async () => { | |
21 | await crushmap.waitTextToBePresent(crushmap.getBreadcrumb(), 'CRUSH map'); | |
22 | }); | |
23 | }); | |
24 | describe('fields check', () => { | |
25 | beforeAll(async () => { | |
26 | await crushmap.navigateTo(); | |
27 | }); | |
28 | ||
29 | it('should check that title & table appears', async () => { | |
30 | // Check that title (CRUSH map viewer) appears | |
31 | await expect(crushmap.getPageTitle()).toMatch('CRUSH map viewer'); | |
32 | ||
33 | // Check that title appears once OSD is clicked | |
34 | await crushmap.getCrushNode(1).click(); | |
35 | ||
36 | const label = await $('legend').getText(); // Get table label | |
37 | await expect(crushmap.getCrushNode(1).getText()).toEqual(label); | |
38 | ||
39 | // Check that table appears once OSD is clicked | |
40 | await crushmap.waitVisibility($('.datatable-body')); | |
41 | await expect($('.datatable-body').isDisplayed()).toBe(true); | |
42 | }); | |
11fdf7f2 TL |
43 | }); |
44 | }); |