Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
oidc-auth-url-params
  • Loading branch information
mtojek committed Apr 16, 2024
commit ec060bb5a391d0cbdccd71a1055aaac47f83342a
12 changes: 11 additions & 1 deletion site/e2e/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export async function verifyConfigFlag(
} else if (typeof value === "string") {
type = "option-value-string";
} else if (typeof value === "object") {
type = "object-array";
type = "option-array";
} else {
type = "option-value-json";
}
Expand All @@ -88,5 +88,15 @@ export async function verifyConfigFlag(
const configOption = page.locator(
`div.options-table .option-${flag} .${type}`,
);

if (type === "option-array") {
Object.entries(value)
.sort((a, b) => a[0].localeCompare(b[0]))
.map(async ([item]) => {
await expect(configOption.locator(`.option-array-item-${item}.option-enabled`)).toHaveText(item);
});
return;
}

await expect(configOption).toHaveText(String(value));
}
2 changes: 1 addition & 1 deletion site/e2e/tests/deployment/userAuth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test("login with OIDC", async ({ page }) => {
const flags = [
"oidc-group-auto-create",
"oidc-allow-signups",
//"oidc-auth-url-params",
"oidc-auth-url-params",
"oidc-client-id",
//"oidc-email-domain",
"oidc-email-field",
Expand Down