@@ -8,25 +8,14 @@ import { Provider } from 'react-redux'
8
8
import i18n from '../../../../app/i18n'
9
9
import clients from './clients'
10
10
import { I18nextProvider } from 'react-i18next'
11
- import authReducer from '../../../../app/redux/reducers/AuthReducer'
12
- import oidcReducer from '../../redux/reducers/OIDCReducer'
13
- import scopeReducer from '../../redux/reducers/ScopeReducer'
14
11
15
12
const permissions = [
16
13
'https://jans.io/oauth/config/openid/clients.readonly' ,
17
14
'https://jans.io/oauth/config/openid/clients.write' ,
18
15
'https://jans.io/oauth/config/openid/clients.delete' ,
19
16
]
20
17
const INIT_STATE = {
21
- isAuthenticated : false ,
22
- userinfo : null ,
23
- userinfo_jwt : null ,
24
- token : null ,
25
- issuer : null ,
26
18
permissions : permissions ,
27
- location : { } ,
28
- config : { } ,
29
- backendIsUp : true ,
30
19
}
31
20
32
21
const INIT_CLIENTS_STATE = {
@@ -57,8 +46,8 @@ const INIT_SCPOPES_STATE = {
57
46
const store = createStore (
58
47
combineReducers ( {
59
48
authReducer : ( state = INIT_STATE ) => state ,
60
- oidcReducer : ( state = INIT_SCPOPES_STATE ) => state ,
61
- scopeReducer,
49
+ oidcReducer : ( state = INIT_CLIENTS_STATE ) => state ,
50
+ scopeReducer : ( state = INIT_SCPOPES_STATE ) => state ,
62
51
noReducer : ( state = { } ) => state ,
63
52
} ) ,
64
53
)
@@ -70,17 +59,9 @@ const Wrapper = ({ children }) => (
70
59
</ Provider >
71
60
</ I18nextProvider >
72
61
)
73
- const emptyArray = [ ]
74
62
75
63
it ( 'Should show the sidebar properly' , ( ) => {
76
- render (
77
- < ClientListPage
78
- clients = { emptyArray }
79
- permissions = { permissions }
80
- scopes = { emptyArray }
81
- /> ,
82
- { wrapper : Wrapper } ,
83
- )
64
+ render ( < ClientListPage /> , { wrapper : Wrapper } )
84
65
screen . getByText ( / O I D C C l i e n t s / )
85
66
screen . getByTitle ( 'Add Client' )
86
67
screen . getByText ( / r e f r e s h / )
0 commit comments