]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/block/mirroring.e2e-spec.ts
import ceph 16.2.7
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / block / mirroring.e2e-spec.ts
1 import { PoolPageHelper } from '../pools/pools.po';
2 import { MirroringPageHelper } from './mirroring.po';
3
4 describe('Mirroring page', () => {
5 const pools = new PoolPageHelper();
6 const mirroring = new MirroringPageHelper();
7
8 beforeEach(() => {
9 cy.login();
10 Cypress.Cookies.preserveOnce('token');
11 mirroring.navigateTo();
12 });
13
14 it('should open and show breadcrumb', () => {
15 mirroring.expectBreadcrumbText('Mirroring');
16 });
17
18 it('should show three tabs', () => {
19 mirroring.getTabsCount().should('eq', 3);
20 });
21
22 it('should show text for all tabs', () => {
23 mirroring.getTabText(0).should('eq', 'Issues');
24 mirroring.getTabText(1).should('eq', 'Syncing');
25 mirroring.getTabText(2).should('eq', 'Ready');
26 });
27
28 describe('checks that edit mode functionality shows in the pools table', () => {
29 const poolName = 'mirroring_test';
30
31 beforeEach(() => {
32 pools.navigateTo('create'); // Need pool for mirroring testing
33 pools.create(poolName, 8, 'rbd');
34 pools.navigateTo();
35 pools.existTableCell(poolName, true);
36 });
37
38 it('tests editing mode for pools', () => {
39 mirroring.navigateTo();
40
41 mirroring.editMirror(poolName, 'Pool');
42 mirroring.getFirstTableCell('pool').should('be.visible');
43 mirroring.editMirror(poolName, 'Image');
44 mirroring.getFirstTableCell('image').should('be.visible');
45 mirroring.editMirror(poolName, 'Disabled');
46 mirroring.getFirstTableCell('disabled').should('be.visible');
47 });
48
49 afterEach(() => {
50 pools.navigateTo();
51 pools.delete(poolName);
52 });
53 });
54 });