fleet/cypress/integration/setup/setup.spec.ts
noahtalerman 4cca4e7e7f
Remove @fleetdm.com emails from fleetdm/fleet repo (#882)
- In tests and documentation, replace `@fleetdm.com` with `@example.com`
- In documentation, replace `hello@fleetdm.com` with `fleetdm.com/contact`
- In documentation, replace `security@fleetdm.com` with `fleetdm.com/contact`
- In Dockerfiles, replace `engineering@fleetdm.com` with `hello@fleetdm.com`. These two files are the only remaining files with a `@fleetdm.com` email.
2021-05-27 17:19:14 -04:00

41 lines
1 KiB
TypeScript

describe("Setup", () => {
// Different than normal beforeEach because we don't run the fleetctl setup.
beforeEach(() => {
cy.exec("make e2e-reset-db", { timeout: 5000 });
});
it("Completes setup", () => {
cy.visit("/");
cy.url().should("match", /\/setup$/);
cy.contains(/setup/i);
// Page 1
cy.findByPlaceholderText(/username/i).type("test");
cy.findByPlaceholderText(/^password/i)
.first()
.type("admin123#");
cy.findByPlaceholderText(/confirm password/i)
.last()
.type("admin123#");
cy.findByPlaceholderText(/email/i).type("test@example.com");
cy.contains("button:enabled", /next/i).click();
// Page 2
cy.findByPlaceholderText(/organization name/i).type("Fleet Test");
cy.contains("button:enabled", /next/i).click();
// Page 3
cy.contains("button:enabled", /submit/i).click();
// Page 4
cy.contains("button:enabled", /finish/i).click();
cy.url().should("match", /\/hosts\/manage$/i);
cy.contains(/all hosts/i);
});
});