From c45d889d5f897e16d6177bd9cce7c73fc83f82fe Mon Sep 17 00:00:00 2001 From: Shailesh Parmar Date: Thu, 6 Apr 2023 17:52:11 +0530 Subject: [PATCH] cypress: fix failing cypress test (#10953) --- .../src/main/resources/ui/cypress/constants/constants.js | 8 ++++---- .../main/resources/ui/cypress/e2e/Pages/Policies.spec.js | 2 +- .../src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js b/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js index 7ab764cba7e..bbe4e2870e1 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/constants/constants.js @@ -215,12 +215,12 @@ export const NEW_ADMIN = { }; export const NEW_TAG_CATEGORY = { - name: 'TestCategory', - description: 'This is the TestCategory', + name: 'CypressClassification', + description: 'This is the CypressClassification', }; export const NEW_TAG = { - name: 'test', - description: 'This is the Test tag', + name: 'CypressTag', + description: 'This is the CypressTag', }; export const NEW_GLOSSARY = { diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Policies.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Policies.spec.js index a1f10c6806e..84651508a97 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Policies.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Policies.spec.js @@ -297,7 +297,7 @@ describe('Policy page should work properly', () => { .click(); verifyResponseStatusCode('@updateRule', 200); - cy.reload(); + verifyResponseStatusCode('@getSelectedPolicy', 200); cy.url().should('include', policyName); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js index d3e3012310b..c2612f0dd95 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/Tags.spec.js @@ -351,7 +351,9 @@ describe('Tags page should work', () => { .contains(`#${NEW_TAG_CATEGORY.name}.${NEW_TAG.name}`) .should('be.visible'); - cy.get('[data-testid="filter-container-TestCategory.test"]') + cy.get( + `[data-testid="filter-container-${NEW_TAG_CATEGORY.name}.${NEW_TAG.name}"]` + ) .should('be.visible') .find('[data-testid="checkbox"]') .should('be.visible')