mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-25 08:50:18 +00:00
Fixed failing flaky cypress tests. (#9150)
* Fixed failing flaky cypress tests. * Fixed flaky cypress tests for glossary * fixed glossary test
This commit is contained in:
parent
1f48666593
commit
d2b61d6065
@ -538,7 +538,7 @@ export const addUser = (username, email) => {
|
||||
|
||||
export const softDeleteUser = (username) => {
|
||||
//Search the created user
|
||||
interceptURL('GET', '/api/v1/search/query*', 'searchUser');
|
||||
interceptURL('GET', '/api/v1/search/query?q=**&from=0&size=*&index=*', 'searchUser');
|
||||
cy.get('[data-testid="searchbar"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
@ -619,9 +619,11 @@ export const restoreUser = (username) => {
|
||||
};
|
||||
|
||||
export const deleteSoftDeletedUser = (username) => {
|
||||
interceptURL('GET', '/api/v1/users?fields=profile,teams,roles&include=*&limit=*', 'getSoftDeletedUser')
|
||||
|
||||
cy.get('.ant-switch-handle').should('exist').should('be.visible').click();
|
||||
|
||||
cy.wait(1000);
|
||||
verifyResponseStatusCode('@getSoftDeletedUser', 200);
|
||||
|
||||
cy.get(`[data-testid="delete-user-btn-${username}"]`)
|
||||
.should('exist')
|
||||
@ -832,7 +834,7 @@ export const addTeam = (TEAM_DETAILS) => {
|
||||
cy.get('[data-testid="display-name"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.type(TEAM_DETAILS.displayName);
|
||||
.type(TEAM_DETAILS.name);
|
||||
|
||||
cy.get('[data-testid="team-selector"]')
|
||||
.should('exist')
|
||||
|
@ -53,9 +53,11 @@ describe('Add nested teams and test TeamsSelectable', () => {
|
||||
addTeam(getTeam(teamName));
|
||||
|
||||
cy.reload();
|
||||
|
||||
interceptURL('GET','/api/v1/search/query?q=*&from=*&size=*&index=*', 'getCreatedTeam')
|
||||
// asserting the added values
|
||||
cy.get('table').find('.ant-table-row').contains(teamName).click();
|
||||
|
||||
verifyResponseStatusCode('@getCreatedTeam', 200)
|
||||
});
|
||||
|
||||
verifyResponseStatusCode('@getPermissions', 200);
|
||||
|
@ -17,7 +17,6 @@ import { SEARCH_ENTITY_TABLE } from '../../constants/constants';
|
||||
const teamName = `team-group-test-${uuid()}`;
|
||||
const TEAM_DETAILS = {
|
||||
name: teamName,
|
||||
displayName: teamName,
|
||||
teamType: 'Group',
|
||||
description: `This is ${teamName} description`,
|
||||
...SEARCH_ENTITY_TABLE.table_1,
|
||||
@ -76,10 +75,10 @@ describe('Create a team and add that team as a owner of the entity', () => {
|
||||
|
||||
cy.get('[data-testid="searchInputText"]')
|
||||
.should('be.visible')
|
||||
.type(TEAM_DETAILS.displayName);
|
||||
.type(TEAM_DETAILS.name);
|
||||
|
||||
//Selecting the team
|
||||
cy.get(`[title="${TEAM_DETAILS.displayName}"]`)
|
||||
cy.get(`[title="${TEAM_DETAILS.name}"]`)
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
@ -90,7 +89,7 @@ describe('Create a team and add that team as a owner of the entity', () => {
|
||||
.scrollIntoView()
|
||||
.invoke('text')
|
||||
.then((text) => {
|
||||
expect(text).equal(TEAM_DETAILS.displayName);
|
||||
expect(text).equal(TEAM_DETAILS.name);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -110,12 +110,19 @@ describe('Glossary page should work properly', () => {
|
||||
cy.get('[data-testid="governance"]')
|
||||
.should('exist')
|
||||
.and('be.visible')
|
||||
.click({ animationDistanceThreshold: 10 });
|
||||
//Clicking on Glossary
|
||||
cy.get('[data-testid="appbar-item-glossary"]')
|
||||
.click({ animationDistanceThreshold: 20 });
|
||||
|
||||
//Clicking on Glossary
|
||||
cy.get('.ant-dropdown-menu')
|
||||
.should('exist')
|
||||
.and('be.visible')
|
||||
.click();
|
||||
.then(($el) => {
|
||||
cy.wrap($el)
|
||||
.find('[data-testid="appbar-item-glossary"]')
|
||||
.should('exist')
|
||||
.and('be.visible')
|
||||
.click()
|
||||
});
|
||||
|
||||
// Todo: need to remove below uncaught exception once tree-view error resolves
|
||||
cy.on('uncaught:exception', () => {
|
||||
|
@ -25,7 +25,6 @@ const updateddescription = 'This is updated description';
|
||||
const teamName = `team-ct-test-${uuid()}`;
|
||||
const TEAM_DETAILS = {
|
||||
name: teamName,
|
||||
displayName: teamName,
|
||||
updatedname: `${teamName}-updated`,
|
||||
teamType: 'Department',
|
||||
description: `This is ${teamName} description`,
|
||||
|
Loading…
x
Reference in New Issue
Block a user