Skip to content

Commit 9fbcf86

Browse files
committed
mgr/dashboard: cephfs snapshot and clones e2e tests
Fixes: https://tracker.ceph.com/issues/65180 Signed-off-by: Nizamudeen A <[email protected]> (cherry picked from commit 3d1a7c5)
1 parent 38bcce2 commit 9fbcf86

File tree

3 files changed

+49
-3
lines changed

3 files changed

+49
-3
lines changed

src/pybind/mgr/dashboard/frontend/cypress/e2e/common/global.feature.po.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ And('I go to the {string} tab', (names: string) => {
3838
cy.contains('.nav.nav-tabs a', name).click();
3939
}
4040
});
41+
42+
And('I wait for {string} seconds', (seconds: number) => {
43+
cy.wait(seconds * 1000);
44+
});

src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/snapshots.e2e-spec.feature

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Feature: CephFS Snapshot Management
22

3-
Goal: To test out the CephFS snapshot management features
3+
Goal: To test out the CephFS snapshot and clone management features
44

55
Background: Login
66
Given I am logged in
@@ -33,6 +33,48 @@ Feature: CephFS Snapshot Management
3333
And I go to the "Snapshots" tab
3434
Then I should see a table in the expanded row
3535

36+
Scenario: Create a CephFS Subvolume Snapshot
37+
Given I am on the "cephfs" page
38+
When I expand the row "test_cephfs"
39+
And I go to the "Snapshots" tab
40+
And I click on "Create" button from the expanded row
41+
And enter "snapshotName" "test_snapshot" in the modal
42+
And I click on "Create Snapshot" button
43+
Then I should see a row with "test_snapshot" in the expanded row
44+
45+
Scenario: Create a CephFS Subvolume Snapshot Clone
46+
Given I am on the "cephfs" page
47+
When I expand the row "test_cephfs"
48+
And I go to the "Snapshots" tab
49+
And I select a row "test_snapshot" in the expanded row
50+
And I click on "Clone" button from the table actions in the expanded row
51+
And enter "cloneName" "test_clone" in the modal
52+
And I click on "Create Clone" button
53+
Then I wait for "5" seconds
54+
And I go to the "Subvolumes" tab
55+
Then I should see a row with "test_clone" in the expanded row
56+
57+
Scenario: Remove a CephFS Subvolume Snapshot Clone
58+
Given I am on the "cephfs" page
59+
When I expand the row "test_cephfs"
60+
And I go to the "Subvolumes" tab
61+
And I select a row "test_clone" in the expanded row
62+
And I click on "Remove" button from the table actions in the expanded row
63+
And I check the tick box in modal
64+
And I click on "Remove Subvolume" button
65+
Then I wait for "5" seconds
66+
And I should not see a row with "test_clone" in the expanded row
67+
68+
Scenario: Remove a CephFS Subvolume Snapshot
69+
Given I am on the "cephfs" page
70+
When I expand the row "test_cephfs"
71+
And I go to the "Snapshots" tab
72+
And I select a row "test_snapshot" in the expanded row
73+
And I click on "Remove" button from the table actions in the expanded row
74+
And I check the tick box in modal
75+
And I click on "Remove Snapshot" button
76+
Then I should not see a row with "test_snapshot" in the expanded row
77+
3678
Scenario: Remove a CephFS Subvolume
3779
Given I am on the "cephfs" page
3880
When I expand the row "test_cephfs"

src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-subvolume-snapshots-list/cephfs-subvolume-snapshots-list.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class CephfsSubvolumeSnapshotsListComponent implements OnInit, OnChanges
113113
click: () => this.cloneModal()
114114
},
115115
{
116-
name: this.actionLabels.DELETE,
116+
name: this.actionLabels.REMOVE,
117117
permission: 'delete',
118118
icon: Icons.destroy,
119119
disable: () => !this.selection.hasSingleSelection,
@@ -224,7 +224,7 @@ export class CephfsSubvolumeSnapshotsListComponent implements OnInit, OnChanges
224224
const subVolumeGroupName = this.activeGroupName;
225225
const fsName = this.fsName;
226226
this.modalRef = this.modalService.show(CriticalConfirmationModalComponent, {
227-
actionDescription: 'Delete',
227+
actionDescription: this.actionLabels.REMOVE,
228228
itemNames: [snapshotName],
229229
itemDescription: 'Snapshot',
230230
submitAction: () =>

0 commit comments

Comments
 (0)