diff --git a/smoke-test/tests/cypress/cypress/e2e/glossary/glossary_navigation.js b/smoke-test/tests/cypress/cypress/e2e/glossary/glossary_navigation.js index 81ca6a57edfbb..d8570982b1c81 100644 --- a/smoke-test/tests/cypress/cypress/e2e/glossary/glossary_navigation.js +++ b/smoke-test/tests/cypress/cypress/e2e/glossary/glossary_navigation.js @@ -61,17 +61,11 @@ describe("glossary sidebar navigation test", () => { cy.deleteFromDropdown(); cy.waitTextVisible("Deleted Glossary Term!"); cy.clickOptionWithText(glossaryParentGroup); - cy.clickOptionWithText(glossaryTermGroup).wait(3000); - cy.deleteFromDropdown(); - cy.waitTextVisible("Deleted Term Group!"); - cy.clickOptionWithText(glossaryParentGroup); - cy.deleteFromDropdown(); - cy.waitTextVisible("Deleted Term Group!"); + cy.removeTermGroup(glossaryTermGroup); + cy.removeTermGroup(glossaryParentGroup); - // Ensure it is no longer in the sidebar navigator cy.ensureTextNotPresent(glossaryTerm); cy.ensureTextNotPresent(glossaryTermGroup); cy.ensureTextNotPresent(glossaryParentGroup); - }); }); \ No newline at end of file diff --git a/smoke-test/tests/cypress/cypress/support/commands.js b/smoke-test/tests/cypress/cypress/support/commands.js index 5e3664f944edf..126ca36f9551b 100644 --- a/smoke-test/tests/cypress/cypress/support/commands.js +++ b/smoke-test/tests/cypress/cypress/support/commands.js @@ -331,6 +331,13 @@ Cypress.Commands.add("addGroupMember", (group_name, group_urn, member_name) => { cy.contains(member_name, {timeout: 10000}).should("be.visible"); }) +Cypress.Commands.add("removeTermGroup", (termGroup) => { + cy.clickOptionWithText(termGroup).wait(10000); + cy.deleteFromDropdown(); + cy.waitTextVisible("Deleted Term Group!"); +}) + + // // // -- This is a child command --