fix(test): cypress skipped tests (#13360)

* fix(test): cypress skipped tests

* limit cypress tests to changed one

* fix service search

* enable cypress tests

* enable tier and owner spec

---------

Co-authored-by: Sriharsha Chintalapani <harshach@users.noreply.github.com>
This commit is contained in:
Chirag Madlani 2023-10-02 12:06:10 +05:30 committed by GitHub
parent 11f1df437b
commit 241c838c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 53 additions and 42 deletions

View File

@ -1023,13 +1023,13 @@ export const SERVICE_DETAILS_FOR_VERSION_TEST = {
entityPatchPayload: COMMON_PATCH_PAYLOAD,
settingsMenuId: 'services.dashboards',
},
// Pipeline: {
// serviceName: PIPELINE_SERVICE_NAME,
// serviceCategory: SERVICE_CATEGORIES.PIPELINE_SERVICES,
// entityCreationDetails: PIPELINE_SERVICE_DETAILS_FOR_VERSION_TEST,
// entityPatchPayload: COMMON_PATCH_PAYLOAD,
// settingsMenuId: 'services.pipelines',
// },
Pipeline: {
serviceName: PIPELINE_SERVICE_NAME,
serviceCategory: SERVICE_CATEGORIES.PIPELINE_SERVICES,
entityCreationDetails: PIPELINE_SERVICE_DETAILS_FOR_VERSION_TEST,
entityPatchPayload: COMMON_PATCH_PAYLOAD,
settingsMenuId: 'services.pipelines',
},
'ML Model': {
serviceName: ML_MODEL_SERVICE_NAME,
serviceCategory: SERVICE_CATEGORIES.ML_MODEL_SERVICES,
@ -1037,20 +1037,20 @@ export const SERVICE_DETAILS_FOR_VERSION_TEST = {
entityPatchPayload: COMMON_PATCH_PAYLOAD,
settingsMenuId: 'services.mlModels',
},
// Storage: {
// serviceName: STORAGE_SERVICE_NAME,
// serviceCategory: SERVICE_CATEGORIES.STORAGE_SERVICES,
// entityCreationDetails: STORAGE_SERVICE_DETAILS_FOR_VERSION_TEST,
// entityPatchPayload: COMMON_PATCH_PAYLOAD,
// settingsMenuId: 'services.storages',
// },
// Search: {
// serviceName: SEARCH_SERVICE_NAME,
// serviceCategory: SERVICE_CATEGORIES.SEARCH_SERVICES,
// entityCreationDetails: SEARCH_SERVICE_DETAILS_FOR_VERSION_TEST,
// entityPatchPayload: COMMON_PATCH_PAYLOAD,
// settingsMenuId: 'services.search',
// },
Storage: {
serviceName: STORAGE_SERVICE_NAME,
serviceCategory: SERVICE_CATEGORIES.STORAGE_SERVICES,
entityCreationDetails: STORAGE_SERVICE_DETAILS_FOR_VERSION_TEST,
entityPatchPayload: COMMON_PATCH_PAYLOAD,
settingsMenuId: 'services.storages',
},
Search: {
serviceName: SEARCH_SERVICE_NAME,
serviceCategory: SERVICE_CATEGORIES.SEARCH_SERVICES,
entityCreationDetails: SEARCH_SERVICE_DETAILS_FOR_VERSION_TEST,
entityPatchPayload: COMMON_PATCH_PAYLOAD,
settingsMenuId: 'services.search',
},
};
export const DATABASE_DETAILS_FOR_VERSION_TEST = {

View File

@ -54,8 +54,7 @@ describe('Airflow Ingestion', () => {
});
});
// Todo: unskip below test once issue is fixed https://github.com/open-metadata/OpenMetadata/issues/11676
it.skip('Update pipeline description and verify description after re-run', () => {
it('Update pipeline description and verify description after re-run', () => {
updateDescriptionForIngestedTables(
serviceName,
tableName,

View File

@ -30,7 +30,7 @@ const DATA = {
},
};
describe.skip('Query Entity', () => {
describe('Query Entity', () => {
beforeEach(() => {
cy.login();
cy.get("[data-testid='welcome-screen-close-btn']").click();

View File

@ -53,8 +53,7 @@ describe('Recently viwed data assets', () => {
).should('have.length', 0);
});
// Todo: locally its working as expected but in cypress its not showing recently view table
it.skip(`recently view section should have at max list of 5 entity`, () => {
it(`recently view section should have at max list of 5 entity`, () => {
RECENTLY_VIEW_ENTITIES.map((entity, index) => {
visitEntityDetailsPage(entity.term, entity.serviceName, entity.entity);

View File

@ -24,20 +24,22 @@ import {
} from '../../common/common';
import {
DELETE_TERM,
SEARCH_ENTITY_DASHBOARD,
SEARCH_ENTITY_MLMODEL,
SEARCH_ENTITY_PIPELINE,
SEARCH_ENTITY_STORED_PROCEDURE,
SEARCH_ENTITY_TABLE,
SEARCH_ENTITY_TOPIC,
} from '../../constants/constants';
const ENTITIES = {
// table: {
// ...SEARCH_ENTITY_TABLE.table_5,
// schema: 'shopify',
// database: 'ecommerce_db',
// },
table: {
...SEARCH_ENTITY_TABLE.table_5,
schema: 'shopify',
database: 'ecommerce_db',
},
topic: SEARCH_ENTITY_TOPIC.topic_2,
// dashboard: SEARCH_ENTITY_DASHBOARD.dashboard_2,
dashboard: SEARCH_ENTITY_DASHBOARD.dashboard_2,
pipeline: SEARCH_ENTITY_PIPELINE.pipeline_2,
mlmodel: SEARCH_ENTITY_MLMODEL.mlmodel_2,
storedProcedure: SEARCH_ENTITY_STORED_PROCEDURE.stored_procedure_2,
@ -88,7 +90,7 @@ describe('Add and Remove Owner', () => {
});
});
it.skip('databaseSchema details page', () => {
it('databaseSchema details page', () => {
interceptURL('PATCH', '/api/v1/databaseSchemas/*', 'patchOwner');
interceptURL('GET', '/api/v1/*/name/*', 'schemaDetails');
const value = ENTITIES.table;
@ -106,7 +108,7 @@ describe('Add and Remove Owner', () => {
addRemoveOwner(OWNER, 'databaseSchemas');
});
it.skip('database details page', () => {
it('database details page', () => {
interceptURL('PATCH', '/api/v1/databases/*', 'patchOwner');
interceptURL('GET', '/api/v1/databases/name/*', 'databaseDetails');
const value = ENTITIES.table;
@ -124,7 +126,7 @@ describe('Add and Remove Owner', () => {
addRemoveOwner(OWNER, 'databases');
});
it.skip('service details page', () => {
it('service details page', () => {
interceptURL('PATCH', '/api/v1/services/databaseServices/*', 'patchOwner');
interceptURL(
'GET',
@ -341,7 +343,7 @@ describe('Add and Remove Tier', () => {
});
});
it.skip('database details page', () => {
it('database details page', () => {
interceptURL('GET', '/api/v1/databases/name/*', 'databaseDetails');
const value = ENTITIES.table;
visitEntityDetailsPage(value.term, value.serviceName, value.entity);

View File

@ -56,7 +56,7 @@ const visitAddAlertPage = () => {
});
};
describe.skip('Alerts page should work properly', () => {
describe('Alerts page should work properly', () => {
beforeEach(() => {
interceptURL('POST', '/api/v1/events/subscriptions', 'createAlert');
interceptURL('GET', `/api/v1/search/query?q=*`, 'getSearchResult');

View File

@ -721,7 +721,7 @@ describe('Glossary page should work properly', () => {
voteGlossary(true);
});
it.skip('Update glossary term', () => {
it('Update glossary term', () => {
const uSynonyms = ['pick up', 'take', 'obtain'];
const newRef = { name: 'take', url: 'https://take.com' };
const term2 = NEW_GLOSSARY_TERMS.term_2.name;
@ -758,7 +758,7 @@ describe('Glossary page should work properly', () => {
voteGlossary();
});
it.skip('Assets Tab should work properly', () => {
it('Assets Tab should work properly', () => {
selectActiveGlossary(NEW_GLOSSARY.name);
const glossary = NEW_GLOSSARY.name;
const term1 = NEW_GLOSSARY_TERMS.term_1.name;
@ -889,7 +889,7 @@ describe('Glossary page should work properly', () => {
.should('be.visible');
});
it.skip('Remove Glossary term from entity should work properly', () => {
it('Remove Glossary term from entity should work properly', () => {
const glossaryName = NEW_GLOSSARY_1.name;
const { name, fullyQualifiedName } = NEW_GLOSSARY_1_TERMS.term_1;
const entity = SEARCH_ENTITY_TABLE.table_3;

View File

@ -54,11 +54,11 @@ describe('Users flow should work properly', () => {
softDeleteUser(userName);
});
it.skip('Restore soft deleted user', () => {
it('Restore soft deleted user', () => {
restoreUser(userName);
});
it.skip('Permanently Delete Soft Deleted User', () => {
it('Permanently Delete Soft Deleted User', () => {
softDeleteUser(userName);
deleteSoftDeletedUser(userName);
});

View File

@ -100,6 +100,10 @@ const Services = ({ serviceName }: ServicesProps) => {
return SearchIndex.PIPELINE_SERVICE;
case ServiceCategory.ML_MODEL_SERVICES:
return SearchIndex.ML_MODEL_SERVICE;
case ServiceCategory.STORAGE_SERVICES:
return SearchIndex.STORAGE_SERVICE;
case ServiceCategory.SEARCH_SERVICES:
return SearchIndex.SEARCH_SERVICE;
}
return SearchIndex.DATABASE_SERVICE;

View File

@ -32,6 +32,7 @@ export enum SearchIndex {
SEARCH_SERVICE = 'search_service_search_index',
DASHBOARD_SERCVICE = 'dashboard_service_search_index',
ML_MODEL_SERVICE = 'mlmodel_service_search_index',
STORAGE_SERVICE = 'storage_service_search_index',
DOMAIN = 'domain_search_index',
SEARCH_INDEX = 'search_entity_index',
STORED_PROCEDURE = 'stored_procedure_search_index',

View File

@ -138,6 +138,10 @@ export interface SearchServiceSearchSource
extends SearchSourceBase,
SearchService {}
export interface StorageServiceSearchSource
extends SearchSourceBase,
SearchService {}
export type ExploreSearchSource =
| TableSearchSource
| DashboardSearchSource
@ -161,6 +165,7 @@ export type ExploreSearchSource =
| MlModelServiceSearchSource
| MessagingServiceSearchSource
| SearchServiceSearchSource
| StorageServiceSearchSource
| DomainSearchSource
| SearchIndexSearchSource;
@ -185,6 +190,7 @@ export type SearchIndexSearchSourceMapping = {
[SearchIndex.ML_MODEL_SERVICE]: MlModelServiceSearchSource;
[SearchIndex.MESSAGING_SERVICE]: MessagingServiceSearchSource;
[SearchIndex.SEARCH_SERVICE]: SearchServiceSearchSource;
[SearchIndex.STORAGE_SERVICE]: StorageServiceSearchSource;
[SearchIndex.DOMAIN]: DomainSearchSource;
[SearchIndex.SEARCH_INDEX]: SearchIndexSearchSource;
[SearchIndex.STORED_PROCEDURE]: StoredProcedureSearchSource;