mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-27 09:55:36 +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) => {
|
export const softDeleteUser = (username) => {
|
||||||
//Search the created user
|
//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"]')
|
cy.get('[data-testid="searchbar"]')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
@ -619,9 +619,11 @@ export const restoreUser = (username) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const deleteSoftDeletedUser = (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.get('.ant-switch-handle').should('exist').should('be.visible').click();
|
||||||
|
|
||||||
cy.wait(1000);
|
verifyResponseStatusCode('@getSoftDeletedUser', 200);
|
||||||
|
|
||||||
cy.get(`[data-testid="delete-user-btn-${username}"]`)
|
cy.get(`[data-testid="delete-user-btn-${username}"]`)
|
||||||
.should('exist')
|
.should('exist')
|
||||||
@ -832,7 +834,7 @@ export const addTeam = (TEAM_DETAILS) => {
|
|||||||
cy.get('[data-testid="display-name"]')
|
cy.get('[data-testid="display-name"]')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.type(TEAM_DETAILS.displayName);
|
.type(TEAM_DETAILS.name);
|
||||||
|
|
||||||
cy.get('[data-testid="team-selector"]')
|
cy.get('[data-testid="team-selector"]')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
|
@ -53,9 +53,11 @@ describe('Add nested teams and test TeamsSelectable', () => {
|
|||||||
addTeam(getTeam(teamName));
|
addTeam(getTeam(teamName));
|
||||||
|
|
||||||
cy.reload();
|
cy.reload();
|
||||||
|
interceptURL('GET','/api/v1/search/query?q=*&from=*&size=*&index=*', 'getCreatedTeam')
|
||||||
// asserting the added values
|
// asserting the added values
|
||||||
cy.get('table').find('.ant-table-row').contains(teamName).click();
|
cy.get('table').find('.ant-table-row').contains(teamName).click();
|
||||||
|
|
||||||
|
verifyResponseStatusCode('@getCreatedTeam', 200)
|
||||||
});
|
});
|
||||||
|
|
||||||
verifyResponseStatusCode('@getPermissions', 200);
|
verifyResponseStatusCode('@getPermissions', 200);
|
||||||
|
@ -17,7 +17,6 @@ import { SEARCH_ENTITY_TABLE } from '../../constants/constants';
|
|||||||
const teamName = `team-group-test-${uuid()}`;
|
const teamName = `team-group-test-${uuid()}`;
|
||||||
const TEAM_DETAILS = {
|
const TEAM_DETAILS = {
|
||||||
name: teamName,
|
name: teamName,
|
||||||
displayName: teamName,
|
|
||||||
teamType: 'Group',
|
teamType: 'Group',
|
||||||
description: `This is ${teamName} description`,
|
description: `This is ${teamName} description`,
|
||||||
...SEARCH_ENTITY_TABLE.table_1,
|
...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"]')
|
cy.get('[data-testid="searchInputText"]')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.type(TEAM_DETAILS.displayName);
|
.type(TEAM_DETAILS.name);
|
||||||
|
|
||||||
//Selecting the team
|
//Selecting the team
|
||||||
cy.get(`[title="${TEAM_DETAILS.displayName}"]`)
|
cy.get(`[title="${TEAM_DETAILS.name}"]`)
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.click();
|
.click();
|
||||||
@ -90,7 +89,7 @@ describe('Create a team and add that team as a owner of the entity', () => {
|
|||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.invoke('text')
|
.invoke('text')
|
||||||
.then((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"]')
|
cy.get('[data-testid="governance"]')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.and('be.visible')
|
.and('be.visible')
|
||||||
.click({ animationDistanceThreshold: 10 });
|
.click({ animationDistanceThreshold: 20 });
|
||||||
|
|
||||||
//Clicking on Glossary
|
//Clicking on Glossary
|
||||||
cy.get('[data-testid="appbar-item-glossary"]')
|
cy.get('.ant-dropdown-menu')
|
||||||
.should('exist')
|
.should('exist')
|
||||||
.and('be.visible')
|
.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
|
// Todo: need to remove below uncaught exception once tree-view error resolves
|
||||||
cy.on('uncaught:exception', () => {
|
cy.on('uncaught:exception', () => {
|
||||||
|
@ -25,7 +25,6 @@ const updateddescription = 'This is updated description';
|
|||||||
const teamName = `team-ct-test-${uuid()}`;
|
const teamName = `team-ct-test-${uuid()}`;
|
||||||
const TEAM_DETAILS = {
|
const TEAM_DETAILS = {
|
||||||
name: teamName,
|
name: teamName,
|
||||||
displayName: teamName,
|
|
||||||
updatedname: `${teamName}-updated`,
|
updatedname: `${teamName}-updated`,
|
||||||
teamType: 'Department',
|
teamType: 'Department',
|
||||||
description: `This is ${teamName} description`,
|
description: `This is ${teamName} description`,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user