fleet/cypress/integration/setup/setup.spec.ts
Gabe Hernandez efb35b537a
add prettier and have it format all fleet application code (#625)
* add prettier and have it format all js code except website:
:

* trying running prettier check in CI

* fix runs on in CI

* change CI job name

* fix prettier erros and fix CI
2021-04-12 14:32:25 +01: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@fleetdm.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);
});
});