From 0a7eec4cdf17385ed897a8f16744e28f4bde3af0 Mon Sep 17 00:00:00 2001 From: Hana Xu Date: Thu, 5 Dec 2024 11:12:37 -0500 Subject: [PATCH] fix e2e --- .../e2e/core/kubernetes/lke-update.spec.ts | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/packages/manager/cypress/e2e/core/kubernetes/lke-update.spec.ts b/packages/manager/cypress/e2e/core/kubernetes/lke-update.spec.ts index da96de3e36c..e02cc67ceb1 100644 --- a/packages/manager/cypress/e2e/core/kubernetes/lke-update.spec.ts +++ b/packages/manager/cypress/e2e/core/kubernetes/lke-update.spec.ts @@ -881,7 +881,6 @@ describe('LKE cluster updates', () => { ); mockGetKubernetesVersions().as('getVersions'); mockUpdateNodePool(mockCluster.id, mockNodePoolWithTags).as('addTag'); - mockUpdateNodePool(mockCluster.id, mockNodePoolNoTags).as('deleteTag'); mockGetDashboardUrl(mockCluster.id); mockGetApiEndpoints(mockCluster.id); @@ -908,20 +907,23 @@ describe('LKE cluster updates', () => { cy.wait(['@addTag', '@getNodePoolsWithTags']); - // // Delete the newly added node pool tag. - // cy.get(`[data-qa-tag="${mockNodePoolWithTags.tags[0]}"]`) - // .should('be.visible') - // .within(() => { - // ui.button - // .findByTitle('Delete tag') - // .should('be.visible') - // .should('be.enabled') - // .click(); - // }); - - // cy.wait(['@deleteTag', '@getNodePoolsNoTags']); - // cy.get(`[data-qa-tag="${mockNodePoolWithTags.tags[0]}"]`) - // .should('not.exist') + mockUpdateNodePool(mockCluster.id, mockNodePoolNoTags).as('deleteTag'); + mockGetClusterPools(mockCluster.id, [mockNodePoolNoTags]).as( + 'getNodePoolsNoTags' + ); + + // Delete the newly added node pool tag. + cy.get(`[data-qa-tag="${mockNodePoolWithTags.tags[0]}"]`) + .should('be.visible') + .within(() => { + cy.get('[data-qa-delete-tag="true"]').should('be.visible').click(); + }); + + cy.wait(['@deleteTag', '@getNodePoolsNoTags']); + + cy.get(`[data-qa-tag="${mockNodePoolWithTags.tags[0]}"]`).should( + 'not.exist' + ); }); describe('LKE cluster updates for DC-specific prices', () => {