]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/rgw/buckets.e2e-spec.ts
buildsys: change download over to reef release
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / rgw / buckets.e2e-spec.ts
CommitLineData
e306af50
TL
1import { BucketsPageHelper } from './buckets.po';
2
3describe('RGW buckets page', () => {
4 const buckets = new BucketsPageHelper();
5 const bucket_name = 'e2ebucket';
6
7 beforeEach(() => {
8 cy.login();
adb31ebb 9 Cypress.Cookies.preserveOnce('token');
e306af50
TL
10 buckets.navigateTo();
11 });
12
13 describe('breadcrumb tests', () => {
14 it('should open and show breadcrumb', () => {
15 buckets.expectBreadcrumbText('Buckets');
16 });
17 });
18
19 describe('create, edit & delete bucket tests', () => {
20 it('should create bucket', () => {
21 buckets.navigateTo('create');
20effc67 22 buckets.create(bucket_name, BucketsPageHelper.USERS[0], 'default-placement');
e306af50
TL
23 buckets.getFirstTableCell(bucket_name).should('exist');
24 });
25
26 it('should edit bucket', () => {
20effc67
TL
27 buckets.edit(bucket_name, BucketsPageHelper.USERS[1]);
28 buckets.getDataTables().should('contain.text', BucketsPageHelper.USERS[1]);
e306af50
TL
29 });
30
31 it('should delete bucket', () => {
32 buckets.delete(bucket_name);
33 });
b3b6e05e
TL
34
35 it('should create bucket with object locking enabled', () => {
36 buckets.navigateTo('create');
20effc67 37 buckets.create(bucket_name, BucketsPageHelper.USERS[0], 'default-placement', true);
b3b6e05e
TL
38 buckets.getFirstTableCell(bucket_name).should('exist');
39 });
40
41 it('should not allow to edit versioning if object locking is enabled', () => {
20effc67
TL
42 buckets.edit(bucket_name, BucketsPageHelper.USERS[1], true);
43 buckets.getDataTables().should('contain.text', BucketsPageHelper.USERS[1]);
b3b6e05e
TL
44
45 buckets.delete(bucket_name);
46 });
e306af50
TL
47 });
48
49 describe('Invalid Input in Create and Edit tests', () => {
50 it('should test invalid inputs in create fields', () => {
51 buckets.testInvalidCreate();
52 });
53
54 it('should test invalid input in edit owner field', () => {
55 buckets.navigateTo('create');
20effc67 56 buckets.create(bucket_name, BucketsPageHelper.USERS[0], 'default-placement');
e306af50
TL
57 buckets.testInvalidEdit(bucket_name);
58 buckets.navigateTo();
59 buckets.delete(bucket_name);
60 });
61 });
62});