From: Nizamudeen A Date: Wed, 22 Jul 2026 06:29:36 +0000 (+0530) Subject: mgr/dashboard: replace gherkin-lint with prettier X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0cbf62c035ecea6f6694c9b20b5f19e4c60d67d4;p=ceph.git mgr/dashboard: replace gherkin-lint with prettier I checked a couple of gherkin linters as an alternative but all of them are not really well maintained. There are couple of new projeects but even they are simply maintained by a single guy so i don't think it'll get enough contributions later on. So instead, I am moving it to prettier. Although we miss some functional validation, it'll take care of some basic formatting. Fixes: https://tracker.ceph.com/issues/78528 Signed-off-by: Nizamudeen A --- diff --git a/src/pybind/mgr/dashboard/frontend/.gherkin-lintrc b/src/pybind/mgr/dashboard/frontend/.gherkin-lintrc deleted file mode 100644 index 706b93bea248..000000000000 --- a/src/pybind/mgr/dashboard/frontend/.gherkin-lintrc +++ /dev/null @@ -1,33 +0,0 @@ -{ - "no-files-without-scenarios" : "on", - "no-unnamed-features": "on", - "no-unnamed-scenarios": "on", - "no-dupe-scenario-names": ["on", "in-feature"], - "no-dupe-feature-names": "on", - "no-partially-commented-tag-lines": "on", - "indentation": ["on", { - "Feature": 0, - "Background": 4, - "Scenario": 4, - "Step": 8, - "Examples": 8, - "example": 12 - }], - "no-trailing-spaces": "on", - "new-line-at-eof": ["on", "yes"], - "no-multiple-empty-lines": "on", - "no-empty-file": "on", - "no-scenario-outlines-without-examples": "on", - "name-length": "off", - "no-restricted-tags": ["on", {"tags": ["@watch", "@wip"]}], - "use-and": "off", - "no-duplicate-tags": "on", - "no-superfluous-tags": "on", - "no-homogenous-tags": "on", - "one-space-between-tags": "on", - "no-unused-variables": "on", - "no-background-only-scenario": "off", - "no-empty-background": "on", - "no-examples-in-scenarios": "on", - "scenario-size": ["on", { "steps-length": {"Background": 3, "Scenario": 15}}] -} diff --git a/src/pybind/mgr/dashboard/frontend/.prettierrc b/src/pybind/mgr/dashboard/frontend/.prettierrc index d92e8a2f46dd..6cde698afbab 100644 --- a/src/pybind/mgr/dashboard/frontend/.prettierrc +++ b/src/pybind/mgr/dashboard/frontend/.prettierrc @@ -7,5 +7,6 @@ "useTabs": false, "endOfLine": "lf", "singleAttributePerLine": true, - "htmlWhitespaceSensitivity": "css" + "htmlWhitespaceSensitivity": "css", + "plugins": ["prettier-plugin-gherkin"] } diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature index 7ce0fb2ecea6..8fb769d5d1e0 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature @@ -1,75 +1,73 @@ Feature: CephFS Management + Goal: To test out the CephFS management features - Goal: To test out the CephFS management features + Background: Login + Given I am logged in - 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 File System" button + Then I should see a row with "test_cephfs" - 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 File System" button - Then I should see a row with "test_cephfs" + # Should be uncommented once the pre-requisite is fixed + # 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" + # And I click on "Edit File System" 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" + And I click on "Remove" button from the table actions + Then I should see the carbon modal + And I confirm the resource "test_cephfs" + And I click on "Remove File System" button + Then I should not see a row with "test_cephfs" - # Should be uncommented once the pre-requisite is fixed - # 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" - # And I click on "Edit File System" button - # Then I should see a row with "test_cephfs_edit" + Scenario Outline: Create two cephfs pools for attaching to a volume + Given I am on the "create pool" page + And enter "name" "" + And select "poolType" "" + And select options "" + And I click on "Create Pool" button + Then I should see a row with "" - Scenario: Remove CephFS Volume - Given I am on the "cephfs" page - And I select a row "test_cephfs" - And I click on "Remove" button from the table actions - Then I should see the carbon modal - And I confirm the resource "test_cephfs" - And I click on "Remove File System" button - Then I should not see a row with "test_cephfs" + Examples: + | pool_name | type | application | + | e2e_cephfs_data | replicated | cephfs | + | e2e_cephfs_meta | replicated | cephfs | - Scenario Outline: Create two cephfs pools for attaching to a volume - Given I am on the "create pool" page - And enter "name" "" - And select "poolType" "" - And select options "" - And I click on "Create Pool" button - Then I should see a row with "" + Scenario Outline: Create a CephFS Volume with pre-created pools + Given I am on the "create cephfs" page + And enter "name" "" + And checks "Use existing pools" + And select "dataPool" "" + And select "metadataPool" "" + And I click on "Create File System" button + Then I should see a row with "" - Examples: - | pool_name | type | application | - | e2e_cephfs_data | replicated | cephfs | - | e2e_cephfs_meta | replicated | cephfs | + Examples: + | fs_name | data_pool | metadata_pool | + | e2e_custom_pool_cephfs | e2e_cephfs_data | e2e_cephfs_meta | - Scenario Outline: Create a CephFS Volume with pre-created pools - Given I am on the "create cephfs" page - And enter "name" "" - And checks "Use existing pools" - And select "dataPool" "" - And select "metadataPool" "" - And I click on "Create File System" button - Then I should see a row with "" + Scenario Outline: Remove CephFS Volume that has pre-created pools + Given I am on the "cephfs" page + And I select a row "" + And I click on "Remove" button from the table actions + Then I should see the carbon modal + And I confirm the resource "" + And I click on "Remove File System" button + Then I should not see a row with "" - Examples: - | fs_name | data_pool | metadata_pool | - | e2e_custom_pool_cephfs | e2e_cephfs_data | e2e_cephfs_meta | + # verify pools associated with the volume is removed + Given I am on the "pools" page + Then I should not see a row with "" + And I should not see a row with "" - Scenario Outline: Remove CephFS Volume that has pre-created pools - Given I am on the "cephfs" page - And I select a row "" - And I click on "Remove" button from the table actions - Then I should see the carbon modal - And I confirm the resource "" - And I click on "Remove File System" button - Then I should not see a row with "" - - # verify pools associated with the volume is removed - Given I am on the "pools" page - Then I should not see a row with "" - And I should not see a row with "" - - Examples: - | fs_name | data_pool | metadata_pool | - | e2e_custom_pool_cephfs | e2e_cephfs_data | e2e_cephfs_meta | + Examples: + | fs_name | data_pool | metadata_pool | + | e2e_custom_pool_cephfs | e2e_cephfs_data | e2e_cephfs_meta | diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/snapshots.e2e-spec.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/snapshots.e2e-spec.feature index 0b0d51133320..779b307f212d 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/snapshots.e2e-spec.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/snapshots.e2e-spec.feature @@ -1,100 +1,99 @@ Feature: CephFS Snapshot Management + Goal: To test out the CephFS snapshot and clone management features - Goal: To test out the CephFS snapshot and clone management features + Background: Login + Given I am logged in - 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 File System" button + Then I should see a row with "test_cephfs" - 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 File System" button - Then I should see a row with "test_cephfs" + Scenario: Snapshots tab without a subvolume + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Snapshots" tab + Then I should see an alert "No subvolumes are present" in the expanded row - Scenario: Snapshots tab without a subvolume - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Snapshots" tab - Then I should see an alert "No subvolumes are present" in the expanded row + Scenario: Create a CephFS Subvolume + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolumes" tab + And I click on "Create" button from the expanded row + And enter "subvolumeName" "test_subvolume" in the carbon modal + And I click on "Create Subvolume" button + Then I should see a row with "test_subvolume" in the expanded row - Scenario: Create a CephFS Subvolume - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolumes" tab - And I click on "Create" button from the expanded row - And enter "subvolumeName" "test_subvolume" in the carbon modal - And I click on "Create Subvolume" button - Then I should see a row with "test_subvolume" in the expanded row + Scenario: Show the CephFS Snapshots view + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Snapshots" tab + Then I should see a table in the expanded row - Scenario: Show the CephFS Snapshots view - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Snapshots" tab - Then I should see a table in the expanded row + Scenario: Create a CephFS Subvolume Snapshot + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Snapshots" tab + And the table in the expanded row is ready + And I click on "Create" button from the expanded row + And enter "snapshotName" "test_snapshot" in the carbon modal + And I click on "Create Snapshot" button + Then I should see a row with "test_snapshot" in the expanded row - Scenario: Create a CephFS Subvolume Snapshot - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Snapshots" tab - And the table in the expanded row is ready - And I click on "Create" button from the expanded row - And enter "snapshotName" "test_snapshot" in the carbon modal - And I click on "Create Snapshot" button - Then I should see a row with "test_snapshot" in the expanded row + Scenario: Create a CephFS Subvolume Snapshot Clone + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Snapshots" tab + And the table in the expanded row is ready + Then I should see a row with "test_snapshot" in the expanded row + When I select a row "test_snapshot" in the expanded row + And I click on "Clone" button from the table actions in the expanded row + And enter "cloneName" "test_clone" in the carbon modal + And I click on "Create Clone" button + Then I wait for "5" seconds + And I go to the "Subvolumes" tab + Then I should see a row with "test_clone" in the expanded row - Scenario: Create a CephFS Subvolume Snapshot Clone - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Snapshots" tab - And the table in the expanded row is ready - Then I should see a row with "test_snapshot" in the expanded row - When I select a row "test_snapshot" in the expanded row - And I click on "Clone" button from the table actions in the expanded row - And enter "cloneName" "test_clone" in the carbon modal - And I click on "Create Clone" button - Then I wait for "5" seconds - And I go to the "Subvolumes" tab - Then I should see a row with "test_clone" in the expanded row + Scenario: Remove a CephFS Subvolume Snapshot Clone + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolumes" tab + And the table in the expanded row is ready + And I select a row "test_clone" in the expanded row + And I click on "Remove" button from the table actions in the expanded row + And I confirm the resource "test_clone" + And I click on "Remove Subvolume" button + Then I wait for "5" seconds + And I should not see a row with "test_clone" in the expanded row - Scenario: Remove a CephFS Subvolume Snapshot Clone - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolumes" tab - And the table in the expanded row is ready - And I select a row "test_clone" in the expanded row - And I click on "Remove" button from the table actions in the expanded row - And I confirm the resource "test_clone" - And I click on "Remove Subvolume" button - Then I wait for "5" seconds - And I should not see a row with "test_clone" in the expanded row + Scenario: Remove a CephFS Subvolume Snapshot + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Snapshots" tab + And the table in the expanded row is ready + When I select a row "test_snapshot" in the expanded row + And I click on "Remove" button from the table actions in the expanded row + And I confirm the resource "test_snapshot" + And I click on "Remove Snapshot" button + Then I should not see a row with "test_snapshot" in the expanded row - Scenario: Remove a CephFS Subvolume Snapshot - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Snapshots" tab - And the table in the expanded row is ready - When I select a row "test_snapshot" in the expanded row - And I click on "Remove" button from the table actions in the expanded row - And I confirm the resource "test_snapshot" - And I click on "Remove Snapshot" button - Then I should not see a row with "test_snapshot" in the expanded row + Scenario: Remove a CephFS Subvolume + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolumes" tab + When I select a row "test_subvolume" in the expanded row + And I click on "Remove" button from the table actions in the expanded row + And I confirm the resource "test_subvolume" + And I click on "Remove Subvolume" button + Then I should not see a row with "test_subvolume" in the expanded row - Scenario: Remove a CephFS Subvolume - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolumes" tab - When I select a row "test_subvolume" in the expanded row - And I click on "Remove" button from the table actions in the expanded row - And I confirm the resource "test_subvolume" - And I click on "Remove Subvolume" button - Then I should not see a row with "test_subvolume" in the expanded row - - Scenario: Remove CephFS Volume - Given I am on the "cephfs" page - And I select a row "test_cephfs" - And I click on "Remove" button from the table actions - Then I should see the carbon modal - And I confirm the resource "test_cephfs" - And I click on "Remove File System" button - Then I should not see a row with "test_cephfs" + Scenario: Remove CephFS Volume + Given I am on the "cephfs" page + And I select a row "test_cephfs" + And I click on "Remove" button from the table actions + Then I should see the carbon modal + And I confirm the resource "test_cephfs" + And I click on "Remove File System" button + Then I should not see a row with "test_cephfs" diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature index 17fe6baa2d0f..51e424437d64 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature @@ -1,51 +1,50 @@ Feature: CephFS Subvolume Group management + Goal: To test out the CephFS subvolume group management features - Goal: To test out the CephFS subvolume group management features + Background: Login + Given I am logged in - 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 File System" button + Then I should see a row with "test_cephfs" - 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 File System" button - Then I should see a row with "test_cephfs" + Scenario: Create a CephFS Subvolume Group + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolume groups" tab + And I click on "Create" button from the expanded row + And enter "subvolumegroupName" "test_subvolume_group" in the carbon modal + And I click on "Create Subvolume group" button + Then I should see a row with "test_subvolume_group" in the expanded row - Scenario: Create a CephFS Subvolume Group - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolume groups" tab - And I click on "Create" button from the expanded row - And enter "subvolumegroupName" "test_subvolume_group" in the carbon modal - And I click on "Create Subvolume group" button - Then I should see a row with "test_subvolume_group" in the expanded row + Scenario: Edit a CephFS Subvolume Group + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolume groups" tab + When I select a row "test_subvolume_group" in the expanded row + And I click on "Edit" button from the table actions in the expanded row + And enter "size" "1" in the carbon modal + And I click on "Edit Subvolume group" button + Then I should see row "test_subvolume_group" of the expanded row to have a usage bar - Scenario: Edit a CephFS Subvolume Group - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolume groups" tab - When I select a row "test_subvolume_group" in the expanded row - And I click on "Edit" button from the table actions in the expanded row - And enter "size" "1" in the carbon modal - And I click on "Edit Subvolume group" button - Then I should see row "test_subvolume_group" of the expanded row to have a usage bar + Scenario: Remove a CephFS Subvolume Group + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolume groups" tab + When I select a row "test_subvolume_group" in the expanded row + And I click on "Remove" button from the table actions in the expanded row + And I confirm the resource "test_subvolume_group" + And I click on "Remove subvolume group" button + Then I should not see a row with "test_subvolume_group" in the expanded row - Scenario: Remove a CephFS Subvolume Group - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolume groups" tab - When I select a row "test_subvolume_group" in the expanded row - And I click on "Remove" button from the table actions in the expanded row - And I confirm the resource "test_subvolume_group" - And I click on "Remove subvolume group" button - Then I should not see a row with "test_subvolume_group" in the expanded row - - Scenario: Remove CephFS Volume - Given I am on the "cephfs" page - And I select a row "test_cephfs" - And I click on "Remove" button from the table actions - Then I should see the carbon modal - And I confirm the resource "test_cephfs" - And I click on "Remove File System" button - Then I should not 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" + And I click on "Remove" button from the table actions + Then I should see the carbon modal + And I confirm the resource "test_cephfs" + And I click on "Remove File System" button + Then I should not see a row with "test_cephfs_edit" diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature index e79a8c25207a..f666be4c3192 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature @@ -1,51 +1,50 @@ Feature: CephFS Subvolume management + Goal: To test out the CephFS subvolume management features - Goal: To test out the CephFS subvolume management features + Background: Login + Given I am logged in - 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 File System" button + Then I should see a row with "test_cephfs" - 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 File System" button - Then I should see a row with "test_cephfs" + Scenario: Create a CephFS Subvolume + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolumes" tab + And I click on "Create" button from the expanded row + And enter "subvolumeName" "test_subvolume" in the carbon modal + And I click on "Create Subvolume" button + Then I should see a row with "test_subvolume" in the expanded row - Scenario: Create a CephFS Subvolume - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolumes" tab - And I click on "Create" button from the expanded row - And enter "subvolumeName" "test_subvolume" in the carbon modal - And I click on "Create Subvolume" button - Then I should see a row with "test_subvolume" in the expanded row + Scenario: Edit a CephFS Subvolume + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolumes" tab + When I select a row "test_subvolume" in the expanded row + And I click on "Edit" button from the table actions in the expanded row + And enter "size" "1" in the carbon modal + And I click on "Edit Subvolume" button + Then I should see row "test_subvolume" of the expanded row to have a usage bar - Scenario: Edit a CephFS Subvolume - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolumes" tab - When I select a row "test_subvolume" in the expanded row - And I click on "Edit" button from the table actions in the expanded row - And enter "size" "1" in the carbon modal - And I click on "Edit Subvolume" button - Then I should see row "test_subvolume" of the expanded row to have a usage bar + Scenario: Remove a CephFS Subvolume + Given I am on the "cephfs" page + When I expand the row "test_cephfs" + And I go to the "Subvolumes" tab + When I select a row "test_subvolume" in the expanded row + And I click on "Remove" button from the table actions in the expanded row + And I confirm the resource "test_subvolume" + And I click on "Remove Subvolume" button + Then I should not see a row with "test_subvolume" in the expanded row - Scenario: Remove a CephFS Subvolume - Given I am on the "cephfs" page - When I expand the row "test_cephfs" - And I go to the "Subvolumes" tab - When I select a row "test_subvolume" in the expanded row - And I click on "Remove" button from the table actions in the expanded row - And I confirm the resource "test_subvolume" - And I click on "Remove Subvolume" button - Then I should not see a row with "test_subvolume" in the expanded row - - Scenario: Remove CephFS Volume - Given I am on the "cephfs" page - And I select a row "test_cephfs" - And I click on "Remove" button from the table actions - Then I should see the carbon modal - And I confirm the resource "test_cephfs" - And I click on "Remove File System" button - Then I should not 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" + And I click on "Remove" button from the table actions + Then I should see the carbon modal + And I confirm the resource "test_cephfs" + And I click on "Remove File System" button + Then I should not see a row with "test_cephfs_edit" diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/grafana/grafana.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/grafana/grafana.feature index 9bc59f3266e4..9d91316b8c5e 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/grafana/grafana.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/grafana/grafana.feature @@ -1,59 +1,58 @@ Feature: Grafana panels - - Go to some of the grafana performance section and check if - panels are populated without any issues - - Background: Log in - Given I am logged in - - Scenario Outline: Hosts Overall Performance - Given I am on the "hosts" page - When I go to the "Overall Performance" tab - Then I should see the grafana panel "" - When I view the grafana panel "" - Then I should not see "No Data" in the panel "" - - Examples: - | panel | - | OSD Hosts | - | AVG CPU Busy | - | AVG RAM Utilization | - | Physical IOPS | - | AVG Disk Utilization | - | Network Load | - | CPU Busy - Top 10 Hosts | - | Network Load - Top 10 Hosts | - - Scenario Outline: RGW Daemon Overall Performance - Given I am on the "rgw daemons" page - When I go to the "Overall Performance" tab - Then I should see the grafana panel "" - When I view the grafana panel "" - Then I should not see No Data in the graph "" - And I should see the legends "" in the graph "" - - Examples: - | panel | legends | - | Total Requests/sec by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 | - | GET Latencies by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 | - | Bandwidth by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 | - | Average GET/PUT Latencies by RGW Instance | GET, PUT | - | Bandwidth Consumed by Type | GETs, PUTs | - - Scenario Outline: RGW per Daemon Performance - Given I am on the "rgw daemons" page - When I expand the row "" - And I go to the "Performance Details" tab - Then I should see the grafana panel "" - When I view the grafana panel "" - Then I should not see No Data in the graph "" - And I should see the legends "" in the graph "" - - Examples: - | name | panel | - | foo.ceph-node-00 | Bandwidth by HTTP Operation | - | foo.ceph-node-00 | HTTP Request Breakdown | - | foo.ceph-node-01 | Bandwidth by HTTP Operation | - | foo.ceph-node-01 | HTTP Request Breakdown | - | foo.ceph-node-02 | Bandwidth by HTTP Operation | - | foo.ceph-node-02 | HTTP Request Breakdown | + Go to some of the grafana performance section and check if + panels are populated without any issues + + Background: Log in + Given I am logged in + + Scenario Outline: Hosts Overall Performance + Given I am on the "hosts" page + When I go to the "Overall Performance" tab + Then I should see the grafana panel "" + When I view the grafana panel "" + Then I should not see "No Data" in the panel "" + + Examples: + | panel | + | OSD Hosts | + | AVG CPU Busy | + | AVG RAM Utilization | + | Physical IOPS | + | AVG Disk Utilization | + | Network Load | + | CPU Busy - Top 10 Hosts | + | Network Load - Top 10 Hosts | + + Scenario Outline: RGW Daemon Overall Performance + Given I am on the "rgw daemons" page + When I go to the "Overall Performance" tab + Then I should see the grafana panel "" + When I view the grafana panel "" + Then I should not see No Data in the graph "" + And I should see the legends "" in the graph "" + + Examples: + | panel | legends | + | Total Requests/sec by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 | + | GET Latencies by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 | + | Bandwidth by RGW Instance | foo.ceph-node-00, foo.ceph-node-01, foo.ceph-node-02 | + | Average GET/PUT Latencies by RGW Instance | GET, PUT | + | Bandwidth Consumed by Type | GETs, PUTs | + + Scenario Outline: RGW per Daemon Performance + Given I am on the "rgw daemons" page + When I expand the row "" + And I go to the "Performance Details" tab + Then I should see the grafana panel "" + When I view the grafana panel "" + Then I should not see No Data in the graph "" + And I should see the legends "" in the graph "" + + Examples: + | name | panel | + | foo.ceph-node-00 | Bandwidth by HTTP Operation | + | foo.ceph-node-00 | HTTP Request Breakdown | + | foo.ceph-node-01 | Bandwidth by HTTP Operation | + | foo.ceph-node-01 | HTTP Request Breakdown | + | foo.ceph-node-02 | Bandwidth by HTTP Operation | + | foo.ceph-node-02 | HTTP Request Breakdown | diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature index 1b77603928cc..3214cc891c98 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/01-create-cluster-welcome.feature @@ -1,26 +1,25 @@ Feature: Onboarding welcome screen + Go to the welcome onboarding screen and decide whether + to proceed to wizard or skips to landing page - Go to the welcome onboarding screen and decide whether - to proceed to wizard or skips to landing page + Background: Login + Given I am logged in - Background: Login - Given I am logged in + Scenario: Onboarding welcome screen + Given I am on the "onboarding" page + And I should see a button to "Add Storage" + And I should see a button to "View cluster overview" + And I should see a message "Welcome to Ceph Dashboard" - Scenario: Onboarding welcome screen - Given I am on the "onboarding" page - And I should see a button to "Add Storage" - And I should see a button to "View cluster overview" - And I should see a message "Welcome to Ceph Dashboard" + Scenario: Go to the Add storage wizard + Given I am on the "onboarding" page + And I should see a button to "Add Storage" + When I click on "Add Storage" button + Then I am on the "Add Hosts" section - Scenario: Go to the Add storage wizard - Given I am on the "onboarding" page - And I should see a button to "Add Storage" - When I click on "Add Storage" button - Then I am on the "Add Hosts" section - - Scenario: Skips the process and go to the landing page - Given I am on the "onboarding" page - And I should see a button to "View cluster overview" - When I click on "View cluster overview" button - And I confirm to "Continue" on carbon modal - Then I should be on the "overview" page + Scenario: Skips the process and go to the landing page + Given I am on the "onboarding" page + And I should see a button to "View cluster overview" + When I click on "View cluster overview" button + And I confirm to "Continue" on carbon modal + Then I should be on the "overview" page diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/02-create-cluster-add-host.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/02-create-cluster-add-host.feature index 7228f0c67a62..bc88f0c6bab2 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/02-create-cluster-add-host.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/orchestrator/workflow/02-create-cluster-add-host.feature @@ -1,73 +1,72 @@ Feature: Cluster expansion host addition + Add some hosts and perform some host related actions like editing the labels + and removing the hosts from the cluster and verify all of the actions are performed + as expected - Add some hosts and perform some host related actions like editing the labels - and removing the hosts from the cluster and verify all of the actions are performed - as expected + Background: Cluster expansion wizard + Given I am logged in + And I am on the "onboarding" page + And I click on "Add Storage" button - Background: Cluster expansion wizard - Given I am logged in - And I am on the "onboarding" page - And I click on "Add Storage" button + Scenario Outline: Add hosts + Given I am on the "Add Hosts" section + When I click on "Add" button + And enter "hostname" "" in the carbon modal + And "add" option "" + And I click on "Add Host" button + And I should see a row with "" + And I should see row "" have "" - Scenario Outline: Add hosts - Given I am on the "Add Hosts" section - When I click on "Add" button - And enter "hostname" "" in the carbon modal - And "add" option "" - And I click on "Add Host" button - And I should see a row with "" - And I should see row "" have "" + Examples: + | hostname | labels | + | ceph-node-01 | mon, mgr | + | ceph-node-02 | | - Examples: - | hostname | labels | - | ceph-node-01 | mon, mgr | - | ceph-node-02 || + Scenario Outline: Remove hosts + Given I am on the "Add Hosts" section + And I should see a row with "" + When I select a row "" + And I click on "Remove" button from the table actions + Then I should see the carbon modal + And I confirm the resource "" + And I click on "Remove Host" button + And I should not see a row with "" - Scenario Outline: Remove hosts - Given I am on the "Add Hosts" section - And I should see a row with "" - When I select a row "" - And I click on "Remove" button from the table actions - Then I should see the carbon modal - And I confirm the resource "" - And I click on "Remove Host" button - And I should not see a row with "" + Examples: + | hostname | + | ceph-node-01 | + | ceph-node-02 | - Examples: - | hostname | - | ceph-node-01 | - | ceph-node-02 | + 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]" in the carbon modal + And I click on "Add Host" button + And I should see rows with following entries + | hostname | + | ceph-node-01 | + | ceph-node-02 | - 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]" in the carbon modal - And I click on "Add Host" button - And I should see rows with following entries - | hostname | - | ceph-node-01 | - | ceph-node-02 | + Scenario: Add existing host and verify it failed + 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" in the carbon modal + Then I should see an error in "hostname" field - Scenario: Add existing host and verify it failed - 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" in the carbon modal - Then I should see an error in "hostname" field + Scenario Outline: Add and remove labels on host + Given I am on the "Add Hosts" section + When I select a row "" + And I click on "Edit" button from the table actions + And "add" option "" + And I click on "Edit Host" button + Then I should see row "" have "" + When I select a row "" + And I click on "Edit" button from the table actions + And "remove" option "" + And I click on "Edit Host" button + Then I should see row "" does not have "" - Scenario Outline: Add and remove labels on host - Given I am on the "Add Hosts" section - When I select a row "" - And I click on "Edit" button from the table actions - And "add" option "" - And I click on "Edit Host" button - Then I should see row "" have "" - When I select a row "" - And I click on "Edit" button from the table actions - And "remove" option "" - And I click on "Edit Host" button - Then I should see row "" does not have "" - - Examples: - | hostname | labels | - | ceph-node-01 | foo | + Examples: + | hostname | labels | + | ceph-node-01 | foo | diff --git a/src/pybind/mgr/dashboard/frontend/package-lock.json b/src/pybind/mgr/dashboard/frontend/package-lock.json index 3554caf774ed..4bbb5127999b 100644 --- a/src/pybind/mgr/dashboard/frontend/package-lock.json +++ b/src/pybind/mgr/dashboard/frontend/package-lock.json @@ -80,7 +80,6 @@ "cypress-iframe": "1.0.1", "cypress-multi-reporters": "1.5.0", "eslint": "9.14.0", - "gherkin-lint": "4.2.4", "husky": "9.1.7", "identity-obj-proxy": "3.0.0", "isomorphic-form-data": "2.0.0", @@ -94,6 +93,7 @@ "npm-run-all": "4.1.5", "postcss-scss": "4.0.9", "prettier": "3.9.4", + "prettier-plugin-gherkin": "4.0.0", "pretty-quick": "3.0.2", "start-server-and-test": "2.0.3", "stylelint": "16.20.0", @@ -4069,6 +4069,27 @@ "postcss-selector-parser": "^7.0.0" } }, + "node_modules/@cucumber/gherkin": { + "version": "39.1.0", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-39.1.0.tgz", + "integrity": "sha512-pqmSO2bUWxJm3TbNrKXlDaHjL6c77+ez9kWmfCd9oRPeTRPEVH3spZvpAqdXYWOZYSNYwWFCAAeZ4RGpkauNoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cucumber/messages": ">=31.0.0 <33" + } + }, + "node_modules/@cucumber/messages": { + "version": "32.3.1", + "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-32.3.1.tgz", + "integrity": "sha512-yNQq1KoXRYaEKrWMFmpUQX7TdeQuU9jeGgJAZ3dArTsC/T4NpJ6DnqaJIIgwPnz/wtQIQTNX7/h0rOuF5xY4qQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "class-transformer": "0.5.1", + "reflect-metadata": "0.2.2" + } + }, "node_modules/@cypress/browserify-preprocessor": { "version": "3.0.2", "dev": true, @@ -6544,59 +6565,6 @@ "url": "https://opencollective.com/popperjs" } }, - "node_modules/@protobufjs/aspromise": { - "version": "1.1.2", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/base64": { - "version": "1.1.2", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/codegen": { - "version": "2.0.5", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/eventemitter": { - "version": "1.1.0", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/fetch": { - "version": "1.1.1", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.1" - } - }, - "node_modules/@protobufjs/float": { - "version": "1.0.2", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/inquire": { - "version": "1.1.2", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/path": { - "version": "1.1.2", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/pool": { - "version": "1.1.0", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/@protobufjs/utf8": { - "version": "1.1.1", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/@rollup/rollup-linux-x64-gnu": { "version": "4.59.0", "cpu": [ @@ -7338,11 +7306,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/long": { - "version": "4.0.2", - "dev": true, - "license": "MIT" - }, "node_modules/@types/mime": { "version": "1.3.5", "dev": true, @@ -7507,11 +7470,6 @@ "license": "MIT", "optional": true }, - "node_modules/@types/uuid": { - "version": "3.4.13", - "dev": true, - "license": "MIT" - }, "node_modules/@types/validator": { "version": "13.15.10", "dev": true, @@ -10326,6 +10284,13 @@ "dev": true, "license": "MIT" }, + "node_modules/class-transformer": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/class-transformer/-/class-transformer-0.5.1.tgz", + "integrity": "sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==", + "dev": true, + "license": "MIT" + }, "node_modules/clean-stack": { "version": "2.2.0", "dev": true, @@ -11249,24 +11214,6 @@ "becke-ch--regex--s0-0-v1--base--pl--lib": "^1.2.0" } }, - "node_modules/cucumber-messages": { - "version": "8.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/uuid": "^3.4.6", - "protobufjs": "^6.8.8", - "uuid": "^3.3.3" - } - }, - "node_modules/cucumber-messages/node_modules/uuid": { - "version": "3.4.0", - "dev": true, - "license": "MIT", - "bin": { - "uuid": "bin/uuid" - } - }, "node_modules/cucumber-tag-expressions": { "version": "1.1.1", "dev": true, @@ -14576,117 +14523,6 @@ "gherkin-javascript": "bin/gherkin" } }, - "node_modules/gherkin-lint": { - "version": "4.2.4", - "dev": true, - "license": "ISC", - "dependencies": { - "commander": "11.0.0", - "core-js": "3.33.1", - "gherkin": "9.0.0", - "glob": "7.1.6", - "lodash": "4.17.21", - "strip-json-comments": "3.0.1", - "xml-js": "^1.6.11" - }, - "bin": { - "gherkin-lint": "dist/main.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/gherkin-lint/node_modules/brace-expansion": { - "version": "1.1.14", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/gherkin-lint/node_modules/commander": { - "version": "11.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, - "node_modules/gherkin-lint/node_modules/core-js": { - "version": "3.33.1", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/gherkin-lint/node_modules/gherkin": { - "version": "9.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^4.0.1", - "cucumber-messages": "8.0.0", - "source-map-support": "^0.5.16" - }, - "bin": { - "gherkin-javascript": "bin/gherkin" - } - }, - "node_modules/gherkin-lint/node_modules/gherkin/node_modules/commander": { - "version": "4.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 6" - } - }, - "node_modules/gherkin-lint/node_modules/glob": { - "version": "7.1.6", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/gherkin-lint/node_modules/lodash": { - "version": "4.17.21", - "dev": true, - "license": "MIT" - }, - "node_modules/gherkin-lint/node_modules/minimatch": { - "version": "3.1.5", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/gherkin-lint/node_modules/strip-json-comments": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/glob": { "version": "11.1.0", "dev": true, @@ -19116,11 +18952,6 @@ "dev": true, "license": "MIT" }, - "node_modules/long": { - "version": "4.0.0", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/loupe": { "version": "2.3.7", "dev": true, @@ -21573,6 +21404,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-plugin-gherkin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/prettier-plugin-gherkin/-/prettier-plugin-gherkin-4.0.0.tgz", + "integrity": "sha512-EBDwV1Ou9rG+seoh7jcwZ6sXXyHwsbUks5TeSyrlrLaTdz+/qYvnHuwY8rk7mb6/+M1ZGuY4/SiVc68ybwvJOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cucumber/gherkin": "^39.1.0", + "@cucumber/messages": "^32.3.1", + "prettier": "^3.5.3" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "dev": true, @@ -21760,31 +21603,6 @@ "hammerjs": "^2.0.8" } }, - "node_modules/protobufjs": { - "version": "6.11.6", - "dev": true, - "hasInstallScript": true, - "license": "BSD-3-Clause", - "dependencies": { - "@protobufjs/aspromise": "^1.1.2", - "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", - "@protobufjs/eventemitter": "^1.1.0", - "@protobufjs/fetch": "^1.1.0", - "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", - "@protobufjs/path": "^1.1.2", - "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", - "@types/long": "^4.0.1", - "@types/node": ">=13.7.0", - "long": "^4.0.0" - }, - "bin": { - "pbjs": "bin/pbjs", - "pbts": "bin/pbts" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", "dev": true, @@ -27264,17 +27082,6 @@ "dev": true, "license": "MIT" }, - "node_modules/xml-js": { - "version": "1.6.11", - "dev": true, - "license": "MIT", - "dependencies": { - "sax": "^1.2.4" - }, - "bin": { - "xml-js": "bin/cli.js" - } - }, "node_modules/xml-name-validator": { "version": "4.0.0", "dev": true, diff --git a/src/pybind/mgr/dashboard/frontend/package.json b/src/pybind/mgr/dashboard/frontend/package.json index e51ce26cabeb..86f0167e4c67 100644 --- a/src/pybind/mgr/dashboard/frontend/package.json +++ b/src/pybind/mgr/dashboard/frontend/package.json @@ -25,17 +25,16 @@ "pree2e:ci": "npm run pree2e", "e2e:ci": "start-test 4200 'cypress run -b chrome --headless'", "lint:eslint": "ng lint", - "lint:gherkin": "gherkin-lint -c .gherkin-lintrc cypress/e2e", - "lint:prettier": "prettier --list-different \"{src,cypress}/**/*.{ts,scss,html}\"", + "lint:prettier": "prettier --list-different \"{src,cypress}/**/*.{ts,scss,html,feature}\"", "lint:html": "eslint \"src/**/*.html\" && prettier --check \"src/**/*.html\"", "lint:tsc": "tsc -p tsconfig.app.json --noEmit && tsc -p tsconfig.spec.json --noEmit && tsc -p cypress/tsconfig.json --noEmit", "lint:scss": "stylelint '**/*.scss'", "lint": "run-p -csl --aggregate-output lint:*", - "fix:prettier": "prettier --write \"{src,cypress}/**/*.{ts,scss,html}\"", + "fix:prettier": "prettier --write \"{src,cypress}/**/*.{ts,scss,html,feature}\"", "fix:html": "prettier --write \"src/**/*.html\"", "fix:eslint": "npm run lint:eslint -- --fix", "fix:scss": "stylelint '**/*.scss' --fix", - "fixmod": "pretty-quick --pattern \"{src,cypress}/**/*.{ts,scss,html}\" --branch HEAD", + "fixmod": "pretty-quick --pattern \"{src,cypress}/**/*.{ts,scss,html,feature}\" --branch HEAD", "fix": "run-p -csl --aggregate-output fix:*", "compodoc": "compodoc", "doc-build": "compodoc -p tsconfig.app.json", @@ -115,7 +114,6 @@ "cypress-iframe": "1.0.1", "cypress-multi-reporters": "1.5.0", "eslint": "9.14.0", - "gherkin-lint": "4.2.4", "husky": "9.1.7", "identity-obj-proxy": "3.0.0", "isomorphic-form-data": "2.0.0", @@ -129,6 +127,7 @@ "npm-run-all": "4.1.5", "postcss-scss": "4.0.9", "prettier": "3.9.4", + "prettier-plugin-gherkin": "4.0.0", "pretty-quick": "3.0.2", "start-server-and-test": "2.0.3", "stylelint": "16.20.0",