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