Skip to content

Commit

Permalink
Business Attributes: Fixed Schema Field Cypress Test Cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kartikey-visa committed Apr 3, 2024
1 parent 998aeb2 commit 104048b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const Preview = ({
const location = useLocation();
const relatedEntitiesUrl = getRelatedEntitiesUrl(entityRegistry, businessAttributeUrn);

const url = `${entityRegistry.getEntityUrl(EntityType.Dataset, datasetUrn)}/${encodeURIComponent('Schema')}?schemaFilter=${encodeURIComponent('customer_id')}`;
const url = `${entityRegistry.getEntityUrl(EntityType.Dataset, datasetUrn)}/${encodeURIComponent('Schema')}?schemaFilter=${encodeURIComponent(name)}`;

return (
<DefaultPreviewCard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ describe("businessAttribute", () => {
cy.clickOptionWithText("Related Entities");
//cy.visit("/business-attribute/urn:li:businessAttribute:37c81832-06e0-40b1-a682-858e1dd0d449/Related%20Entities");
//cy.wait(5000);
//Uncomment below two lines once schema Field Entity is fixed
// cy.contains("of 0").should("not.exist");
// cy.contains(/of [0-9]+/);
cy.contains("of 0").should("not.exist");
cy.contains(/of [0-9]+/);
});


Expand All @@ -91,10 +90,9 @@ describe("businessAttribute", () => {
"logging{enter}"
);
cy.wait(5000);
//Uncomment below three lines once schema Field Entity is fixed
// cy.contains("of 0").should("not.exist");
// cy.contains(/of 1/);
// cy.contains("cypress_logging_events");
cy.contains("of 0").should("not.exist");
cy.contains(/of 1/);
cy.contains("cypress_logging_events");
});

it("remove business attribute from dataset", () => {
Expand Down
25 changes: 9 additions & 16 deletions smoke-test/tests/cypress/cypress/e2e/mutations/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,17 @@ describe("mutations", () => {
// title of tag page
cy.contains("CypressTestAddTag");

cy.wait(2000);
// description of tag page
cy.contains("CypressTestAddTag Test Description");

// used by panel - click to search
//Uncomment below line once schema Field Entity is fixed
// cy.contains("1 Datasets").click({ force: true });
cy.wait(3000);
cy.contains("1 Datasets").click({ force: true });

// verify dataset shows up in search now
//Uncomment below line once schema Field Entity is fixed
// cy.contains("of 1 result").click({ force: true });
//Uncomment below line once schema Field Entity is fixed
// cy.contains("cypress_logging_events").click({ force: true });
//Remove below line once schema Field Entity is fixed
cy.goToDataset("urn:li:dataset:(urn:li:dataPlatform:hive,cypress_logging_events,PROD)", "cypress_logging_events");
cy.contains("of 1 result").click({ force: true });
cy.contains("cypress_logging_events").click({ force: true });
cy.get('[data-testid="tag-CypressTestAddTag"]').within(() =>
cy.get("span[aria-label=close]").click()
);
Expand Down Expand Up @@ -130,16 +127,12 @@ describe("mutations", () => {
cy.contains("CypressTestAddTag2 Test Description");

// used by panel - click to search
//Uncomment below line once schema Field Entity is fixed
// cy.contains("1 Datasets").click();
cy.wait(3000);
cy.contains("1 Datasets").click();

// verify dataset shows up in search now
//Uncomment below line once schema Field Entity is fixed
// cy.contains("of 1 result").click();
//Uncomment below line once schema Field Entity is fixed
// cy.contains("cypress_logging_events").click();
//Remove below line once schema Field Entity is fixed
cy.goToDataset("urn:li:dataset:(urn:li:dataPlatform:hive,cypress_logging_events,PROD)", "cypress_logging_events");
cy.contains("of 1 result").click();
cy.contains("cypress_logging_events").click();
cy.clickOptionWithText("event_name");
cy.get('[data-testid="schema-field-event_name-tags"]').within(() =>
cy
Expand Down

0 comments on commit 104048b

Please sign in to comment.