]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/e2e/cluster/osds.e2e-spec.ts
d/control: depend on python3-yaml for ceph-mgr
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / e2e / cluster / osds.e2e-spec.ts
CommitLineData
9f95a23c
TL
1import { $$, by, element } from 'protractor';
2import { OSDsPageHelper } from './osds.po';
11fdf7f2
TL
3
4describe('OSDs page', () => {
9f95a23c 5 let osds: OSDsPageHelper;
11fdf7f2 6
9f95a23c
TL
7 beforeAll(async () => {
8 osds = new OSDsPageHelper();
9 await osds.navigateTo();
11fdf7f2
TL
10 });
11
9f95a23c
TL
12 afterEach(async () => {
13 await OSDsPageHelper.checkConsole();
11fdf7f2
TL
14 });
15
9f95a23c
TL
16 describe('breadcrumb and tab tests', () => {
17 it('should open and show breadcrumb', async () => {
18 await osds.waitTextToBePresent(osds.getBreadcrumb(), 'OSDs');
19 });
11fdf7f2 20
9f95a23c
TL
21 it('should show two tabs', async () => {
22 await expect(osds.getTabsCount()).toEqual(2);
23 });
11fdf7f2 24
9f95a23c
TL
25 it('should show OSDs list tab at first', async () => {
26 await expect(osds.getTabText(0)).toEqual('OSDs List');
27 });
28
29 it('should show overall performance as a second tab', async () => {
30 await expect(osds.getTabText(1)).toEqual('Overall Performance');
31 });
11fdf7f2
TL
32 });
33
9f95a23c
TL
34 describe('check existence of fields on OSD page', () => {
35 it('should check that number of rows and count in footer match', async () => {
36 await expect(osds.getTableTotalCount()).toEqual(osds.getTableRows().count());
37 });
38
39 it('should verify that buttons exist', async () => {
40 await expect(element(by.cssContainingText('button', 'Create')).isPresent()).toBe(true);
41 await expect(
42 element(by.cssContainingText('button', 'Cluster-wide configuration')).isPresent()
43 ).toBe(true);
44 });
45
46 describe('by selecting one row in OSDs List', () => {
47 beforeAll(async () => {
48 await osds.getFirstCell().click();
49 });
50
51 it('should verify that selected footer increases', async () => {
52 await expect(osds.getTableSelectedCount()).toEqual(1);
53 });
54
55 it('should show the correct text for the tab labels', async () => {
56 const tabHeadings = $$('#tabset-osd-details > div > tab').map((e) =>
57 e.getAttribute('heading')
58 );
59 await expect(tabHeadings).toEqual([
60 'Devices',
61 'Attributes (OSD map)',
62 'Metadata',
63 'Device health',
64 'Performance counter',
65 'Histogram',
66 'Performance Details'
67 ]);
68 });
69 });
11fdf7f2
TL
70 });
71});