Cypress: Fixed AUT failure (#16660)

* Cypress: Fixed AUT failure

* minor change

* minor owner fix

* fix glossary cypress failure

---------

Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com>
Co-authored-by: Ashish Gupta <ashish@getcollate.io>
This commit is contained in:
Shailesh Parmar 2024-06-14 19:12:22 +05:30 committed by GitHub
parent 385dcd40f5
commit 7145136626
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 24 additions and 13 deletions

View File

@ -50,8 +50,8 @@ export const checkDataInsightSuccessStatus = (
) { ) {
waitForTimer(timer, count); waitForTimer(timer, count);
} else { } else {
if ($ingestionStatus.text() !== 'Success') { if ($ingestionStatus.text() === 'Success') {
cy.get('@checkRun').should('have.text', 'Success'); expect($ingestionStatus.text()).eq('Success');
isSuccessStatus = true; isSuccessStatus = true;
} }

View File

@ -200,7 +200,7 @@ const updateDescription = (newDescription) => {
}; };
const fillForm = (formObj, type) => { const fillForm = (formObj, type) => {
interceptURL('GET', '/api/v1/users?limit=25&isBot=false', 'getUsers'); interceptURL('GET', '/api/v1/users?*isBot=false*', 'getUsers');
cy.get('[data-testid="name"]').scrollIntoView().clear().type(formObj.name); cy.get('[data-testid="name"]').scrollIntoView().clear().type(formObj.name);
cy.get(descriptionBox) cy.get(descriptionBox)
@ -224,14 +224,20 @@ const fillForm = (formObj, type) => {
cy.get('[data-testid="owner-container"]').children().should('have.length', 1); cy.get('[data-testid="owner-container"]').children().should('have.length', 1);
cy.get('[data-testid="add-experts"]').scrollIntoView().click(); cy.get('[data-testid="add-experts"]').scrollIntoView().click();
verifyResponseStatusCode('@getUsers', 200);
interceptURL(
'GET',
`api/v1/search/query?q=*${encodeURI(formObj.experts)}*`,
'searchExpert'
);
cy.get('.user-select-popover [data-testid="searchbar"]').type( cy.get('.user-select-popover [data-testid="searchbar"]').type(
formObj.experts formObj.experts
); );
cy.get(`[title="${formObj.experts}"]`).scrollIntoView().click(); verifyResponseStatusCode('@searchExpert', 200);
cy.get('[data-testid="selectable-list-update-btn"]') cy.get(`.user-select-popover [title="${formObj.experts}"]`)
.should('exist') .scrollIntoView()
.and('be.visible')
.click(); .click();
cy.get('[data-testid="selectable-list-update-btn"]').click();
cy.get('[data-testid="delete-modal"]').should('not.exist'); cy.get('[data-testid="delete-modal"]').should('not.exist');
cy.get('[data-testid="experts-container"]') cy.get('[data-testid="experts-container"]')

View File

@ -33,7 +33,8 @@ const OWNER2 = 'Cynthia Meyer';
const TEAM_OWNER_1 = 'Marketplace'; const TEAM_OWNER_1 = 'Marketplace';
const TEAM_OWNER_2 = 'DevOps'; const TEAM_OWNER_2 = 'DevOps';
describe('Database hierarchy details page', { tags: 'DataAssets' }, () => { // migrated to playwrigth
describe.skip('Database hierarchy details page', { tags: 'DataAssets' }, () => {
before(() => { before(() => {
cy.login(); cy.login();

View File

@ -42,7 +42,8 @@ const OWNER2 = 'Cynthia Meyer';
const TEAM_OWNER_1 = 'Marketplace'; const TEAM_OWNER_1 = 'Marketplace';
const TEAM_OWNER_2 = 'DevOps'; const TEAM_OWNER_2 = 'DevOps';
describe('Entity detail page', { tags: 'DataAssets' }, () => { // migrated to playwrigth
describe.skip('Entity detail page', { tags: 'DataAssets' }, () => {
before(() => { before(() => {
cy.login(); cy.login();

View File

@ -1222,9 +1222,10 @@ describe('Glossary page should work properly', { tags: 'Governance' }, () => {
// checking the breadcrumb, if the change parent term is updated and displayed // checking the breadcrumb, if the change parent term is updated and displayed
cy.get('[data-testid="breadcrumb-link"]') cy.get('[data-testid="breadcrumb-link"]')
.should('be.visible')
.contains(`${parentTerm.name}`) .contains(`${parentTerm.name}`)
.click(); .as('breadcrumb');
cy.get('@breadcrumb').click();
verifyResponseStatusCode('@fetchGlossaryTermData', 200); verifyResponseStatusCode('@fetchGlossaryTermData', 200);

View File

@ -38,7 +38,8 @@ const OWNER2 = 'Cynthia Meyer';
const TEAM_OWNER_1 = 'Marketplace'; const TEAM_OWNER_1 = 'Marketplace';
const TEAM_OWNER_2 = 'DevOps'; const TEAM_OWNER_2 = 'DevOps';
describe('Services detail page', { tags: 'Integration' }, () => { // migrated to playwrigth
describe.skip('Services detail page', { tags: 'Integration' }, () => {
before(() => { before(() => {
cy.login(); cy.login();
EntityClass.preRequisitesForTests(); EntityClass.preRequisitesForTests();

View File

@ -83,11 +83,12 @@ describe('Teams flow should work properly', { tags: 'Settings' }, () => {
.should('exist') .should('exist')
.invoke('text') .invoke('text')
.then((text) => { .then((text) => {
interceptURL('GET', '/api/v1/users?limit=15', 'getUsers'); interceptURL('GET', '/api/v1/users?limit=*', 'getUsers');
// Clicking on edit owner button // Clicking on edit owner button
cy.get('[data-testid="edit-owner"]').click(); cy.get('[data-testid="edit-owner"]').click();
cy.get('.user-team-select-popover').contains('Users').click(); cy.get('.user-team-select-popover').contains('Users').click();
cy.wait('@getUsers');
cy.get('[data-testid="owner-select-users-search-bar"]').type(text); cy.get('[data-testid="owner-select-users-search-bar"]').type(text);
cy.get('[data-testid="selectable-list"]') cy.get('[data-testid="selectable-list"]')
.eq(1) .eq(1)