diff --git a/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml b/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml index 19a2d56cfb..573e1691e2 100644 --- a/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml +++ b/frontend/src/__tests__/cypress/cypress/fixtures/e2e/dashboardNavigation/testManifestLinks.yaml @@ -10,4 +10,6 @@ excludedSubstrings: - localhost - console-openshift-console.apps.test-cluster.example.com/ - console-openshift-console.apps.test-cluster.example.com - - repo.anaconda.cloud/repo/t/$ \ No newline at end of file + - repo.anaconda.cloud/repo/t/$ + - figma.com/figma/ns + - scikit-learn.org/stable/getting_started.html \ No newline at end of file diff --git a/frontend/src/__tests__/cypress/cypress/tests/e2e/storageClasses/clusterStorage.cy.ts b/frontend/src/__tests__/cypress/cypress/tests/e2e/storageClasses/clusterStorage.cy.ts index ba3a6a4d5e..592ed83294 100644 --- a/frontend/src/__tests__/cypress/cypress/tests/e2e/storageClasses/clusterStorage.cy.ts +++ b/frontend/src/__tests__/cypress/cypress/tests/e2e/storageClasses/clusterStorage.cy.ts @@ -22,10 +22,13 @@ describe('Regular Users can make use of the Storage Classes in the Cluster Stora // TODO: This test is failing due to https://issues.redhat.com/browse/RHOAIENG-16609 it('If all SC are disabled except one, the SC dropdown should be disabled', () => { + // Authentication and navigation cy.visitWithLogin('/projects', LDAP_CONTRIBUTOR_USER); // Open the project + cy.step(`Navigate to the Project list tab and search for ${dspName}`,); projectListPage.filterProjectByName(dspName); projectListPage.findProjectLink(dspName).click(); + cy.step('Navigate to the Cluster Storage tab and disable all non-default storage classes'); // Go to cluster storage tab projectDetails.findSectionTab('cluster-storages').click(); // Disable all non-default storage classes @@ -33,6 +36,7 @@ describe('Regular Users can make use of the Storage Classes in the Cluster Stora // Open the Create cluster storage Modal findAddClusterStorageButton().click(); + cy.step('Checking that Storage Classes Dropdown is disabled - 🐛 RHOAIENG-16609 will fail this test in RHOAI'); // Check that the SC Dropdown is disabled addClusterStorageModal.findStorageClassSelect().should('be.disabled'); }); diff --git a/frontend/src/__tests__/cypress/cypress/types.ts b/frontend/src/__tests__/cypress/cypress/types.ts index f516f66ff0..79599438d0 100644 --- a/frontend/src/__tests__/cypress/cypress/types.ts +++ b/frontend/src/__tests__/cypress/cypress/types.ts @@ -129,6 +129,8 @@ export type NotebookController = { export type DashboardConfig = { dashboardConfig: { disableModelServing: boolean; + disableModelMesh: boolean; + disableKServe: boolean; }; notebookController: NotebookController; [key: string]: unknown; diff --git a/frontend/src/__tests__/cypress/cypress/utils/clusterSettingsUtils.ts b/frontend/src/__tests__/cypress/cypress/utils/clusterSettingsUtils.ts index a94b4bb89c..735a1e7790 100644 --- a/frontend/src/__tests__/cypress/cypress/utils/clusterSettingsUtils.ts +++ b/frontend/src/__tests__/cypress/cypress/utils/clusterSettingsUtils.ts @@ -7,21 +7,54 @@ import { import type { DashboardConfig, NotebookControllerConfig } from '~/__tests__/cypress/cypress/types'; /** - * Validates the Model Serving Platform checkboxes display in the Cluster Settings. - * @param dashboardConfig The Model Serving Platform configuration object. + * Validates the visibility and state of Model Serving Platform checkboxes + * in the Cluster Settings based on the provided dashboard configuration. + * + * This function checks whether the Model Serving feature is enabled or disabled, + * and subsequently verifies the state of the Multi-Platform and Single-Platform + * checkboxes based on their respective enable/disable flags. + * + * - If Model Serving is disabled, both checkboxes should not be visible. + * - If Model Serving is enabled: + * - The Multi-Platform Checkbox will be checked if Model Mesh is enabled; + * otherwise, it will not be checked. + * - The Single-Platform Checkbox will be checked if KServe is enabled; + * otherwise, it will not be checked. + * + * @param dashboardConfig The Model Serving Platform configuration object containing + * settings related to model serving, model mesh, and KServe. */ export const validateModelServingPlatforms = (dashboardConfig: DashboardConfig): void => { const isModelServingEnabled = dashboardConfig.dashboardConfig.disableModelServing; - cy.log(`Value of isModelServingDisabled: ${String(isModelServingEnabled)}`); + const isModelMeshEnabled = dashboardConfig.dashboardConfig.disableModelMesh; + const isKServeEnabled = dashboardConfig.dashboardConfig.disableKServe; + + cy.log(`Value of isModelServingEnabled: ${String(isModelServingEnabled)}`); + cy.log(`Value of isModelMeshEnabled: ${String(isModelMeshEnabled)}`); + cy.log(`Value of isKServeEnabled: ${String(isKServeEnabled)}`); if (isModelServingEnabled) { modelServingSettings.findSinglePlatformCheckbox().should('not.exist'); modelServingSettings.findMultiPlatformCheckbox().should('not.exist'); cy.log('Model Serving is disabled, checkboxes should not be visible'); } else { - modelServingSettings.findSinglePlatformCheckbox().should('be.checked'); - modelServingSettings.findMultiPlatformCheckbox().should('be.checked'); - cy.log('Model Serving is enabled, checkboxes should be checked'); + // Validate Multi-Platform Checkbox based on disableModelMesh + if (isModelMeshEnabled) { + modelServingSettings.findMultiPlatformCheckbox().should('not.be.checked'); + cy.log('Multi-Platform Checkbox is disabled, it should not be checked'); + } else { + modelServingSettings.findMultiPlatformCheckbox().should('be.checked'); + cy.log('Multi-Platform Checkbox is enabled, it should be checked'); + } + + // Validate Single-Platform Checkbox based on disableKServe + if (isKServeEnabled) { + modelServingSettings.findSinglePlatformCheckbox().should('not.be.checked'); + cy.log('Single-Platform Checkbox is disabled, it should not be checked'); + } else { + modelServingSettings.findSinglePlatformCheckbox().should('be.checked'); + cy.log('Single-Platform Checkbox is enabled, it should be checked'); + } } };