Skip to content

Commit

Permalink
Updating the test with more data-testid usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kkorchak committed Oct 19, 2023
1 parent a716752 commit e0abe68
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default function EntityPathsModal({ paths, resultEntityUrn, hideModal }:

return (
<StyledModal
data-testid="entity-paths-modal"
title={
<Header>
Column path{paths.length > 1 && 's'} from{' '}
Expand Down
33 changes: 19 additions & 14 deletions smoke-test/tests/cypress/cypress/e2e/lineage/lineage_column_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,43 @@ describe("column-Level lineage and impact analysis path test", () => {
});

it("verify column-level lineage path at lineage praph and impact analysis ", () => {
//open dataset with column-level lineage configured an navigate to lineage tab -> visualize lineage
// Open dataset with column-level lineage configured an navigate to lineage tab -> visualize lineage
cy.loginWithCredentials();
cy.goToEntityLineageGraph(DATASET_ENTITY_TYPE, DATASET_URN);
//enable “show columns” toggle

//Enable “show columns” toggle
cy.waitTextVisible("SampleCypressHdfs");
cy.clickOptionWithTestId("column-toggle");
cy.waitTextVisible("shipment_info");
//verify functionality of column lineage

// Verify functionality of column lineage
cy.get(upstream).eq(3).click();
cy.get(upstream).eq(3).prev().should('not.have.attr', 'fill', 'white');
cy.get(downstream).eq(2).prev().should('not.have.attr', 'stroke', 'transparent');
cy.get(downstream).eq(2).click();
cy.get(downstream).eq(2).prev().should('not.have.attr', 'fill', 'white');
cy.get(upstream).eq(3).prev().should('not.have.attr', 'stroke', 'transparent');
//open dataset impact analysis view, enable column lineage

// Open dataset impact analysis view, enable column lineage
cy.goToDataset(DATASET_URN, "SampleCypressHdfsDataset");
cy.openEntityTab("Lineage");
cy.clickOptionWithText("Column Lineage");
cy.clickOptionWithText("Downstream");
//verify upstream column lineage, test column path modal

//Verify upstream column lineage, test column path modal
cy.clickOptionWithText("Upstream");
cy.waitTextVisible("SampleCypressKafkaDataset");
cy.ensureTextNotPresent("field_bar");
cy.contains("Select column").click({ force: true}).wait(1000);
cy.get(".rc-virtual-list").contains("shipment_info").click();
cy.waitTextVisible("field_bar");
cy.clickOptionWithText("field_bar");
cy.get('[role="dialog"]').contains("Column path").should("be.visible");
cy.get('[role="dialog"]').contains("field_bar").should("be.visible");
cy.get('[role="dialog"]').contains("shipment_info").should("be.visible");
cy.get('[role="dialog"] [data-icon="close"]').click();
//verify downstream column lineage, test column path modal
cy.get('[data-testid="entity-paths-modal"]').contains("Column path").should("be.visible");
cy.get('[data-testid="entity-paths-modal"]').contains("field_bar").should("be.visible");
cy.get('[data-testid="entity-paths-modal"]').contains("shipment_info").should("be.visible");
cy.get('[data-testid="entity-paths-modal"] [data-icon="close"]').click();

// Verify downstream column lineage, test column path modal
cy.goToDataset(DOWNSTREAM_DATASET_URN, "SampleCypressKafkaDataset");
cy.openEntityTab("Lineage");
cy.clickOptionWithText("Column Lineage");
Expand All @@ -55,9 +60,9 @@ describe("column-Level lineage and impact analysis path test", () => {
cy.get(".rc-virtual-list").contains("field_bar").click();
cy.waitTextVisible("shipment_info");
cy.clickOptionWithText("shipment_info");
cy.get('[role="dialog"]').contains("Column path").should("be.visible");
cy.get('[role="dialog"]').contains("field_bar").should("be.visible");
cy.get('[role="dialog"]').contains("shipment_info").should("be.visible");
cy.get('[role="dialog"] [data-icon="close"]').click();
cy.get('[data-testid="entity-paths-modal"]').contains("Column path").should("be.visible");
cy.get('[data-testid="entity-paths-modal"]').contains("field_bar").should("be.visible");
cy.get('[data-testid="entity-paths-modal"]').contains("shipment_info").should("be.visible");
cy.get('[data-testid="entity-paths-modal"] [data-icon="close"]').click();
});
});

0 comments on commit e0abe68

Please sign in to comment.