Skip to content

Commit

Permalink
Fix for edit_documentation and glossary_navigation cypress tests (#8838)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkorchak authored Sep 18, 2023
1 parent 99d7eb7 commit 5882fe4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ describe("glossary sidebar navigation test", () => {
//ensure the new term is under the parent term group in the navigation sidebar
cy.get('*[class^="GlossaryBrowser"]').contains(glossaryTermGroup).click();
cy.get('*[class^="GlossaryEntitiesList"]').contains(glossaryTerm).should("be.visible");
cy.get('*[class^="GlossaryBrowser"] [aria-label="down"]').click().wait(1000);
cy.get('*[class^="GlossaryBrowser"]').contains(glossaryTerm).should("not.exist");
//move a term group from the root level to be under a parent term group
cy.goToGlossaryList();
cy.clickOptionWithText(glossaryTermGroup);
Expand All @@ -41,8 +39,8 @@ describe("glossary sidebar navigation test", () => {
cy.get("button").contains("Move").click();
cy.waitTextVisible("Moved Term Group!");
//ensure it is no longer on the sidebar navigator at the top level but shows up under the new parent
cy.get('*[class^="GlossaryBrowser"] [aria-label="down"]').click().wait(1000);
cy.get('*[class^="GlossaryBrowser"]').contains(glossaryTermGroup).should("not.exist");
cy.get('*[class^="GlossaryBrowser"]').contains(glossaryParentGroup).click();
cy.get('*[class^="GlossaryEntitiesList"]').contains(glossaryTermGroup).should("be.visible");
//delete a term group
cy.goToGlossaryList();
cy.clickOptionWithText(glossaryParentGroup);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ describe("edit documentation and link to dataset", () => {
cy.contains("Sample doc").trigger("mouseover", { force: true });
cy.get('[data-icon="delete"]').click();
cy.waitTextVisible("Link Removed");
cy.get("button").contains("Add Link").click();
cy.get("#addLinkForm_url").type(wrong_url);
cy.get("button").contains("Add Link").click().wait(1000);
cy.get('[role="dialog"] #addLinkForm_url').type(wrong_url);
cy.waitTextVisible("This field must be a valid url.");
cy.focused().clear();
cy.waitTextVisible("A URL is required.");
Expand All @@ -54,9 +54,9 @@ describe("edit documentation and link to dataset", () => {
it("open test domain page, remove and add dataset link", () => {
cy.loginWithCredentials();
cy.visit("/domain/urn:li:domain:marketing/Entities");
cy.get("[role='tab']").contains("Documentation").click();
cy.get("button").contains("Add Link").click();
cy.get("#addLinkForm_url").type(wrong_url);
cy.waitTextVisible("SampleCypressKafkaDataset");
cy.get("button").contains("Add Link").click().wait(1000);
cy.get('[role="dialog"] #addLinkForm_url').type(wrong_url);
cy.waitTextVisible("This field must be a valid url.");
cy.focused().clear();
cy.waitTextVisible("A URL is required.");
Expand All @@ -66,6 +66,7 @@ describe("edit documentation and link to dataset", () => {
cy.get('[role="dialog"] button').contains("Add").click();
cy.waitTextVisible("Link Added");
cy.get("[role='tab']").contains("Documentation").click();
cy.waitTextVisible("Edit");
cy.get(`[href='${correct_url}']`).should("be.visible");
cy.contains("Sample doc").trigger("mouseover", { force: true });
cy.get('[data-icon="delete"]').click();
Expand Down Expand Up @@ -94,4 +95,4 @@ describe("edit documentation and link to dataset", () => {
cy.waitTextVisible("Foo field description has changed");
cy.waitTextVisible("(edited)");
});
});
});

0 comments on commit 5882fe4

Please sign in to comment.