mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-27 08:54:32 +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);
|
||||
setIsOpen(true);
|
||||
}
|
||||
if (e.metaKey && e.ctrlKey && e.key === 'h') {
|
||||
setReshow(false);
|
||||
setIsOpen(false);
|
||||
}
|
||||
}
|
||||
document.addEventListener('keydown', handleKeyDown);
|
||||
}, []);
|
||||
|
||||
1
smoke-test/.gitignore
vendored
1
smoke-test/.gitignore
vendored
@ -131,3 +131,4 @@ dmypy.json
|
||||
# Pyre type checker
|
||||
.pyre/
|
||||
junit*
|
||||
tests/cypress/onboarding.json
|
||||
@ -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");
|
||||
|
||||
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user