diff --git a/datahub-web-react/src/app/onboarding/OnboardingTour.tsx b/datahub-web-react/src/app/onboarding/OnboardingTour.tsx index 3205f837eb231..5a046971fe53f 100644 --- a/datahub-web-react/src/app/onboarding/OnboardingTour.tsx +++ b/datahub-web-react/src/app/onboarding/OnboardingTour.tsx @@ -25,6 +25,10 @@ export const OnboardingTour = ({ stepIds }: Props) => { setReshow(true); setIsOpen(true); } + if (e.metaKey && e.ctrlKey && e.key === 'h') { + setReshow(false); + setIsOpen(false); + } } document.addEventListener('keydown', handleKeyDown); }, []); diff --git a/smoke-test/.gitignore b/smoke-test/.gitignore index 55142a4a3630f..44d3f620a1937 100644 --- a/smoke-test/.gitignore +++ b/smoke-test/.gitignore @@ -130,4 +130,5 @@ dmypy.json # Pyre type checker .pyre/ -junit* \ No newline at end of file +junit* +tests/cypress/onboarding.json \ No newline at end of file diff --git a/smoke-test/tests/cypress/cypress/integration/mutations/add_users.js b/smoke-test/tests/cypress/cypress/integration/mutations/add_users.js index 3151638a477f5..7dea5ba01d5d5 100644 --- a/smoke-test/tests/cypress/cypress/integration/mutations/add_users.js +++ b/smoke-test/tests/cypress/cypress/integration/mutations/add_users.js @@ -1,6 +1,8 @@ const tryToSignUp = () => { - cy.enterTextInTestId("email", "example@example.com") - cy.enterTextInTestId("name", "Example Name") + let number = Math.floor(Math.random() * 100000); + let name = `Example Name ${number}`; + cy.enterTextInTestId("email", `example${number}@example.com`) + cy.enterTextInTestId("name", name) cy.enterTextInTestId("password", "Example password") cy.enterTextInTestId("confirmPassword", "Example password") @@ -8,6 +10,7 @@ const tryToSignUp = () => { cy.waitTextVisible("Other").click() cy.get("[type=submit]").click() + return name; }; describe("add_user", () => { @@ -23,8 +26,10 @@ describe("add_user", () => { const inviteLink = $elem.text(); cy.logout(); cy.visit(inviteLink); - tryToSignUp(); - cy.waitTextVisible("Accepted invite!") + let name = tryToSignUp(); + cy.waitTextVisible("Welcome to DataHub"); + cy.hideOnboardingTour(); + cy.waitTextVisible(name); }).then(() => { cy.logout(); cy.visit("/signup?invite_token=bad_token"); diff --git a/smoke-test/tests/cypress/cypress/support/commands.js b/smoke-test/tests/cypress/cypress/support/commands.js index c9174825bff84..2abea209a4ec7 100644 --- a/smoke-test/tests/cypress/cypress/support/commands.js +++ b/smoke-test/tests/cypress/cypress/support/commands.js @@ -136,6 +136,10 @@ Cypress.Commands.add("clickOptionWithTestId", (id) => { }); }) +Cypress.Commands.add("hideOnboardingTour", () => { + cy.get('body').type("{ctrl} {meta} h"); +}); + Cypress.Commands.add('addTermToDataset', (urn, dataset_name, term) => { cy.goToDataset(urn, dataset_name); cy.clickOptionWithText("Add Term");