Skip to content

Commit

Permalink
Attempting to fix search cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
John Joyce committed Feb 10, 2024
1 parent 3721d39 commit 3427be8
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
22 changes: 17 additions & 5 deletions smoke-test/tests/cypress/cypress/e2e/mutations/dataset_health.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
const urn = "urn:li:dataset:(urn:li:dataPlatform:hdfs,SampleCypressHdfsDataset,PROD)";
const datasetName = "SampleCypressHdfsDataset";
const urn1 = "urn:li:dataset:(urn:li:dataPlatform:hdfs,SampleCypressHdfsDataset,PROD)";
const datasetName1 = "SampleCypressHdfsDataset";

const urn2 = "urn:li:dataset:(urn:li:dataPlatform:hive,cypress_health_test,PROD)";
const datasetName2 = "cypress_health_test";

describe("dataset health test", () => {
it("go to dataset with failing assertions and verify health of dataset", () => {
cy.login();
cy.goToDataset(urn, datasetName);
cy.goToDataset(urn1, datasetName1);
// Ensure that the “Health” badge is present and there is an active incident warning
cy.get(`[href="/dataset/${urn}/Validation"]`).should("be.visible");
cy.get(`[href="/dataset/${urn}/Validation"] span`).trigger("mouseover", { force: true });
cy.get(`[href="/dataset/${urn1}/Validation"]`).should("be.visible");
cy.get(`[href="/dataset/${urn1}/Validation"] span`).trigger("mouseover", { force: true });
cy.waitTextVisible("This asset may be unhealthy");
cy.waitTextVisible("Assertions 1 of 1 assertions are failing");
cy.get('[data-testid="assertions-details"]').click();
// cy.clickOptionWithText("details");
cy.waitTextVisible("1 failed assertions");
});
it("go to dataset with active incidents and verify health of dataset", () => {
cy.login();
cy.goToDataset(urn2, datasetName2);
// Ensure that the “Health” badge is present and there is an active incident warning
cy.get(`[href="/dataset/${urn2}/Validation"]`).should("be.visible");
cy.get(`[href="/dataset/${urn2}/Validation"] span`).trigger("mouseover", { force: true });
cy.waitTextVisible("This asset may be unhealthy");
cy.waitTextVisible("1 active incident");
});
});
29 changes: 25 additions & 4 deletions smoke-test/tests/cypress/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,27 @@
},
"systemMetadata": null
},
{
"auditHeader": null,
"proposedSnapshot": {
"com.linkedin.pegasus2avro.metadata.snapshot.DatasetSnapshot": {
"urn": "urn:li:dataset:(urn:li:dataPlatform:hive,cypress_health_test,PROD)",
"aspects": [
{
"com.linkedin.pegasus2avro.dataset.DatasetProperties": {
"description": "table for health",
"uri": null,
"tags": [],
"customProperties": {
"encoding": "utf-8"
}
}
}
]
}
},
"proposedDelta": null
},
{
"auditHeader": null,
"entityType": "assertion",
Expand All @@ -2020,7 +2041,7 @@
"changeType": "UPSERT",
"aspectName": "assertionInfo",
"aspect": {
"value": "{\"customProperties\": {\"expectation_suite_name\": \"test_suite\"}, \"type\": \"DATASET\", \"datasetAssertion\": {\"dataset\": \"urn:li:dataset:(urn:li:dataPlatform:hdfs,SampleCypressHdfsDataset,PROD)\", \"scope\": \"DATASET_COLUMN\", \"fields\": [\"urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:hive,SampleHiveDataset,PROD),field_foo)\"], \"aggregation\": \"IDENTITY\", \"operator\": \"EQUAL_TO\", \"parameters\": {\"value\": {\"value\": \"true\", \"type\": \"UNKNOWN\"} }, \"nativeType\": \"expect_column_values_to_equal\", \"nativeParameters\": {\"column\": \"field_foo\", \"value\": \"true\"}}}",
"value": "{\"customProperties\": {\"expectation_suite_name\": \"test_suite\"}, \"type\": \"DATASET\", \"datasetAssertion\": {\"dataset\": \"urn:li:dataset:(urn:li:dataPlatform:hive,cypress_health_test,PROD)\", \"scope\": \"DATASET_COLUMN\", \"fields\": [\"urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:hive,cypress_health_test,PROD),field_foo)\"], \"aggregation\": \"IDENTITY\", \"operator\": \"EQUAL_TO\", \"parameters\": {\"value\": {\"value\": \"true\", \"type\": \"UNKNOWN\"} }, \"nativeType\": \"expect_column_values_to_equal\", \"nativeParameters\": {\"column\": \"field_foo\", \"value\": \"true\"}}}",
"contentType": "application/json"
},
"systemMetadata": null
Expand All @@ -2033,7 +2054,7 @@
"changeType": "UPSERT",
"aspectName": "assertionRunEvent",
"aspect": {
"value": "{\"timestampMillis\": 1675155843000, \"partitionSpec\": {\"type\": \"PARTITION\", \"partition\": \"{\\\"category\\\": \\\"catA\\\"}\"}, \"runId\": \"2021-12-28T12:00:00Z\", \"assertionUrn\": \"urn:li:assertion:358c683782c93c2fc2bd4bdd4fdb0153\", \"asserteeUrn\": \"urn:li:dataset:(urn:li:dataPlatform:hdfs,SampleCypressHdfsDataset,PROD)\", \"batchSpec\": {\"customProperties\": {\"data_asset_name\": \"data__foo1__asset\", \"datasource_name\": \"my_hive_datasource\"}, \"nativeBatchId\": \"c8f12129f2e57412eee5fb8656154d05\", \"limit\": 10}, \"status\": \"COMPLETE\", \"result\": {\"type\": \"FAILURE\", \"nativeResults\": {}}}",
"value": "{\"timestampMillis\": 1675155843000, \"partitionSpec\": {\"type\": \"PARTITION\", \"partition\": \"{\\\"category\\\": \\\"catA\\\"}\"}, \"runId\": \"2021-12-28T12:00:00Z\", \"assertionUrn\": \"urn:li:assertion:358c683782c93c2fc2bd4bdd4fdb0153\", \"asserteeUrn\": \"urn:li:dataset:(urn:li:dataPlatform:hive,cypress_health_test,PROD)\", \"batchSpec\": {\"customProperties\": {\"data_asset_name\": \"data__foo1__asset\", \"datasource_name\": \"my_hive_datasource\"}, \"nativeBatchId\": \"c8f12129f2e57412eee5fb8656154d05\", \"limit\": 10}, \"status\": \"COMPLETE\", \"result\": {\"type\": \"FAILURE\", \"nativeResults\": {}}}",
"contentType": "application/json"
},
"systemMetadata": null
Expand All @@ -2045,15 +2066,15 @@
"changeType": "UPSERT",
"aspectName": "incidentInfo",
"aspect": {
"value": "{\"entities\":[\"urn:li:dataset:(urn:li:dataPlatform:hdfs,SampleCypressHdfsDataset,PROD)\"],\"created\":{\"actor\":\"urn:li:corpuser:admin\",\"time\":1692301854918},\"description\":\"test\",\"source\":{\"type\":\"MANUAL\"},\"title\":\"test\",\"type\":\"OPERATIONAL\",\"status\":{\"lastUpdated\":{\"actor\":\"urn:li:corpuser:admin\",\"time\":1692301854919},\"state\":\"ACTIVE\"}}",
"value": "{\"entities\":[\"urn:li:dataset:(urn:li:dataPlatform:hive,cypress_health_test,PROD)\"],\"created\":{\"actor\":\"urn:li:corpuser:admin\",\"time\":1692301854918},\"description\":\"test\",\"source\":{\"type\":\"MANUAL\"},\"title\":\"test\",\"type\":\"OPERATIONAL\",\"status\":{\"lastUpdated\":{\"actor\":\"urn:li:corpuser:admin\",\"time\":1692301854919},\"state\":\"ACTIVE\"}}",
"contentType": "application/json"
},
"systemMetadata": null
},
{
"auditHeader": null,
"entityType": "dataset",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:hdfs,SampleCypressHdfsDataset,PROD)",
"entityUrn": "urn:li:dataset:(urn:li:dataPlatform:hive,cypress_health_test,PROD)",
"changeType": "UPSERT",
"aspectName": "incidentsSummary",
"aspect": {
Expand Down

0 comments on commit 3427be8

Please sign in to comment.