]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/osds.e2e-spec.ts
15bc30f1f3bb999d4e1fc4a2561756bd75afe204
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / cluster / osds.e2e-spec.ts
1 import { OSDsPageHelper } from './osds.po';
2
3 describe('OSDs page', () => {
4 const osds = new OSDsPageHelper();
5
6 beforeEach(() => {
7 cy.login();
8 osds.navigateTo();
9 });
10
11 describe('breadcrumb and tab tests', () => {
12 it('should open and show breadcrumb', () => {
13 osds.expectBreadcrumbText('OSDs');
14 });
15
16 it('should show two tabs', () => {
17 osds.getTabsCount().should('eq', 2);
18 osds.getTabText(0).should('eq', 'OSDs List');
19 osds.getTabText(1).should('eq', 'Overall Performance');
20 });
21 });
22
23 describe('check existence of fields on OSD page', () => {
24 it('should check that number of rows and count in footer match', () => {
25 osds.getTableTotalCount().then((text) => {
26 osds.getTableRows().its('length').should('equal', text);
27 });
28 });
29
30 it('should verify that buttons exist', () => {
31 cy.contains('button', 'Create');
32 cy.contains('button', 'Cluster-wide configuration');
33 });
34
35 describe('by selecting one row in OSDs List', () => {
36 beforeEach(() => {
37 osds.getExpandCollapseElement().click();
38 });
39
40 it('should verify that selected footer increases', () => {
41 osds.getTableSelectedCount().should('equal', 1);
42 });
43
44 it('should show the correct text for the tab labels', () => {
45 cy.get('#tabset-osd-details > div > tab').then(($tabs) => {
46 const tabHeadings = $tabs.map((_i, e) => e.getAttribute('heading')).get();
47
48 expect(tabHeadings).to.eql([
49 'Devices',
50 'Attributes (OSD map)',
51 'Metadata',
52 'Device health',
53 'Performance counter',
54 'Histogram',
55 'Performance Details'
56 ]);
57 });
58 });
59 });
60 });
61 });