]>
Commit | Line | Data |
---|---|---|
e306af50 TL |
1 | import { ConfigurationPageHelper } from './configuration.po'; |
2 | ||
3 | describe('Configuration page', () => { | |
4 | const configuration = new ConfigurationPageHelper(); | |
5 | ||
6 | beforeEach(() => { | |
7 | cy.login(); | |
adb31ebb | 8 | Cypress.Cookies.preserveOnce('token'); |
e306af50 TL |
9 | configuration.navigateTo(); |
10 | }); | |
11 | ||
12 | describe('breadcrumb test', () => { | |
13 | it('should open and show breadcrumb', () => { | |
14 | configuration.expectBreadcrumbText('Configuration'); | |
15 | }); | |
16 | }); | |
17 | ||
18 | describe('fields check', () => { | |
19 | beforeEach(() => { | |
20 | configuration.getExpandCollapseElement().click(); | |
21 | }); | |
22 | ||
adb31ebb | 23 | it('should check that details table opens (w/o tab header)', () => { |
e306af50 TL |
24 | configuration.getStatusTables().should('be.visible'); |
25 | configuration.getTabsCount().should('eq', 1); | |
26 | configuration.getTabText(0).should('eq', 'Details'); | |
27 | }); | |
28 | }); | |
29 | ||
30 | describe('edit configuration test', () => { | |
31 | const configName = 'client_cache_size'; | |
32 | ||
33 | beforeEach(() => { | |
34 | configuration.clearTableSearchInput(); | |
35 | }); | |
36 | ||
37 | after(() => { | |
38 | configuration.configClear(configName); | |
39 | }); | |
40 | ||
41 | it('should click and edit a configuration and results should appear in the table', () => { | |
42 | configuration.edit( | |
43 | configName, | |
44 | ['global', '1'], | |
45 | ['mon', '2'], | |
46 | ['mgr', '3'], | |
47 | ['osd', '4'], | |
48 | ['mds', '5'], | |
49 | ['client', '6'] | |
50 | ); | |
51 | }); | |
52 | ||
53 | it('should show only modified configurations', () => { | |
54 | configuration.filterTable('Modified', 'yes'); | |
55 | configuration.getTableFoundCount().should('eq', 1); | |
56 | }); | |
57 | ||
58 | it('should hide all modified configurations', () => { | |
59 | configuration.filterTable('Modified', 'no'); | |
60 | configuration.getTableFoundCount().should('gt', 1); | |
61 | }); | |
62 | }); | |
63 | }); |