diff --git a/frontend/src/__tests__/cypress/cypress/pages/clusterStorage.ts b/frontend/src/__tests__/cypress/cypress/pages/clusterStorage.ts index f90694e973..d87255a01e 100644 --- a/frontend/src/__tests__/cypress/cypress/pages/clusterStorage.ts +++ b/frontend/src/__tests__/cypress/cypress/pages/clusterStorage.ts @@ -36,6 +36,18 @@ class ClusterStorageRow extends TableRow { this.find().siblings().find('[data-label=Size]').contains(name).should('exist'); return this; } + + showStorageClassDetails() { + return this.findStorageClassColumn().findByTestId('resource-name-icon-button').click(); + } + + findStorageClassResourceNameText() { + return cy.findByTestId('resource-name-text'); + } + + findStorageClassResourceKindText() { + return cy.findByTestId('resource-kind-text'); + } } class ClusterStorageModal extends Modal { diff --git a/frontend/src/__tests__/cypress/cypress/tests/mocked/projects/clusterStorage.cy.ts b/frontend/src/__tests__/cypress/cypress/tests/mocked/projects/clusterStorage.cy.ts index 697ade7029..33dddf5e95 100644 --- a/frontend/src/__tests__/cypress/cypress/tests/mocked/projects/clusterStorage.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/tests/mocked/projects/clusterStorage.cy.ts @@ -110,6 +110,11 @@ describe('ClusterStorage', () => { clusterStorage.visit('test-project'); const clusterStorageRow = clusterStorage.getClusterStorageRow('Test Storage'); clusterStorageRow.findStorageClassColumn().should('exist'); + clusterStorageRow.showStorageClassDetails(); + clusterStorageRow + .findStorageClassResourceNameText() + .should('have.text', 'openshift-default-sc'); + clusterStorageRow.findStorageClassResourceKindText().should('have.text', 'StorageClass'); }); it('Check whether the Storage class is deprecated', () => { diff --git a/frontend/src/pages/projects/screens/detail/storage/StorageTableRow.tsx b/frontend/src/pages/projects/screens/detail/storage/StorageTableRow.tsx index cb84b7d6e9..cd7c72ff45 100644 --- a/frontend/src/pages/projects/screens/detail/storage/StorageTableRow.tsx +++ b/frontend/src/pages/projects/screens/detail/storage/StorageTableRow.tsx @@ -15,7 +15,6 @@ import { Text, TextVariants, Tooltip, - Truncate, } from '@patternfly/react-core'; import { ExclamationTriangleIcon, HddIcon } from '@patternfly/react-icons'; import { PersistentVolumeClaimKind } from '~/k8sTypes'; @@ -108,13 +107,14 @@ const StorageTableRow: React.FC = ({ alignItems={{ default: 'alignItemsCenter' }} > - {storageClassesLoaded && ( diff --git a/frontend/src/pages/projects/screens/spawner/storage/StorageClassSelect.tsx b/frontend/src/pages/projects/screens/spawner/storage/StorageClassSelect.tsx index 7ee8a66532..f9eb710e4d 100644 --- a/frontend/src/pages/projects/screens/spawner/storage/StorageClassSelect.tsx +++ b/frontend/src/pages/projects/screens/spawner/storage/StorageClassSelect.tsx @@ -62,7 +62,13 @@ const StorageClassSelect: React.FC = ({ return { key: sc.metadata.name, label: config?.displayName || sc.metadata.name, - description: config?.description, + description: ( + <> + Resource name: {sc.metadata.name} +
+ {config?.description && `Description: ${config.description}`} + + ), isDisabled: !config?.isEnabled, dropdownLabel: ( @@ -96,6 +102,7 @@ const StorageClassSelect: React.FC = ({ isDisabled={disableStorageClassSelect || !storageClassesLoaded} placeholder="Select storage class" popperProps={{ appendTo: menuAppendTo }} + previewDescription={false} /> {selectedStorageClassConfig && !selectedStorageClassConfig.isEnabled ? (