Skip to content

Commit 94ea880

Browse files
committed
feat: initial stories
1 parent 1cc3053 commit 94ea880

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { Meta, StoryObj } from "@storybook/react";
2+
import { MockOIDCConfig } from "testHelpers/entities";
3+
import { IdpSyncPageView } from "./IdpSyncPageView";
4+
5+
const meta: Meta<typeof IdpSyncPageView> = {
6+
title: "pages/OrganizationIdpSyncPage",
7+
component: IdpSyncPageView,
8+
};
9+
10+
export default meta;
11+
type Story = StoryObj<typeof IdpSyncPageView>;
12+
13+
export const Empty: Story = {
14+
args: { oidcConfig: undefined },
15+
};
16+
17+
export const Default: Story = {
18+
args: { oidcConfig: MockOIDCConfig },
19+
};

site/src/testHelpers/entities.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,38 @@ export const MockAssignableSiteRoles = [
426426
assignableRole(MockAuditorRole, true),
427427
];
428428

429+
export const MockOIDCConfig: TypesGen.OIDCConfig = {
430+
allow_signups: true,
431+
client_id: "test",
432+
client_secret: "test",
433+
client_key_file: "test",
434+
client_cert_file: "test",
435+
email_domain: [],
436+
issuer_url: "test",
437+
scopes: [],
438+
ignore_email_verified: true,
439+
username_field: "",
440+
name_field: "",
441+
email_field: "",
442+
auth_url_params: {},
443+
ignore_user_info: true,
444+
organization_field: "",
445+
organization_mapping: {},
446+
organization_assign_default: true,
447+
group_auto_create: false,
448+
group_regex_filter: "^Coder-.*$",
449+
group_allow_list: [],
450+
groups_field: "groups",
451+
group_mapping: { group1: "developers", group2: "admin", group3: "auditors" },
452+
user_role_field: "roles",
453+
user_role_mapping: { role1: ["role1", "role2"] },
454+
user_roles_default: [],
455+
sign_in_text: "",
456+
icon_url: "",
457+
signups_disabled_text: "string",
458+
skip_issuer_checks: true,
459+
};
460+
429461
export const MockMemberPermissions = {
430462
viewAuditLog: false,
431463
};

0 commit comments

Comments
 (0)