MCPcopy Create free account
hub / github.com/coder/coder / fillForm

Function fillForm

site/src/pages/SetupPage/SetupPage.test.tsx:14–30  ·  view source on GitHub ↗
({
	email = "someone@coder.com",
	password = "password",
}: {
	username?: string;
	email?: string;
	password?: string;
} = {})

Source from the content-addressed store, hash-verified

12import { SetupPage } from "./SetupPage";
13
14const fillForm = async ({
15 email = "someone@coder.com",
16 password = "password",
17}: {
18 username?: string;
19 email?: string;
20 password?: string;
21} = {}) => {
22 const emailField = screen.getByLabelText("Email");
23 const passwordField = screen.getByLabelText("Password");
24 await userEvent.type(emailField, email);
25 await userEvent.type(passwordField, password);
26 const submitButton = screen.getByRole("button", {
27 name: "Continue",
28 });
29 await userEvent.click(submitButton);
30};
31
32describe("Setup Page", () => {
33 beforeEach(() => {

Callers 1

SetupPage.test.tsxFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected