mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-27 23:48:19 +00:00
Cypress: Fix tests post removal of profile and sample data toggles from ingestion (#5337)
Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com>
This commit is contained in:
parent
2291fb4546
commit
e851242a1a
@ -219,58 +219,6 @@ export const searchEntity = (term) => {
|
||||
cy.get('.tw-cursor-pointer > [data-testid="image"]').click();
|
||||
};
|
||||
|
||||
export const testSampleData = (entity) => {
|
||||
cy.goToHomePage();
|
||||
|
||||
// initially sample data should not be present
|
||||
searchEntity(entity.term);
|
||||
cy.get(`[data-testid="${entity.entity}-tab"]`).should('be.visible').click();
|
||||
cy.get(`[data-testid="${entity.entity}-tab"]`)
|
||||
.should('be.visible')
|
||||
.should('have.class', 'active');
|
||||
cy.wait(500);
|
||||
cy.get('[data-testid="table-link"]').first().should('be.visible').click();
|
||||
|
||||
// go to service details and modify ingestion to enable sample data
|
||||
cy.get(':nth-child(1) > .link-title').should('be.visible').click();
|
||||
cy.wait(500);
|
||||
|
||||
if (entity.entityType === 'database') {
|
||||
cy.get('[data-testid="table-container"]').contains(entity.db);
|
||||
}
|
||||
|
||||
cy.get('[data-testid="Ingestions"]').should('be.visible').click();
|
||||
cy.get('[data-testid="edit"]').should('be.visible').click();
|
||||
cy.get('[data-testid="next-button"]')
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
|
||||
cy.get('[data-testid="dbt-source"]').should('be.visible');
|
||||
cy.get('[data-testid="submit-btn"]').should('be.visible').click();
|
||||
|
||||
cy.get('[data-testid="ingestion-type"]').should('be.visible');
|
||||
cy.get('[data-testid="deploy-button"]').should('be.visible').click();
|
||||
|
||||
cy.contains('has been updated and deployed successfully').should(
|
||||
'be.visible'
|
||||
);
|
||||
cy.get('[data-testid="view-service-button"]').should('be.visible').click();
|
||||
cy.get('[data-testid="Ingestions"]')
|
||||
.should('be.visible')
|
||||
.should('have.class', 'active');
|
||||
|
||||
cy.get('[data-testid="run"]').should('be.visible').click();
|
||||
cy.reload();
|
||||
handleIngestionRetry(entity.entityType, 1);
|
||||
|
||||
searchEntity(entity.term);
|
||||
cy.wait(500);
|
||||
cy.get('[data-testid="table-link"]').first().should('be.visible').click();
|
||||
cy.get('[data-testid="Sample Data"]').should('be.visible').click();
|
||||
cy.contains('No sample data available').should('not.exist');
|
||||
};
|
||||
|
||||
// add new tag to entity and its table
|
||||
export const addNewTagToEntity = (entity, term) => {
|
||||
searchEntity(entity);
|
||||
|
||||
@ -122,37 +122,6 @@ export const NEW_ADMIN = {
|
||||
description: 'Hello, I am test admin',
|
||||
};
|
||||
|
||||
export const BIG_QUERY_TABLE = {
|
||||
term: 'users',
|
||||
entity: MYDATA_SUMMARY_OPTIONS.tables,
|
||||
db: 'modified-leaf-330420',
|
||||
schema: 'stackoverflow',
|
||||
entityType: 'database',
|
||||
};
|
||||
|
||||
export const MY_SQL_TABLE = {
|
||||
term: 'user_entity',
|
||||
entity: MYDATA_SUMMARY_OPTIONS.tables,
|
||||
db: 'default',
|
||||
schema: 'openmetadata_db',
|
||||
entityType: 'database',
|
||||
};
|
||||
|
||||
export const RED_SHIFT_TABLE = {
|
||||
term: 'raw_customers',
|
||||
entity: MYDATA_SUMMARY_OPTIONS.tables,
|
||||
db: 'dev',
|
||||
schema: 'dbt_jaffle',
|
||||
entityType: 'database',
|
||||
};
|
||||
|
||||
export const SNOWFLAKE_TABLE = {
|
||||
term: 'snow_t1',
|
||||
entity: MYDATA_SUMMARY_OPTIONS.tables,
|
||||
db: 'TESTDB',
|
||||
schema: 'PUBLIC',
|
||||
entityType: 'database',
|
||||
};
|
||||
export const NEW_TAG_CATEGORY = {
|
||||
name: 'TestCategory',
|
||||
description: 'This is the TestCategory',
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { goToAddNewServicePage, testSampleData, testServiceCreationAndIngestion } from '../../common/common';
|
||||
import { BIG_QUERY_TABLE } from '../../constants/constants';
|
||||
import { goToAddNewServicePage, testServiceCreationAndIngestion } from '../../common/common';
|
||||
|
||||
describe('BigQuery Ingestion', () => {
|
||||
it('add and ingest data', () => {
|
||||
@ -63,8 +62,4 @@ describe('BigQuery Ingestion', () => {
|
||||
addIngestionInput
|
||||
);
|
||||
});
|
||||
|
||||
it('Check for Sample data in table entry', () => {
|
||||
testSampleData(BIG_QUERY_TABLE);
|
||||
});
|
||||
});
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { goToAddNewServicePage, testSampleData, testServiceCreationAndIngestion } from '../../common/common';
|
||||
import { MY_SQL_TABLE } from '../../constants/constants';
|
||||
import { goToAddNewServicePage, testServiceCreationAndIngestion } from '../../common/common';
|
||||
|
||||
describe('MySQL Ingestion', () => {
|
||||
it('add and ingest data', () => {
|
||||
@ -37,8 +36,4 @@ describe('MySQL Ingestion', () => {
|
||||
addIngestionInput
|
||||
);
|
||||
});
|
||||
|
||||
it('Check for Sample data in table entry', () => {
|
||||
testSampleData(MY_SQL_TABLE);
|
||||
});
|
||||
});
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { goToAddNewServicePage, testSampleData, testServiceCreationAndIngestion } from '../../common/common';
|
||||
import { RED_SHIFT_TABLE } from '../../constants/constants';
|
||||
import { goToAddNewServicePage, testServiceCreationAndIngestion } from '../../common/common';
|
||||
|
||||
describe('RedShift Ingestion', () => {
|
||||
it('add and ingest data', () => {
|
||||
@ -44,8 +43,4 @@ describe('RedShift Ingestion', () => {
|
||||
addIngestionInput
|
||||
);
|
||||
});
|
||||
|
||||
it('Check for Sample data in table entry', () => {
|
||||
testSampleData(RED_SHIFT_TABLE);
|
||||
});
|
||||
});
|
||||
|
||||
@ -11,8 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { goToAddNewServicePage, testSampleData, testServiceCreationAndIngestion } from '../../common/common';
|
||||
import { SNOWFLAKE_TABLE } from '../../constants/constants';
|
||||
import { goToAddNewServicePage, testServiceCreationAndIngestion } from '../../common/common';
|
||||
|
||||
describe('Snowflake Ingestion', () => {
|
||||
it('add and ingest data', { defaultCommandTimeout: 8000 }, () => {
|
||||
@ -38,8 +37,4 @@ describe('Snowflake Ingestion', () => {
|
||||
addIngestionInput
|
||||
);
|
||||
});
|
||||
|
||||
it('Check for Sample data in table entry', () => {
|
||||
testSampleData(SNOWFLAKE_TABLE);
|
||||
});
|
||||
});
|
||||
|
||||
@ -135,5 +135,6 @@ export const COMMON_UI_SCHEMA = {
|
||||
supportsMetadataExtraction: { 'ui:widget': 'hidden', 'ui:hideError': true },
|
||||
supportsUsageExtraction: { 'ui:widget': 'hidden', 'ui:hideError': true },
|
||||
supportsProfiler: { 'ui:widget': 'hidden', 'ui:hideError': true },
|
||||
supportsDatabase: { 'ui:widget': 'hidden', 'ui:hideError': true },
|
||||
type: { 'ui:widget': 'hidden' },
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user