]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/e2e/cluster/crush-map.e2e-spec.ts
d/control: depend on python3-yaml for ceph-mgr
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / e2e / cluster / crush-map.e2e-spec.ts
1 import { $ } from 'protractor';
2 import { CrushMapPageHelper } from './crush-map.po';
3
4 describe('CRUSH map page', () => {
5 let crushmap: CrushMapPageHelper;
6
7 beforeAll(() => {
8 crushmap = new CrushMapPageHelper();
9 });
10
11 afterEach(async () => {
12 await CrushMapPageHelper.checkConsole();
13 });
14
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 });
43 });
44 });