From: Afreen Misbah Date: Tue, 29 Jul 2025 16:16:43 +0000 (+0530) Subject: mgr/dashboard: fix pool tests X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e0dd0fdc8f021ce8cb1ff83f1932eb43e99a35b3;p=ceph.git mgr/dashboard: fix pool tests - added data-testid Signed-off-by: Afreen Misbah --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/pools/pools.po.ts b/src/pybind/mgr/dashboard/frontend/cypress/e2e/pools/pools.po.ts index 0701a84a2d9a..63e3f4a3f9f0 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/pools/pools.po.ts +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/pools/pools.po.ts @@ -15,7 +15,7 @@ export class PoolPageHelper extends PageHelper { @PageHelper.restrictTo(pages.create.url) create(name: string, placement_groups: number, apps: string[], mirroring = false) { - cy.get('input[name=name]').clear().type(name); + cy.get('[data-testid="pool-name"]').clear().type(name); this.isPowerOf2(placement_groups); @@ -23,7 +23,7 @@ export class PoolPageHelper extends PageHelper { this.expectSelectOption('pgAutoscaleMode', 'on'); this.selectOption('pgAutoscaleMode', 'off'); // To show pgNum field - cy.get('input[name=pgNum]').clear().type(`${placement_groups}`); + cy.get('[data-testid="pgNum"]').clear().type(`${placement_groups}`); this.setApplications(apps); if (mirroring) { cy.get('#rbdMirroring').check({ force: true }); @@ -39,7 +39,7 @@ export class PoolPageHelper extends PageHelper { cy.get('#rbdMirroring').should('be.checked'); } - cy.get('input[name=pgNum]').clear().type(`${new_pg}`); + cy.get('[data-testid="pgNum"]').clear().type(`${new_pg}`); cy.get('cd-submit-button').click(); const str = `${new_pg} active+clean`; this.getTableRow(name); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html index 4116a140c777..f68895512ab4 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html @@ -15,7 +15,8 @@ for="name" i18n>Name
-