1 import { $ } from 'protractor';
2 import { CrushMapPageHelper } from './crush-map.po';
4 describe('CRUSH map page', () => {
5 let crushmap: CrushMapPageHelper;
8 crushmap = new CrushMapPageHelper();
11 afterEach(async () => {
12 await CrushMapPageHelper.checkConsole();
15 describe('breadcrumb test', () => {
16 beforeAll(async () => {
17 await crushmap.navigateTo();
20 it('should open and show breadcrumb', async () => {
21 await crushmap.waitTextToBePresent(crushmap.getBreadcrumb(), 'CRUSH map');
24 describe('fields check', () => {
25 beforeAll(async () => {
26 await crushmap.navigateTo();
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');
33 // Check that title appears once OSD is clicked
34 await crushmap.getCrushNode(1).click();
36 const label = await $('legend').getText(); // Get table label
37 await expect(crushmap.getCrushNode(1).getText()).toEqual(label);
39 // Check that table appears once OSD is clicked
40 await crushmap.waitVisibility($('.datatable-body'));
41 await expect($('.datatable-body').isDisplayed()).toBe(true);