2 import { ServicesPageHelper } from '../../cluster/services.po';
3 import { NFSPageHelper } from '../../orchestrator/workflow/nfs/nfs-export.po';
4 import { BucketsPageHelper } from '../../rgw/buckets.po';
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' };
22 Cypress.Cookies.preserveOnce('token');
23 nfsExport.navigateTo();
26 describe('breadcrumb test', () => {
27 it('should open and show breadcrumb', () => {
28 nfsExport.expectBreadcrumbText('NFS');
32 describe('Create, edit and delete', () => {
33 it('should create an NFS cluster', () => {
34 services.navigateTo('create');
36 services.addService('nfs');
38 services.checkExist('nfs.testnfs', true);
39 services.clickServiceTab('nfs.testnfs', 'Details');
40 services.checkServiceStatus('nfs');
43 it('should create a nfs-export with RGW backend', () => {
44 buckets.navigateTo('create');
45 buckets.create(bucketName, 'dashboard', 'default-placement');
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);
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);
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);
70 it('should edit an export', () => {
71 nfsExport.editExport(rgwPseudo, editPseudo);
73 nfsExport.existTableCell(editPseudo);
76 it('should delete exports and bucket', () => {
77 nfsExport.delete(editPseudo);
80 buckets.delete(bucketName);