baseUrl: 'https://localhost:4200/',
excludeSpecPattern: ['*.po.ts', '**/orchestrator/**'],
experimentalSessionAndOrigin: true,
- specPattern: 'cypress/e2e/**/*-spec.{js,jsx,ts,tsx}',
+ specPattern: 'cypress/e2e/**/*-spec.{js,jsx,ts,tsx,feature}',
},
})
* @param field ID of the field that needs to be filled out.
* @param value Value that should be filled in the field.
*/
-And('enter {string} {string}', (field: string, value: string) => {
+And('enter {string} {string} in the modal', (field: string, value: string) => {
cy.get('cd-modal').within(() => {
- cy.get(`input[id=${field}]`).type(value);
+ cy.get(`input[id=${field}]`).clear().type(value);
});
});
});
}
});
+
+/**
+ * Fills in the given field using the value provided
+ * @param field ID of the field that needs to be filled out.
+ * @param value Value that should be filled in the field.
+ */
+And('enter {string} {string}', (field: string, value: string) => {
+ cy.get('.cd-col-form').within(() => {
+ cy.get(`input[id=${field}]`).clear().type(value);
+ });
+});
logs: { url: '#/logs', id: 'cd-logs' },
// RGW Daemons
- 'rgw daemons': { url: '#/rgw/daemon', id: 'cd-rgw-daemon-list' }
+ 'rgw daemons': { url: '#/rgw/daemon', id: 'cd-rgw-daemon-list' },
+
+ // CephFS
+ cephfs: { url: '#/cephfs', id: 'cd-cephfs-list' },
+ 'create cephfs': { url: '#/cephfs/create', id: 'cd-cephfs-form' }
};
}
--- /dev/null
+Feature: CephFS Management
+
+ Goal: To test out the CephFS management features
+
+ Background: Login
+ Given I am logged in
+
+ Scenario: Create a CephFS Volume
+ Given I am on the "cephfs" page
+ And I click on "Create" button
+ And enter "name" "test_cephfs"
+ And I click on "Create Volume" button
+ Then I should see a row with "test_cephfs"
+
+ Scenario: Edit CephFS Volume
+ Given I am on the "cephfs" page
+ And I select a row "test_cephfs"
+ And I click on "Edit" button
+ And enter "name" "test_cephfs_edit" in the modal
+ And I click on "Edit Volume" button
+ Then I should see a row with "test_cephfs_edit"
+
+ Scenario: Remove CephFS Volume
+ Given I am on the "cephfs" page
+ And I select a row "test_cephfs_edit"
+ And I click on "Remove" button from the table actions
+ Then I should see the modal
+ And I check the tick box in modal
+ And I click on "Remove Volume" button
+ Then I should not see a row with "test_cephfs_edit"
+++ /dev/null
-import { FilesystemsPageHelper } from './filesystems.po';
-
-describe('File Systems page', () => {
- const filesystems = new FilesystemsPageHelper();
-
- beforeEach(() => {
- cy.login();
- filesystems.navigateTo();
- });
-
- describe('breadcrumb test', () => {
- it('should open and show breadcrumb', () => {
- filesystems.expectBreadcrumbText('File Systems');
- });
- });
-});
+++ /dev/null
-import { PageHelper } from '../page-helper.po';
-
-export class FilesystemsPageHelper extends PageHelper {
- pages = { index: { url: '#/cephfs', id: 'cd-cephfs-list' } };
-}
Scenario Outline: Add hosts
Given I am on the "Add Hosts" section
When I click on "Add" button
- And enter "hostname" "<hostname>"
+ And enter "hostname" "<hostname>" in the modal
And select options "<labels>"
And I click on "Add Host" button
Then I should not see the modal
Scenario: Add hosts using pattern 'ceph-node-[01-02]'
Given I am on the "Add Hosts" section
When I click on "Add" button
- And enter "hostname" "ceph-node-[01-02]"
+ And enter "hostname" "ceph-node-[01-02]" in the modal
And I click on "Add Host" button
Then I should not see the modal
And I should see rows with following entries
Given I am on the "Add Hosts" section
And I should see a row with "ceph-node-00"
When I click on "Add" button
- And enter "hostname" "ceph-node-00"
+ And enter "hostname" "ceph-node-00" in the modal
Then I should see an error in "hostname" field
Scenario Outline: Add and remove labels on host
fields: [
{
type: 'text',
- name: 'volumeName',
+ name: 'name',
value: selectedVolume,
label: $localize`Name`,
required: true
],
submitButtonText: $localize`Edit Volume`,
onSubmit: (values: any) => {
- this.cephfsService.rename(selectedVolume, values.volumeName).subscribe(() => {
+ this.cephfsService.rename(selectedVolume, values.name).subscribe(() => {
this.notificationService.show(
NotificationType.success,
$localize`Updated Volume '${selectedVolume}'`