Skip to content

Commit 492ca5f

Browse files
committed
feat: initial stories
1 parent a75ad85 commit 492ca5f

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
@@ -451,6 +451,38 @@ export const MockAssignableSiteRoles = [
451451
assignableRole(MockAuditorRole, true),
452452
];
453453

454+
export const MockOIDCConfig: TypesGen.OIDCConfig = {
455+
allow_signups: true,
456+
client_id: "test",
457+
client_secret: "test",
458+
client_key_file: "test",
459+
client_cert_file: "test",
460+
email_domain: [],
461+
issuer_url: "test",
462+
scopes: [],
463+
ignore_email_verified: true,
464+
username_field: "",
465+
name_field: "",
466+
email_field: "",
467+
auth_url_params: {},
468+
ignore_user_info: true,
469+
organization_field: "",
470+
organization_mapping: {},
471+
organization_assign_default: true,
472+
group_auto_create: false,
473+
group_regex_filter: "^Coder-.*$",
474+
group_allow_list: [],
475+
groups_field: "groups",
476+
group_mapping: { group1: "developers", group2: "admin", group3: "auditors" },
477+
user_role_field: "roles",
478+
user_role_mapping: { role1: ["role1", "role2"] },
479+
user_roles_default: [],
480+
sign_in_text: "",
481+
icon_url: "",
482+
signups_disabled_text: "string",
483+
skip_issuer_checks: true,
484+
};
485+
454486
export const MockMemberPermissions = {
455487
viewAuditLog: false,
456488
};

0 commit comments

Comments
 (0)