From eb01aa7d8603a84c1bed6bec49fa0d93718a21b8 Mon Sep 17 00:00:00 2001 From: Sachin Chaurasiya Date: Thu, 12 Jan 2023 18:52:59 +0530 Subject: [PATCH] e2e: UI : User journey for permission end-2-end test (#9667) * e2e: UI : User journey for permission end-2-end test * address comments * fix failing test --- .../ui/cypress/e2e/Features/DataConsumerRole.spec.js | 8 ++++---- .../src/main/resources/ui/cypress/support/commands.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/DataConsumerRole.spec.js b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/DataConsumerRole.spec.js index 4cc72eb02f2..987d27495a7 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/DataConsumerRole.spec.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Features/DataConsumerRole.spec.js @@ -109,8 +109,8 @@ const ID = { button: 'add-bot', }, }; -// Todo:- Need to fix flaky test -describe.skip('DataConsumer Edit policy should work properly', () => { + +describe('DataConsumer Edit policy should work properly', () => { it('Create a new account and assign Data consumer role to the user', () => { interceptURL('GET', 'api/v1/config/auth', 'getLoginPage'); cy.visit('/'); @@ -190,7 +190,7 @@ describe.skip('DataConsumer Edit policy should work properly', () => { cy.get('[data-testid="header"]') .should('be.visible') .invoke('text') - .should('eq', `Edit description for ${entity.displayName}`); + .should('eq', `Edit Description for ${entity.displayName}`); cy.get('[data-testid="cancel"]').should('be.visible').click(); @@ -267,7 +267,7 @@ describe.skip('DataConsumer Edit policy should work properly', () => { .should('be.visible') .should('be.disabled'); - cy.get('[data-testid="delete-tag-category-button"]') + cy.get('[data-testid="delete-classification-or-tag"]') .should('be.visible') .should('be.disabled'); }); diff --git a/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js b/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js index ec305f6cc21..83066ab22e3 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js +++ b/openmetadata-ui/src/main/resources/ui/cypress/support/commands.js @@ -80,7 +80,7 @@ Cypress.Commands.add('loginByGoogleApi', () => { Cypress.Commands.add('goToHomePage', () => { interceptURL('GET', '/api/v1/util/entities/count', 'count'); interceptURL('GET', '/api/v1/feed*', 'feed'); - interceptURL('GET', '/api/v1/users/name/*?fields=profile', 'userProfile'); + interceptURL('GET', '/api/v1/users/name/*?fields=*', 'userProfile'); cy.get('[data-testid="whats-new-dialog"]').should('exist').then(() => { cy.get('[role="dialog"]').should('be.visible'); });