8000 :) · coder/coder@81535bc · GitHub
[go: up one dir, main page]

Skip to content

Commit 81535bc

Browse files
committed
:)
1 parent 1702c62 commit 81535bc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

site/e2e/helpers.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
D46F
@@ -267,9 +267,8 @@ export const createTemplate = async (
267267
);
268268
}
269269

270-
// picker is disabled if only one org is available
270+
// The organization picker will be disabled if there is only one option.
271271
const pickerIsDisabled = await orgPicker.isDisabled();
272-
273272
if (!pickerIsDisabled) {
274273
await orgPicker.click();
275274
await page.getByText(orgName, { exact: true }).click();
@@ -1094,8 +1093,12 @@ export async function createUser(
10941093
const orgPicker = page.getByLabel("Organization *");
10951094
const organizationsEnabled = await orgPicker.isVisible();
10961095
if (organizationsEnabled) {
1097-
await orgPicker.click();
1098-
await page.getByText(orgName, { exact: true }).click();
1096+
// The organization picker will be disabled if there is only one option.
1097+
const pickerIsDisabled = await orgPicker.isDisabled();
1098+
if (!pickerIsDisabled) {
1099+
await orgPicker.click();
1100+
await page.getByText(orgName, { exact: true }).click();
1101+
}
10991102
}
11001103

11011104
await page.getByLabel("Login Type").click();

0 commit comments

Comments
 (0)
0