]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/e2e/rgw/daemons.po.ts
c1cb9d7b3b53faca54cb8d21ed308a96071afe26
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / e2e / rgw / daemons.po.ts
1 import { $$, by, element } from 'protractor';
2 import { PageHelper } from '../page-helper.po';
3
4 export class DaemonsPageHelper extends PageHelper {
5 pages = { index: '/#/rgw/daemon' };
6
7 async checkTables() {
8 await this.navigateTo();
9
10 // click on a daemon so details table appears
11 await $$('.datatable-body-cell-label')
12 .first()
13 .click();
14
15 const tab_container = $$('.tab-container').last();
16 const details_table = tab_container.all(by.css('cd-table')).get(0);
17 const performance_counters_table = tab_container.all(by.css('cd-table')).get(1);
18
19 // check details table is visible
20 await expect(details_table.isDisplayed()).toBe(true);
21 // check at least one field is present
22 await expect(details_table.getText()).toMatch('ceph_version');
23 // check performance counters table is not currently visible
24 await expect(performance_counters_table.isDisplayed()).toBe(false);
25
26 // click on performance counters tab and check table is loaded
27 await element(by.cssContainingText('.nav-link', 'Performance Counters')).click();
28 await expect(performance_counters_table.isDisplayed()).toBe(true);
29 // check at least one field is present
30 await expect(performance_counters_table.getText()).toMatch('objecter.op_r');
31 // check details table is not currently visible
32 await expect(details_table.isDisplayed()).toBe(false);
33
34 // click on performance details tab
35 await element(by.cssContainingText('.nav-link', 'Performance Details')).click();
36 // checks the other tabs' content isn't visible
37 await expect(details_table.isDisplayed()).toBe(false);
38 await expect(performance_counters_table.isDisplayed()).toBe(false);
39 // TODO: Expect Grafana iFrame
40 }
41 }