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