From: Afreen Misbah Date: Fri, 27 Mar 2026 21:15:49 +0000 (+0530) Subject: mgr/dashboard: Fix creat-cluster welcome tests X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0fb99092ef25b80a3de120e9e2701753123f19ad;p=ceph.git mgr/dashboard: Fix creat-cluster welcome tests Fixes https://tracker.ceph.com/issues/75697 Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress.config.ts b/src/pybind/mgr/dashboard/frontend/cypress.config.ts index 81d7992e6f16..63b236078c3c 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress.config.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress.config.ts @@ -22,8 +22,8 @@ export default defineConfig({ env: { LOGIN_USER: 'admin', - LOGIN_PWD: 'password', - CEPH2_URL: 'https://192.168.100.100:8443' + LOGIN_PWD: 'admin', + CEPH2_URL: 'https://localhost:4202/' }, chromeWebSecurity: false, @@ -55,7 +55,7 @@ export default defineConfig({ ) return require('./cypress/plugins/index.js')(on, config); }, - baseUrl: 'https://192.168.100.100:8443/', + baseUrl: 'https://localhost:4200/', excludeSpecPattern: ['*.po.ts', '**/orchestrator/**'], experimentalSessionAndOrigin: true, specPattern: 'cypress/e2e/**/*-spec.{js,jsx,ts,tsx,feature}' diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/create-cluster/create-cluster.feature.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/create-cluster/create-cluster.feature.po.ts index 76c3cedf653d..b42ea14f7faa 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/create-cluster/create-cluster.feature.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/create-cluster/create-cluster.feature.po.ts @@ -8,5 +8,5 @@ Given('I am on the {string} section', (page: string) => { }); Then('I should see a message {string}', () => { - cy.get('cd-create-cluster').should('contain.text', 'Please expand your cluster first'); + cy.get('cd-create-cluster').should('contain.text', 'Welcome to Ceph Dashboard'); }); diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts index 853b12074524..d00cd065946e 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/common/urls.po.ts @@ -3,10 +3,10 @@ import { PageHelper } from '../page-helper.po'; export class UrlsCollection extends PageHelper { pages = { // Cluster expansion - welcome: { url: '#/add-storage?welcome=true', id: 'cd-create-cluster' }, + onboarding: { url: '#/add-storage?welcome=true', id: 'cd-create-cluster' }, // Landing page - overview: { url: '#/overview', id: 'cd-dashboard' }, + overview: { url: '#/overview', id: 'cd-overview' }, // Hosts hosts: { url: '#/hosts', id: 'cd-hosts' }, 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 21cb81698c56..1b77603928cc 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,26 @@ -Feature: Cluster expansion welcome screen +Feature: Onboarding welcome screen - Go to the welcome screen and decide whether + 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 - Scenario: Cluster expansion welcome screen - Given I am on the "welcome" page + 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 "Skip" - And I should see a message "Please expand your cluster first" + And I should see a button to "View cluster overview" + And I should see a message "Welcome to Ceph Dashboard" - Scenario: Go to the Cluster expansion wizard - Given I am on the "welcome" page + 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 "welcome" page - And I should see a button to "Skip" - When I click on "Skip" button + 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/src/app/ceph/cluster/create-cluster/create-cluster.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html index cc2b15ad2715..dddcdafc0152 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster.component.html @@ -150,6 +150,7 @@