mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
* fixed flow for resetting current session * ignoring downloads for windows because paths * using correct shell for windows * using correct shell for windows * ignoring exception; we can't fake react context * changes file * must wait for flash to show * lint fixes * re-added secure package
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
describe("Setup", () => {
|
|
// Different than normal beforeEach because we don't run the fleetctl setup.
|
|
beforeEach(() => {
|
|
const SHELL = Cypress.platform === "win32" ? "cmd" : "bash";
|
|
cy.exec("make e2e-reset-db", {
|
|
timeout: 5000,
|
|
env: { SHELL },
|
|
});
|
|
});
|
|
|
|
it("Completes setup", () => {
|
|
cy.visit("/");
|
|
cy.url().should("match", /\/setup$/);
|
|
cy.contains(/setup/i);
|
|
|
|
// Page 1
|
|
cy.findByPlaceholderText(/full name/i).type("Test name");
|
|
|
|
cy.findByPlaceholderText(/email/i).type("test@example.com");
|
|
|
|
cy.findByPlaceholderText(/^password/i)
|
|
.first()
|
|
.type("admin123#");
|
|
|
|
cy.findByPlaceholderText(/confirm password/i)
|
|
.last()
|
|
.type("admin123#");
|
|
|
|
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", /next/i).click();
|
|
|
|
// Page 4
|
|
cy.contains("button:enabled", /confirm/i).click();
|
|
|
|
cy.url().should("match", /\/hosts\/manage$/i);
|
|
cy.contains(/all hosts/i);
|
|
});
|
|
});
|