Skip to content

Commit b4f13c5

Browse files
committed
feat(setup): organization is not longer needed
1 parent 795ed3d commit b4f13c5

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

site/src/pages/SetupPage/SetupPage.test.tsx

-6
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,14 @@ const fillForm = async ({
1212
username = "someuser",
1313
email = "someone@coder.com",
1414
password = "password",
15-
organization = "Coder",
1615
}: {
1716
username?: string
1817
email?: string
1918
password?: string
20-
organization?: string
2119
} = {}) => {
2220
const usernameField = screen.getByLabelText(PageViewLanguage.usernameLabel)
2321
const emailField = screen.getByLabelText(PageViewLanguage.emailLabel)
2422
const passwordField = screen.getByLabelText(PageViewLanguage.passwordLabel)
25-
const organizationField = screen.getByLabelText(
26-
PageViewLanguage.organizationLabel,
27-
)
28-
await userEvent.type(organizationField, organization)
2923
await userEvent.type(usernameField, username)
3024
await userEvent.type(emailField, email)
3125
await userEvent.type(passwordField, password)

site/src/pages/SetupPage/SetupPageView.tsx

-12
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ export const Language = {
1313
emailLabel: "Email",
1414
passwordLabel: "Password",
1515
usernameLabel: "Username",
16-
organizationLabel: "Organization name",
1716
emailInvalid: "Please enter a valid email address.",
1817
emailRequired: "Please enter an email address.",
1918
passwordRequired: "Please enter a password.",
20-
organizationRequired: "Please enter an organization name.",
2119
create: "Setup account",
2220
welcomeMessage: (
2321
<>
@@ -32,7 +30,6 @@ const validationSchema = Yup.object({
3230
.email(Language.emailInvalid)
3331
.required(Language.emailRequired),
3432
password: Yup.string().required(Language.passwordRequired),
35-
organization: Yup.string().required(Language.organizationRequired),
3633
username: nameValidator(Language.usernameLabel),
3734
})
3835

@@ -55,7 +52,6 @@ export const SetupPageView: React.FC<SetupPageViewProps> = ({
5552
email: "",
5653
password: "",
5754
username: "",
58-
organization: "",
5955
},
6056
validationSchema,
6157
onSubmit,
@@ -70,14 +66,6 @@ export const SetupPageView: React.FC<SetupPageViewProps> = ({
7066
<Welcome message={Language.welcomeMessage} />
7167
<form onSubmit={form.handleSubmit}>
7268
<Stack>
73-
<TextField
74-
{...getFieldHelpers("organization")}
75-
onChange={onChangeTrimmed(form)}
76-
autoFocus
77-
fullWidth
78-
label={Language.organizationLabel}
79-
variant="outlined"
80-
/>
8169
<TextField
8270
{...getFieldHelpers("username")}
8371
onChange={onChangeTrimmed(form)}

0 commit comments

Comments
 (0)