Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 052f9c1

Browse files
committed
fix: update stories
1 parent b285e11 commit 052f9c1

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

site/src/pages/ManagementSettingsPage/IdpSyncPage/IdpSyncPageView.stories.tsx

+23-11
Original file line numberDiff line numberDiff line change
@@ -23,42 +23,54 @@ for (const group of [MockGroup, MockGroup2]) {
2323
groupsMap.set(group.id, group.display_name || group.name);
2424
}
2525

26-
export const NotEnabled: Story = {
26+
export const Empty: Story = {
2727
args: {
28-
groupSyncSettings: undefined,
29-
roleSyncSettings: undefined,
28+
groupSyncSettings: {
29+
field: "",
30+
mapping: {},
31+
regex_filter: "",
32+
auto_create_missing_groups: false,
33+
},
34+
roleSyncSettings: {
35+
field: "",
36+
mapping: {},
37+
},
38+
groups: [],
3039
groupsMap: undefined,
3140
organization: MockOrganization,
32-
isIdpSyncEnabled: false,
41+
error: undefined,
3342
},
3443
};
3544

36-
export const Empty: Story = {
45+
export const HasError: Story = {
3746
args: {
38-
groupSyncSettings: undefined,
39-
roleSyncSettings: undefined,
40-
groupsMap: undefined,
47+
groupSyncSettings: MockGroupSyncSettings,
48+
roleSyncSettings: MockRoleSyncSettings,
49+
groups: [MockGroup, MockGroup2],
50+
groupsMap,
4151
organization: MockOrganization,
42-
isIdpSyncEnabled: true,
52+
error: "This is a test error",
4353
},
4454
};
4555

4656
export const Default: Story = {
4757
args: {
4858
groupSyncSettings: MockGroupSyncSettings,
4959
roleSyncSettings: MockRoleSyncSettings,
60+
groups: [MockGroup, MockGroup2],
5061
groupsMap,
5162
organization: MockOrganization,
52-
isIdpSyncEnabled: true,
63+
error: undefined,
5364
},
5465
};
5566

5667
export const MissingGroups: Story = {
5768
args: {
5869
groupSyncSettings: MockGroupSyncSettings2,
5970
roleSyncSettings: MockRoleSyncSettings,
71+
groups: [MockGroup, MockGroup2],
6072
groupsMap,
6173
organization: MockOrganization,
62-
isIdpSyncEnabled: true,
74+
error: undefined,
6375
},
6476
};

0 commit comments

Comments
 (0)