diff --git a/cypress/tests/block-pool.spec.ts b/cypress/tests/block-pool.spec.ts index e74c8387b..1439447b1 100644 --- a/cypress/tests/block-pool.spec.ts +++ b/cypress/tests/block-pool.spec.ts @@ -102,21 +102,14 @@ describe('Tests form validations on BlockPool', () => { cy.login(); cy.visit('/'); cy.install(); + navigateToBlockPool(); + cy.byTestID('item-create').click(); }); after(() => { cy.logout(); }); - beforeEach(() => { - navigateToBlockPool(); - }); - - beforeEach(() => { - navigateToBlockPool(); - cy.byTestID('item-create').click(); - }); - fieldValidationOnWizardFormsTests( nameFieldTestId, 'Create', diff --git a/cypress/tests/create-backing-store.spec.ts b/cypress/tests/create-backing-store.spec.ts index c72182154..989950587 100644 --- a/cypress/tests/create-backing-store.spec.ts +++ b/cypress/tests/create-backing-store.spec.ts @@ -24,7 +24,6 @@ describe('Tests creation of Backing Stores', () => { }); beforeEach(() => { - cy.visit('/'); commonFlows.navigateToObjectStorage(); cy.byTestID('horizontal-link-Backing Store').first().click(); cy.byTestID('item-create').click(); @@ -47,7 +46,6 @@ describe('Tests form validations on Backing Stores', () => { }); beforeEach(() => { - cy.visit('/'); commonFlows.navigateToObjectStorage(); cy.byTestID('horizontal-link-Backing Store').first().click(); cy.byTestID('item-create').click(); diff --git a/cypress/tests/expand-pvc.spec.ts b/cypress/tests/expand-pvc.spec.ts index 2ba8aa7c5..5f7fe1040 100644 --- a/cypress/tests/expand-pvc.spec.ts +++ b/cypress/tests/expand-pvc.spec.ts @@ -12,7 +12,6 @@ describe('Tests Expansion of a PVC', () => { }); beforeEach(() => { - cy.visit('/'); cy.clickNavLink(['Storage', 'PersistentVolumeClaims']); }); diff --git a/cypress/tests/multiple-pool.spec.ts b/cypress/tests/multiple-pool.spec.ts index 74eed841d..931caffaa 100644 --- a/cypress/tests/multiple-pool.spec.ts +++ b/cypress/tests/multiple-pool.spec.ts @@ -51,7 +51,6 @@ describe('Test Ceph pool creation', () => { }); it('Check for a new pool creation', () => { - cy.visit('/'); cy.clickNavLink(['Storage', 'StorageClasses']); cy.byTestID('item-create').click(); diff --git a/cypress/tests/namespace-store.spec.ts b/cypress/tests/namespace-store.spec.ts index 9e7ef7c4d..8cd850096 100644 --- a/cypress/tests/namespace-store.spec.ts +++ b/cypress/tests/namespace-store.spec.ts @@ -36,7 +36,6 @@ describe('Tests creation of Namespace Stores', () => { }); beforeEach(() => { - cy.visit('/'); commonFlows.navigateToObjectStorage(); cy.byTestID('horizontal-link-Namespace Store').first().click(); cy.byTestID('item-create').click(); diff --git a/cypress/tests/obc-test.spec.ts b/cypress/tests/obc-test.spec.ts index c23769bb8..20e9b4b44 100644 --- a/cypress/tests/obc-test.spec.ts +++ b/cypress/tests/obc-test.spec.ts @@ -135,7 +135,6 @@ describe('Tests form validations on Object Bucket Claim', () => { }); beforeEach(() => { - cy.visit('/'); obcNavigate.navigateToOBC(); cy.byTestID('item-create').click(); }); diff --git a/cypress/views/bc.ts b/cypress/views/bc.ts index 4ada145c4..63261c77f 100644 --- a/cypress/views/bc.ts +++ b/cypress/views/bc.ts @@ -233,7 +233,6 @@ export const deleteBucketClass = () => { }; export const visitBucketClassPage = () => { - cy.visit('/'); commonFlows.navigateToObjectStorage(); cy.log( 'Planning to start testing for standard bucket class visitBucketClassPage ....' diff --git a/cypress/views/block-pool.ts b/cypress/views/block-pool.ts index 1dd3f2220..5a8c23459 100644 --- a/cypress/views/block-pool.ts +++ b/cypress/views/block-pool.ts @@ -28,7 +28,7 @@ export const navigateToBlockPool = () => { }; export const populateBlockPoolForm = () => { - cy.byTestID('new-pool-name-textbox').type(poolName); + cy.byTestID('new-pool-name-textbox').clear().type(poolName); cy.byTestID('replica-dropdown').click(); cy.byLegacyTestID('replica-dropdown-item') .contains(`${replicaCount}-way Replication`) @@ -107,7 +107,6 @@ export const openBlockPoolKebab = ( cy.byLegacyTestID('item-filter').clear().type(targetPoolName); cy.log('Only one resource should be present after filtering'); cy.byTestID('kebab-button').should('have.length', 1); - if (isDefaultPool) - cy.byTestID('kebab-button').first().find('button').should('be.disabled'); - else cy.byTestID('kebab-button').first().click(); + if (isDefaultPool) cy.byTestID('kebab-button').should('be.disabled'); + else cy.byTestID('kebab-button').click(); }; diff --git a/cypress/views/list-page.ts b/cypress/views/list-page.ts index aa5a6ce62..9476cb3c3 100644 --- a/cypress/views/list-page.ts +++ b/cypress/views/list-page.ts @@ -8,7 +8,7 @@ export const listPage = { .contains(resourceName) .parents('tr') .within(() => { - cy.get('[data-test-id="kebab-button"]').click(); + cy.get('[data-test="kebab-button"]').click(); }); cy.byTestActionID(actionName).click(); }, diff --git a/packages/shared/src/kebab/kebab.tsx b/packages/shared/src/kebab/kebab.tsx index 416bf71c1..1902116df 100644 --- a/packages/shared/src/kebab/kebab.tsx +++ b/packages/shared/src/kebab/kebab.tsx @@ -240,6 +240,7 @@ export const Kebab: React.FC & KebabStaticProperties = ({ onClick={() => setOpen((o) => !o)} isExpanded={isOpen} data-test="kebab-button" + isDisabled={isDisabled} > {toggleType === 'Kebab' ? : t('Actions')}