]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
f4b5499f08b27eea6518537ff6426aa36b4eeeb2
[ceph.git] /
1 /* tslint:disable*/
2 import { ServicesPageHelper } from '../../cluster/services.po';
3 import { NFSPageHelper } from '../../orchestrator/workflow/nfs/nfs-export.po';
4 import { BucketsPageHelper } from '../../rgw/buckets.po';
5 /* tslint:enable*/
6
7 describe('nfsExport page', () => {
8   const nfsExport = new NFSPageHelper();
9   const services = new ServicesPageHelper();
10   const buckets = new BucketsPageHelper();
11   const bucketName = 'e2e.nfs.bucket';
12   // @TODO: uncomment this when a CephFS volume can be created through Dashboard.
13   // const fsPseudo = '/fsPseudo';
14   const rgwPseudo = '/rgwPseudo';
15   const editPseudo = '/editPseudo';
16   const backends = ['CephFS', 'Object Gateway'];
17   const squash = 'no_root_squash';
18   const client: object = { addresses: '192.168.0.10' };
19
20   beforeEach(() => {
21     cy.login();
22     Cypress.Cookies.preserveOnce('token');
23     nfsExport.navigateTo();
24   });
25
26   describe('breadcrumb test', () => {
27     it('should open and show breadcrumb', () => {
28       nfsExport.expectBreadcrumbText('NFS');
29     });
30   });
31
32   describe('Create, edit and delete', () => {
33     it('should create an NFS cluster', () => {
34       services.navigateTo('create');
35
36       services.addService('nfs');
37
38       services.checkExist('nfs.testnfs', true);
39       services.getExpandCollapseElement().click();
40       services.checkServiceStatus('nfs');
41     });
42
43     it('should create a nfs-export with RGW backend', () => {
44       buckets.navigateTo('create');
45       buckets.create(bucketName, 'dashboard', 'default-placement');
46
47       nfsExport.navigateTo();
48       nfsExport.existTableCell(rgwPseudo, false);
49       nfsExport.navigateTo('create');
50       nfsExport.create(backends[1], squash, client, rgwPseudo, bucketName);
51       nfsExport.existTableCell(rgwPseudo);
52     });
53
54     // @TODO: uncomment this when a CephFS volume can be created through Dashboard.
55     // it('should create a nfs-export with CephFS backend', () => {
56     //   nfsExport.navigateTo();
57     //   nfsExport.existTableCell(fsPseudo, false);
58     //   nfsExport.navigateTo('create');
59     //   nfsExport.create(backends[0], squash, client, fsPseudo);
60     //   nfsExport.existTableCell(fsPseudo);
61     // });
62
63     it('should show Clients', () => {
64       nfsExport.clickTab('cd-nfs-details', rgwPseudo, 'Clients (1)');
65       cy.get('cd-nfs-details').within(() => {
66         nfsExport.getTableCount('total').should('be.gte', 0);
67       });
68     });
69
70     it('should edit an export', () => {
71       nfsExport.editExport(rgwPseudo, editPseudo);
72
73       nfsExport.existTableCell(editPseudo);
74     });
75
76     it('should delete exports and bucket', () => {
77       nfsExport.delete(editPseudo);
78
79       buckets.navigateTo();
80       buckets.delete(bucketName);
81     });
82   });
83 });