mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-14 20:47:41 +00:00
Cypress: Enable the skip test and fix failing test (#9048)
* Cypress: Enable the skip test and fix failing test * Fix fail test case
This commit is contained in:
parent
80a4399c1a
commit
63afdc79f4
@ -220,7 +220,7 @@ export const service = {
|
||||
name: 'Glue',
|
||||
description: 'This is a Glue service',
|
||||
newDescription: 'This is updated Glue service description',
|
||||
Owner: 'Aaron Johnson',
|
||||
Owner: 'admin',
|
||||
};
|
||||
|
||||
export const SERVICE_TYPE = {
|
||||
|
@ -64,6 +64,8 @@ describe('Collect end point should work properly', () => {
|
||||
it(`Visit ${page.name} page should trigger collect API`, () => {
|
||||
cy.get(page.mainMenuId).should('be.visible').click();
|
||||
if (page.subMenu) {
|
||||
// adding manual wait to open dropdown in UI
|
||||
cy.wait(500);
|
||||
cy.get(page.subMenu).should('be.visible').click();
|
||||
}
|
||||
assertCollectEndPoint();
|
||||
|
@ -19,9 +19,9 @@ describe("Logout User", () => {
|
||||
cy.login();
|
||||
});
|
||||
|
||||
it.skip("After login logout the user and invalidate the token", () => {
|
||||
it("After login logout the user and invalidate the token", () => {
|
||||
|
||||
cy.get('[data-testid="avatar"]').should("be.visible").click()
|
||||
cy.get('[data-testid="avatar"]').first().should("be.visible").trigger('mouseover').click()
|
||||
|
||||
interceptURL('POST', '/api/v1/users/logout', 'logoutUser');
|
||||
|
||||
|
@ -109,12 +109,14 @@ describe('Glossary page should work properly', () => {
|
||||
cy.get('[data-testid="governance"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
.click();
|
||||
// adding manual wait to open dropdown in UI
|
||||
cy.wait(500);
|
||||
//Clicking on Glossary
|
||||
cy.get('[data-testid="appbar-item-glossary"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
.click();
|
||||
|
||||
// Todo: need to remove below uncaught exception once tree-view error resolves
|
||||
cy.on('uncaught:exception', () => {
|
||||
|
@ -24,7 +24,7 @@ const invalidEmail = 'userTest@openmetadata.org';
|
||||
const invalidPassword = 'testUsers@123';
|
||||
|
||||
describe('Login flow should work properly', () => {
|
||||
it.skip('Signup and Login with signed up credentials', () => {
|
||||
it('Signup and Login with signed up credentials', () => {
|
||||
interceptURL('GET', 'api/v1/config/auth', 'getLoginPage');
|
||||
cy.visit('/');
|
||||
verifyResponseStatusCode('@getLoginPage', 200);
|
||||
@ -63,7 +63,7 @@ describe('Login flow should work properly', () => {
|
||||
cy.url().should('eq', `${BASE_URL}/my-data`);
|
||||
|
||||
//Verify user profile
|
||||
cy.get('[data-testid="avatar"]').should('be.visible').click();
|
||||
cy.get('[data-testid="avatar"]').first().should('be.visible').trigger('mouseover').click();
|
||||
|
||||
cy.get('[data-testid="user-name"]')
|
||||
.should('be.visible')
|
||||
|
@ -47,14 +47,14 @@ describe('Services page should work properly', () => {
|
||||
cy.get('.toastui-editor-contents > p').contains(service.newDescription);
|
||||
});
|
||||
|
||||
it.skip('Update owner and check description', () => {
|
||||
it('Update owner and check description', () => {
|
||||
interceptURL('GET', '/api/v1/config/airflow', 'getService');
|
||||
cy.get(`[data-testid="service-name-${service.name}"]`)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
verifyResponseStatusCode('@getService', 200);
|
||||
interceptURL('GET', '/api/v1/users/loggedInUser/groupTeams', 'editOwner');
|
||||
interceptURL('GET', '/api/v1//search/query?q=*&from=0&size=10&index=*', 'editOwner');
|
||||
cy.get('[data-testid="edit-Owner-icon"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
@ -69,6 +69,7 @@ describe('Services page should work properly', () => {
|
||||
|
||||
cy.get('[data-testid="list-item"]')
|
||||
.contains(service.Owner)
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
|
@ -22,11 +22,13 @@ describe('Tags page should work', () => {
|
||||
cy.get('[data-testid="governance"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
.click();
|
||||
|
||||
// adding manual wait to open dropdown in UI
|
||||
cy.wait(500);
|
||||
cy.get('[data-testid="appbar-item-tags"]')
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
.click();
|
||||
verifyResponseStatusCode('@getTags', 200);
|
||||
});
|
||||
|
||||
|
@ -77,8 +77,8 @@ describe('Teams flow should work properly', () => {
|
||||
updateOwner();
|
||||
});
|
||||
|
||||
// Todo:- flaky test, need to fix, ref:- https://cloud.cypress.io/projects/a9yxci/runs/9138/test-results/c8083392-4aea-46d5-b937-8c7ce231f241
|
||||
it.skip('Add user to created team', () => {
|
||||
|
||||
it('Add user to created team', () => {
|
||||
interceptURL('GET', '/api/v1/users*', 'getUsers');
|
||||
|
||||
//Click on created team
|
||||
@ -86,15 +86,15 @@ describe('Teams flow should work properly', () => {
|
||||
.contains(TEAM_DETAILS.name)
|
||||
.click();
|
||||
|
||||
verifyResponseStatusCode('@getUsers', 200);
|
||||
cy.get('[data-testid="team-heading"]')
|
||||
.should('be.visible')
|
||||
.contains(TEAM_DETAILS.name);
|
||||
|
||||
verifyResponseStatusCode('@getUsers', 200);
|
||||
//Clicking on users tab
|
||||
cy.get('[data-testid="Users"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
.should('be.visible').trigger('click');
|
||||
|
||||
interceptURL('GET', '/api/v1/users?limit=15', 'addUser');
|
||||
interceptURL('GET', '/api/v1/users/*', 'getUsers');
|
||||
@ -256,64 +256,6 @@ describe('Teams flow should work properly', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it.skip('Asset tab should work properly', () => {
|
||||
//Click on created team name
|
||||
cy.get('table').find('.ant-table-row').contains(TEAM_DETAILS.name).click();
|
||||
|
||||
cy.wait(500);
|
||||
|
||||
//Click on Asset tab
|
||||
cy.get('[data-testid="Assets"]').should('be.visible').click();
|
||||
|
||||
//Click on explore tab
|
||||
cy.get('.button-comp').contains('Explore').should('be.visible').click();
|
||||
|
||||
cy.wait(1000);
|
||||
|
||||
//Navigate to the asset name
|
||||
cy.get('[data-testid="searchBox"]')
|
||||
.should('exist')
|
||||
.type(TEAM_DETAILS.assetname);
|
||||
|
||||
cy.get('[data-testid="data-name"]')
|
||||
.contains(TEAM_DETAILS.assetname)
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
//Click on owner icon
|
||||
cy.get('[data-testid="edit-Owner-icon"]').should('be.visible').click();
|
||||
|
||||
cy.wait(1000);
|
||||
|
||||
//Select the created team
|
||||
cy.get('[data-testid="list-item"]')
|
||||
.contains(TEAM_DETAILS.updatedname)
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.wait(1000);
|
||||
|
||||
cy.reload();
|
||||
|
||||
cy.get('[data-testid="appbar-item-settings"]').should('be.visible').click();
|
||||
//Clicking on teams
|
||||
cy.get('[data-menu-id*="teams"]')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
//Click on created table
|
||||
cy.get('table').find('.ant-table-row').contains(TEAM_DETAILS.name).click();
|
||||
//Click on asset tab
|
||||
cy.get('[data-testid="Assets"]').should('be.visible').click();
|
||||
|
||||
//Verify the added asset
|
||||
cy.get('[data-testid="user-card-container"]')
|
||||
.find('[data-testid="dataset-link"]')
|
||||
.should('contain', TEAM_DETAILS.assetname);
|
||||
});
|
||||
|
||||
it('Leave team flow should work properly', () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
|
@ -126,8 +126,8 @@ describe('Admin flow should work properly', () => {
|
||||
it('Restore soft deleted admin', () => {
|
||||
restoreUser(adminName);
|
||||
});
|
||||
// Todo:- Flaky test, Ref:- https://cloud.cypress.io/projects/a9yxci/runs/9124/test-results/bd7584d2-b8a8-42a5-89c5-c05851b9ea76
|
||||
it.skip('Permanently Delete Soft Deleted admin', () => {
|
||||
|
||||
it('Permanently Delete Soft Deleted admin', () => {
|
||||
softDeleteUser(adminName);
|
||||
deleteSoftDeletedUser(adminName);
|
||||
});
|
||||
|
@ -13,17 +13,31 @@
|
||||
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { interceptURL, searchEntity, verifyResponseStatusCode, visitEntityDetailsPage } from '../../common/common';
|
||||
import { ENTITIES, FOLLOWING_TITLE, MYDATA_SUMMARY_OPTIONS, MY_DATA_TITLE, NO_SEARCHED_TERMS, RECENT_SEARCH_TITLE, RECENT_VIEW_TITLE, SEARCH_ENTITY_DASHBOARD, SEARCH_ENTITY_PIPELINE, SEARCH_ENTITY_TABLE, SEARCH_ENTITY_TOPIC } from '../../constants/constants';
|
||||
import {
|
||||
interceptURL,
|
||||
searchEntity,
|
||||
verifyResponseStatusCode,
|
||||
visitEntityDetailsPage
|
||||
} from '../../common/common';
|
||||
import {
|
||||
ENTITIES,
|
||||
FOLLOWING_TITLE,
|
||||
MYDATA_SUMMARY_OPTIONS,
|
||||
MY_DATA_TITLE,
|
||||
NO_SEARCHED_TERMS,
|
||||
RECENT_SEARCH_TITLE,
|
||||
RECENT_VIEW_TITLE,
|
||||
SEARCH_ENTITY_DASHBOARD,
|
||||
SEARCH_ENTITY_PIPELINE,
|
||||
SEARCH_ENTITY_TABLE,
|
||||
SEARCH_ENTITY_TOPIC
|
||||
} from '../../constants/constants';
|
||||
|
||||
const tables = Object.values(SEARCH_ENTITY_TABLE);
|
||||
const topics = Object.values(SEARCH_ENTITY_TOPIC);
|
||||
const dashboards = Object.values(SEARCH_ENTITY_DASHBOARD);
|
||||
const pipelines = Object.values(SEARCH_ENTITY_PIPELINE);
|
||||
const FOLLOWING_MYDATA_COUNT = 3;
|
||||
|
||||
describe('MyData page should work', () => {
|
||||
beforeEach(() => {
|
||||
cy.login()
|
||||
cy.login();
|
||||
interceptURL('GET', '/api/v1/*/name/*', 'getEntityDetails');
|
||||
interceptURL('GET', '/api/v1/search/*', 'explorePageSearch');
|
||||
});
|
||||
@ -121,7 +135,7 @@ describe('MyData page should work', () => {
|
||||
});
|
||||
|
||||
Object.values(ENTITIES).map((entity) => {
|
||||
const text = entity.entityObj.displayName ?? entity.entityObj.term
|
||||
const text = entity.entityObj.displayName ?? entity.entityObj.term;
|
||||
it(`Recent view section and redirection should work for ${entity.name} entity`, () => {
|
||||
visitEntityDetailsPage(
|
||||
entity.entityObj.term,
|
||||
@ -173,35 +187,15 @@ describe('MyData page should work', () => {
|
||||
});
|
||||
|
||||
it.skip('My data and following section, CTA should work properly', () => {
|
||||
const totalCount =
|
||||
tables.length + pipelines.length + dashboards.length + topics.length;
|
||||
|
||||
cy.get('[data-testid="my-data-container"] > .ant-card > .ant-card-body')
|
||||
.children()
|
||||
.should('have.length', 8);
|
||||
cy.get(
|
||||
'[data-testid="following-data-container"] > .ant-card > .ant-card-body'
|
||||
)
|
||||
.children()
|
||||
.should('have.length', 8);
|
||||
|
||||
cy.get('[data-testid="my-data-total-count"]')
|
||||
.invoke('text')
|
||||
.then((text) => {
|
||||
expect(text).equal(`(${totalCount})`);
|
||||
});
|
||||
cy.get('[data-testid="following-data-total-count"]')
|
||||
.invoke('text')
|
||||
.then((text) => {
|
||||
expect(text).equal(`(${totalCount})`);
|
||||
});
|
||||
cy.get('[data-testid="my-data-container"]')
|
||||
.find('[data-testid*="My data"]')
|
||||
.should('have.length', FOLLOWING_MYDATA_COUNT);
|
||||
cy.get('[data-testid="following-data-container"]')
|
||||
.find('[data-testid*="Following data"]')
|
||||
.should('have.length', FOLLOWING_MYDATA_COUNT);
|
||||
|
||||
cy.get('[data-testid="my-data-total-count"]').should('be.visible').click();
|
||||
|
||||
cy.intercept(
|
||||
'/api/v1/search/query?q=*&from=0&size=*&sort_field=last_updated_timestamp&sort_order=desc&index=*'
|
||||
).as('searchApi');
|
||||
cy.wait('@searchApi');
|
||||
cy.get('[data-testid="table-data-card"]').first().should('be.visible');
|
||||
cy.clickOnLogo();
|
||||
|
||||
@ -209,7 +203,6 @@ describe('MyData page should work', () => {
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.wait('@searchApi');
|
||||
cy.get('[data-testid="table-data-card"]').first().should('be.visible');
|
||||
cy.clickOnLogo();
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user