Revert "fix failing playwright test (#17881)"

This reverts commit 478caa51fa9deb6df14e7bb4a595f30ce3f622f8.
This commit is contained in:
Ashish Gupta 2024-09-20 16:35:01 +05:30
parent 6b3f4646c6
commit fe8aafaedf
2 changed files with 138 additions and 145 deletions

View File

@ -70,68 +70,66 @@ test.afterAll('Cleanup', async ({ browser }) => {
for (const EntityClass of entities) { for (const EntityClass of entities) {
const defaultEntity = new EntityClass(); const defaultEntity = new EntityClass();
test.fixme( test(`Lineage creation from ${defaultEntity.getType()} entity`, async ({
`Lineage creation from ${defaultEntity.getType()} entity`, browser,
async ({ browser }) => { }) => {
test.slow(true); test.slow(true);
const { page } = await createNewPage(browser); const { page } = await createNewPage(browser);
const { currentEntity, entities, cleanup } = const { currentEntity, entities, cleanup } = await setupEntitiesForLineage(
await setupEntitiesForLineage(page, defaultEntity); page,
defaultEntity
);
await test.step('Should create lineage for the entity', async () => { await test.step('Should create lineage for the entity', async () => {
await redirectToHomePage(page); await redirectToHomePage(page);
await currentEntity.visitEntityPage(page); await currentEntity.visitEntityPage(page);
await visitLineageTab(page); await visitLineageTab(page);
await verifyColumnLayerInactive(page); await verifyColumnLayerInactive(page);
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await performZoomOut(page); await performZoomOut(page);
for (const entity of entities) { for (const entity of entities) {
await connectEdgeBetweenNodes(page, currentEntity, entity); await connectEdgeBetweenNodes(page, currentEntity, entity);
} }
await redirectToHomePage(page); await redirectToHomePage(page);
await currentEntity.visitEntityPage(page); await currentEntity.visitEntityPage(page);
await visitLineageTab(page); await visitLineageTab(page);
await page await page
.locator('.react-flow__controls-fitview') .locator('.react-flow__controls-fitview')
.dispatchEvent('click'); .dispatchEvent('click');
for (const entity of entities) { for (const entity of entities) {
await verifyNodePresent(page, entity); await verifyNodePresent(page, entity);
} }
}); });
await test.step('Should create pipeline between entities', async () => { await test.step('Should create pipeline between entities', async () => {
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await performZoomOut(page); await performZoomOut(page);
for (const entity of entities) { for (const entity of entities) {
await applyPipelineFromModal(page, currentEntity, entity, pipeline); await applyPipelineFromModal(page, currentEntity, entity, pipeline);
} }
}); });
await test.step( await test.step('Remove lineage between nodes for the entity', async () => {
'Remove lineage between nodes for the entity', await redirectToHomePage(page);
async () => { await currentEntity.visitEntityPage(page);
await redirectToHomePage(page); await visitLineageTab(page);
await currentEntity.visitEntityPage(page); await page.click('[data-testid="edit-lineage"]');
await visitLineageTab(page); await performZoomOut(page);
await page.click('[data-testid="edit-lineage"]');
await performZoomOut(page);
for (const entity of entities) { for (const entity of entities) {
await deleteEdge(page, currentEntity, entity); await deleteEdge(page, currentEntity, entity);
} }
} });
);
await cleanup(); await cleanup();
} });
);
} }
test.fixme('Verify column lineage between tables', async ({ browser }) => { test('Verify column lineage between tables', async ({ browser }) => {
const { page } = await createNewPage(browser); const { page } = await createNewPage(browser);
const { apiContext, afterAction } = await getApiContext(page); const { apiContext, afterAction } = await getApiContext(page);
const table1 = new TableClass(); const table1 = new TableClass();
@ -169,117 +167,112 @@ test.fixme('Verify column lineage between tables', async ({ browser }) => {
await afterAction(); await afterAction();
}); });
test.fixme( test('Verify column lineage between table and topic', async ({ browser }) => {
'Verify column lineage between table and topic', const { page } = await createNewPage(browser);
async ({ browser }) => { const { apiContext, afterAction } = await getApiContext(page);
const { page } = await createNewPage(browser); const table = new TableClass();
const { apiContext, afterAction } = await getApiContext(page); const topic = new TopicClass();
const table = new TableClass(); await table.create(apiContext);
const topic = new TopicClass(); await topic.create(apiContext);
await table.create(apiContext);
await topic.create(apiContext);
const sourceTableFqn = get(table, 'entityResponseData.fullyQualifiedName'); const sourceTableFqn = get(table, 'entityResponseData.fullyQualifiedName');
const sourceCol = `${sourceTableFqn}.${get( const sourceCol = `${sourceTableFqn}.${get(
table, table,
'entityResponseData.columns[0].name' 'entityResponseData.columns[0].name'
)}`; )}`;
const targetCol = get( const targetCol = get(
topic, topic,
'entityResponseData.messageSchema.schemaFields[0].children[0].fullyQualifiedName' 'entityResponseData.messageSchema.schemaFields[0].children[0].fullyQualifiedName'
); );
await addPipelineBetweenNodes(page, table, topic); await addPipelineBetweenNodes(page, table, topic);
await activateColumnLayer(page); await activateColumnLayer(page);
// Add column lineage // Add column lineage
await addColumnLineage(page, sourceCol, targetCol); await addColumnLineage(page, sourceCol, targetCol);
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await removeColumnLineage(page, sourceCol, targetCol); await removeColumnLineage(page, sourceCol, targetCol);
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await deleteNode(page, topic); await deleteNode(page, topic);
await table.delete(apiContext); await table.delete(apiContext);
await topic.delete(apiContext); await topic.delete(apiContext);
await afterAction(); await afterAction();
} });
);
test.fixme( test('Verify column lineage between topic and api endpoint', async ({
'Verify column lineage between topic and api endpoint', browser,
async ({ browser }) => { }) => {
const { page } = await createNewPage(browser); const { page } = await createNewPage(browser);
const { apiContext, afterAction } = await getApiContext(page); const { apiContext, afterAction } = await getApiContext(page);
const topic = new TopicClass(); const topic = new TopicClass();
const apiEndpoint = new ApiEndpointClass(); const apiEndpoint = new ApiEndpointClass();
await topic.create(apiContext); await topic.create(apiContext);
await apiEndpoint.create(apiContext); await apiEndpoint.create(apiContext);
const sourceCol = get( const sourceCol = get(
topic, topic,
'entityResponseData.messageSchema.schemaFields[0].children[0].fullyQualifiedName' 'entityResponseData.messageSchema.schemaFields[0].children[0].fullyQualifiedName'
); );
const targetCol = get( const targetCol = get(
apiEndpoint, apiEndpoint,
'entityResponseData.responseSchema.schemaFields[0].children[1].fullyQualifiedName' 'entityResponseData.responseSchema.schemaFields[0].children[1].fullyQualifiedName'
); );
await addPipelineBetweenNodes(page, topic, apiEndpoint); await addPipelineBetweenNodes(page, topic, apiEndpoint);
await activateColumnLayer(page); await activateColumnLayer(page);
// Add column lineage // Add column lineage
await addColumnLineage(page, sourceCol, targetCol); await addColumnLineage(page, sourceCol, targetCol);
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await removeColumnLineage(page, sourceCol, targetCol); await removeColumnLineage(page, sourceCol, targetCol);
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await deleteNode(page, apiEndpoint); await deleteNode(page, apiEndpoint);
await topic.delete(apiContext); await topic.delete(apiContext);
await apiEndpoint.delete(apiContext); await apiEndpoint.delete(apiContext);
await afterAction(); await afterAction();
} });
);
test.fixme( test('Verify column lineage between table and api endpoint', async ({
'Verify column lineage between table and api endpoint', browser,
async ({ browser }) => { }) => {
const { page } = await createNewPage(browser); const { page } = await createNewPage(browser);
const { apiContext, afterAction } = await getApiContext(page); const { apiContext, afterAction } = await getApiContext(page);
const table = new TableClass(); const table = new TableClass();
const apiEndpoint = new ApiEndpointClass(); const apiEndpoint = new ApiEndpointClass();
await table.create(apiContext); await table.create(apiContext);
await apiEndpoint.create(apiContext); await apiEndpoint.create(apiContext);
const sourceTableFqn = get(table, 'entityResponseData.fullyQualifiedName'); const sourceTableFqn = get(table, 'entityResponseData.fullyQualifiedName');
const sourceCol = `${sourceTableFqn}.${get( const sourceCol = `${sourceTableFqn}.${get(
table, table,
'entityResponseData.columns[0].name' 'entityResponseData.columns[0].name'
)}`; )}`;
const targetCol = get( const targetCol = get(
apiEndpoint, apiEndpoint,
'entityResponseData.responseSchema.schemaFields[0].children[0].fullyQualifiedName' 'entityResponseData.responseSchema.schemaFields[0].children[0].fullyQualifiedName'
); );
await addPipelineBetweenNodes(page, table, apiEndpoint); await addPipelineBetweenNodes(page, table, apiEndpoint);
await activateColumnLayer(page); await activateColumnLayer(page);
// Add column lineage // Add column lineage
await addColumnLineage(page, sourceCol, targetCol); await addColumnLineage(page, sourceCol, targetCol);
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await removeColumnLineage(page, sourceCol, targetCol); await removeColumnLineage(page, sourceCol, targetCol);
await page.click('[data-testid="edit-lineage"]'); await page.click('[data-testid="edit-lineage"]');
await deleteNode(page, apiEndpoint); await deleteNode(page, apiEndpoint);
await table.delete(apiContext); await table.delete(apiContext);
await apiEndpoint.delete(apiContext); await apiEndpoint.delete(apiContext);
await afterAction(); await afterAction();
} });
);

View File

@ -867,7 +867,7 @@ export const createDescriptionTaskForGlossary = async (
await assigneeField.click(); await assigneeField.click();
const userSearchResponse = page.waitForResponse( const userSearchResponse = page.waitForResponse(
`/api/v1/search/query?q=*${value.assignee}**&index=user_search_index%2Cteam_search_index` `/api/v1/search/suggest?q=${value.assignee}&index=user_search_index%2Cteam_search_index`
); );
await assigneeField.fill(value.assignee); await assigneeField.fill(value.assignee);
await userSearchResponse; await userSearchResponse;
@ -922,7 +922,7 @@ export const createTagTaskForGlossary = async (
); );
await assigneeField.click(); await assigneeField.click();
const userSearchResponse = page.waitForResponse( const userSearchResponse = page.waitForResponse(
`/api/v1/search/query?q=*${value.assignee}**&index=user_search_index%2Cteam_search_index` `/api/v1/search/suggest?q=${value.assignee}&index=user_search_index%2Cteam_search_index`
); );
await assigneeField.fill(value.assignee); await assigneeField.fill(value.assignee);
await userSearchResponse; await userSearchResponse;