mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-27 17:02:03 +00:00
fix(ci): flakiness due to onboarding tour in add user test (#6734)
This commit is contained in:
parent
65ba13d9aa
commit
3099bd1486
@ -25,6 +25,10 @@ export const OnboardingTour = ({ stepIds }: Props) => {
|
|||||||
setReshow(true);
|
setReshow(true);
|
||||||
setIsOpen(true);
|
setIsOpen(true);
|
||||||
}
|
}
|
||||||
|
if (e.metaKey && e.ctrlKey && e.key === 'h') {
|
||||||
|
setReshow(false);
|
||||||
|
setIsOpen(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
document.addEventListener('keydown', handleKeyDown);
|
document.addEventListener('keydown', handleKeyDown);
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
3
smoke-test/.gitignore
vendored
3
smoke-test/.gitignore
vendored
@ -130,4 +130,5 @@ dmypy.json
|
|||||||
|
|
||||||
# Pyre type checker
|
# Pyre type checker
|
||||||
.pyre/
|
.pyre/
|
||||||
junit*
|
junit*
|
||||||
|
tests/cypress/onboarding.json
|
||||||
@ -1,6 +1,8 @@
|
|||||||
const tryToSignUp = () => {
|
const tryToSignUp = () => {
|
||||||
cy.enterTextInTestId("email", "example@example.com")
|
let number = Math.floor(Math.random() * 100000);
|
||||||
cy.enterTextInTestId("name", "Example Name")
|
let name = `Example Name ${number}`;
|
||||||
|
cy.enterTextInTestId("email", `example${number}@example.com`)
|
||||||
|
cy.enterTextInTestId("name", name)
|
||||||
cy.enterTextInTestId("password", "Example password")
|
cy.enterTextInTestId("password", "Example password")
|
||||||
cy.enterTextInTestId("confirmPassword", "Example password")
|
cy.enterTextInTestId("confirmPassword", "Example password")
|
||||||
|
|
||||||
@ -8,6 +10,7 @@ const tryToSignUp = () => {
|
|||||||
cy.waitTextVisible("Other").click()
|
cy.waitTextVisible("Other").click()
|
||||||
|
|
||||||
cy.get("[type=submit]").click()
|
cy.get("[type=submit]").click()
|
||||||
|
return name;
|
||||||
};
|
};
|
||||||
|
|
||||||
describe("add_user", () => {
|
describe("add_user", () => {
|
||||||
@ -23,8 +26,10 @@ describe("add_user", () => {
|
|||||||
const inviteLink = $elem.text();
|
const inviteLink = $elem.text();
|
||||||
cy.logout();
|
cy.logout();
|
||||||
cy.visit(inviteLink);
|
cy.visit(inviteLink);
|
||||||
tryToSignUp();
|
let name = tryToSignUp();
|
||||||
cy.waitTextVisible("Accepted invite!")
|
cy.waitTextVisible("Welcome to DataHub");
|
||||||
|
cy.hideOnboardingTour();
|
||||||
|
cy.waitTextVisible(name);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
cy.logout();
|
cy.logout();
|
||||||
cy.visit("/signup?invite_token=bad_token");
|
cy.visit("/signup?invite_token=bad_token");
|
||||||
|
|||||||
@ -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) => {
|
Cypress.Commands.add('addTermToDataset', (urn, dataset_name, term) => {
|
||||||
cy.goToDataset(urn, dataset_name);
|
cy.goToDataset(urn, dataset_name);
|
||||||
cy.clickOptionWithText("Add Term");
|
cy.clickOptionWithText("Add Term");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user