]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/cluster/configuration.e2e-spec.ts
buildsys: change download over to reef release
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / cluster / configuration.e2e-spec.ts
CommitLineData
e306af50
TL
1import { ConfigurationPageHelper } from './configuration.po';
2
3describe('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 24 configuration.getStatusTables().should('be.visible');
f67539c2 25 configuration.getTabs().should('not.exist');
e306af50
TL
26 });
27 });
28
29 describe('edit configuration test', () => {
30 const configName = 'client_cache_size';
31
32 beforeEach(() => {
33 configuration.clearTableSearchInput();
a4b75251 34 configuration.getTableCount('found').as('configFound');
e306af50
TL
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
a4b75251
TL
53 it('should verify modified filter is applied properly', () => {
54 configuration.filterTable('Modified', 'no');
55 configuration.getTableCount('found').as('unmodifiedConfigs');
56
57 // Modified filter value to yes
e306af50 58 configuration.filterTable('Modified', 'yes');
a4b75251
TL
59 configuration.getTableCount('found').as('modifiedConfigs');
60
61 cy.get('@configFound').then((configFound) => {
62 cy.get('@unmodifiedConfigs').then((unmodifiedConfigs) => {
63 const modifiedConfigs = Number(configFound) - Number(unmodifiedConfigs);
64 configuration.getTableCount('found').should('eq', modifiedConfigs);
65 });
66 });
e306af50 67
a4b75251 68 // Modified filter value to no
e306af50 69 configuration.filterTable('Modified', 'no');
a4b75251
TL
70 cy.get('@configFound').then((configFound) => {
71 cy.get('@modifiedConfigs').then((modifiedConfigs) => {
72 const unmodifiedConfigs = Number(configFound) - Number(modifiedConfigs);
73 configuration.getTableCount('found').should('eq', unmodifiedConfigs);
74 });
75 });
e306af50
TL
76 });
77 });
78});