File tree Expand file tree Collapse file tree 3 files changed +23
-15
lines changed
site/src/pages/DeploySettingsPage/OAuth2AppsSettingsPage Expand file tree Collapse file tree 3 files changed +23
-15
lines changed Original file line number Diff line number Diff line change 1
- import { CreateOAuth2AppPageView } from "./CreateOAuth2AppPageView " ;
1
+ import type { StoryObj } from "@storybook/react " ;
2
2
import { mockApiError } from "testHelpers/entities" ;
3
+ import { CreateOAuth2AppPageView } from "./CreateOAuth2AppPageView" ;
3
4
4
5
export default {
5
6
title : "pages/DeploySettingsPage/CreateOAuth2AppPageView" ,
6
7
component : CreateOAuth2AppPageView ,
7
8
} ;
8
9
9
- export const Updating = {
10
+ type Story = StoryObj < typeof CreateOAuth2AppPageView > ;
11
+
12
+ export const Updating : Story = {
10
13
args : {
11
14
isUpdating : true ,
12
15
} ,
13
16
} ;
14
17
15
- export const Error = {
18
+ export const Error : Story = {
16
19
args : {
17
20
error : mockApiError ( {
18
21
message : "Validation failed" ,
@@ -34,7 +37,7 @@ export const Error = {
34
37
} ,
35
38
} ;
36
39
37
- export const Default = {
40
+ export const Default : Story = {
38
41
args : {
39
42
// Nothing.
40
43
} ,
Original file line number Diff line number Diff line change 1
- import { EditOAuth2AppPageView } from "./EditOAuth2AppPageView " ;
1
+ import type { StoryObj } from "@storybook/react " ;
2
2
import {
3
3
MockOAuth2Apps ,
4
4
MockOAuth2AppSecrets ,
5
5
mockApiError ,
6
6
} from "testHelpers/entities" ;
7
+ import { EditOAuth2AppPageView } from "./EditOAuth2AppPageView" ;
7
8
8
9
export default {
9
10
title : "pages/DeploySettingsPage/EditOAuth2AppPageView" ,
10
11
component : EditOAuth2AppPageView ,
11
12
} ;
12
13
13
- export const LoadingApp = {
14
+ type Story = StoryObj < typeof EditOAuth2AppPageView > ;
15
+
16
+ export const LoadingApp : Story = {
14
17
args : {
15
18
isLoadingApp : true ,
16
19
} ,
17
20
} ;
18
21
19
- export const LoadingSecrets = {
22
+ export const LoadingSecrets : Story = {
20
23
args : {
21
24
app : MockOAuth2Apps [ 0 ] ,
22
25
isLoadingSecrets : true ,
23
26
} ,
24
27
} ;
25
28
26
- export const Error = {
29
+ export const Error : Story = {
27
30
args : {
28
31
app : MockOAuth2Apps [ 0 ] ,
29
32
secrets : MockOAuth2AppSecrets ,
@@ -47,7 +50,7 @@ export const Error = {
47
50
} ,
48
51
} ;
49
52
50
- export const Default = {
53
+ export const Default : Story = {
51
54
args : {
52
55
app : MockOAuth2Apps [ 0 ] ,
53
56
secrets : MockOAuth2AppSecrets ,
Original file line number Diff line number Diff line change 1
- import OAuth2AppsSettingsPageView from "./OAuth2AppsSettingsPageView " ;
1
+ import type { StoryObj } from "@storybook/react " ;
2
2
import { MockOAuth2Apps } from "testHelpers/entities" ;
3
+ import OAuth2AppsSettingsPageView from "./OAuth2AppsSettingsPageView" ;
3
4
4
5
export default {
5
6
title : "pages/DeploySettingsPage/OAuth2AppsSettingsPageView" ,
6
7
component : OAuth2AppsSettingsPageView ,
7
8
} ;
8
9
9
- export const Loading = {
10
+ type Story = StoryObj < typeof OAuth2AppsSettingsPageView > ;
11
+
12
+ export const Loading : Story = {
10
13
args : {
11
14
isLoading : true ,
12
15
} ,
13
16
} ;
14
17
15
- export const Unentitled = {
18
+ export const Unentitled : Story = {
16
19
args : {
17
20
isLoading : false ,
18
21
apps : MockOAuth2Apps ,
19
22
} ,
20
23
} ;
21
24
22
- export const Entitled = {
25
+ export const Entitled : Story = {
23
26
args : {
24
27
isLoading : false ,
25
28
apps : MockOAuth2Apps ,
26
29
isEntitled : true ,
27
30
} ,
28
31
} ;
29
32
30
- export const Empty = {
33
+ export const Empty : Story = {
31
34
args : {
32
35
isLoading : false ,
33
- apps : null ,
34
36
} ,
35
37
} ;
You can’t perform that action at this time.
0 commit comments