test(): Add test case for dataset deprecation test (#8646)

Co-authored-by: John Joyce <john@acryl.io>
This commit is contained in:
Kos Korchak 2023-08-17 16:24:03 -04:00 committed by GitHub
parent 5f5f51f515
commit 10d3edc6eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,29 @@
describe("deprecation", () => {
describe("dataset deprecation", () => {
it("go to dataset and check deprecation works", () => {
const urn = "urn:li:dataset:(urn:li:dataPlatform:hive,cypress_logging_events,PROD)";
const datasetName = "cypress_logging_events";
cy.login();
cy.goToDataset(urn, datasetName);
cy.openThreeDotDropdown();
cy.clickOptionWithText("Mark as deprecated");
cy.addViaFormModal("test deprecation", "Add Deprecation Details");
cy.goToDataset(urn, datasetName);
cy.contains("DEPRECATED");
cy.waitTextVisible("Deprecation Updated");
cy.waitTextVisible("DEPRECATED")
cy.openThreeDotDropdown();
cy.clickOptionWithText("Mark as un-deprecated");
cy.waitTextVisible("Deprecation Updated");
cy.ensureTextNotPresent("DEPRECATED");
});
cy.openThreeDotDropdown();
cy.clickOptionWithText("Mark as deprecated");
cy.addViaFormModal("test deprecation", "Add Deprecation Details");
cy.waitTextVisible("Deprecation Updated");
cy.waitTextVisible("DEPRECATED");
cy.contains("DEPRECATED").trigger("mouseover", { force: true });
cy.waitTextVisible("Deprecation note");
cy.get("[role='tooltip']").contains("Mark as un-deprecated").click();
cy.waitTextVisible("Confirm Mark as un-deprecated");
cy.get("button").contains("Yes").click();
cy.waitTextVisible("Marked assets as un-deprecated!");
cy.ensureTextNotPresent("DEPRECATED");
});
});