1- import AppsList , { PINNED_APPS_LIST_TEST_ID , ALL_APPS_LIST_TEST_ID } from './AppsList'
2- import { render , screen , fireEvent , within , act , waitFor } from 'src/utils/test-utils'
1+ import { SafeAppAccessPolicyTypes } from '@gnosis.pm/safe-react-gateway-sdk'
32
3+ import { render , screen , fireEvent , within , act , waitFor } from 'src/utils/test-utils'
44import * as appUtils from 'src/routes/safe/components/Apps/utils'
55import { FETCH_STATUS } from 'src/utils/requests'
66import { loadFromStorage , saveToStorage } from 'src/utils/storage'
77import * as googleAnalytics from 'src/utils/googleAnalytics'
88
9+ import AppsList , { PINNED_APPS_LIST_TEST_ID , ALL_APPS_LIST_TEST_ID } from './AppsList'
10+
911jest . mock ( 'src/routes/routes' , ( ) => {
1012 const original = jest . requireActual ( 'src/routes/routes' )
1113 return {
@@ -30,6 +32,9 @@ jest.mock('@gnosis.pm/safe-react-gateway-sdk', () => ({
3032 fetchStatus : 'SUCCESS' ,
3133 chainIds : [ '1' , '4' ] ,
3234 provider : null ,
35+ accessControl : {
36+ type : 'NO_RESTRICTIONS' ,
37+ } ,
3338 } ,
3439 {
3540 id : 3 ,
@@ -41,6 +46,10 @@ jest.mock('@gnosis.pm/safe-react-gateway-sdk', () => ({
4146 fetchStatus : 'SUCCESS' ,
4247 chainIds : [ '1' , '4' ] ,
4348 provider : null ,
49+ accessControl : {
50+ type : 'DOMAIN_ALLOWLIST' ,
51+ value : [ 'https://gnosis-safe.io' ] ,
52+ } ,
4453 } ,
4554 {
4655 id : 14 ,
@@ -51,6 +60,9 @@ jest.mock('@gnosis.pm/safe-react-gateway-sdk', () => ({
5160 fetchStatus : 'SUCCESS' ,
5261 chainIds : [ '1' , '4' ] ,
5362 provider : null ,
63+ accessControl : {
64+ type : 'NO_RESTRICTIONS' ,
65+ } ,
5466 } ,
5567 {
5668 id : 24 ,
@@ -61,6 +73,10 @@ jest.mock('@gnosis.pm/safe-react-gateway-sdk', () => ({
6173 fetchStatus : 'SUCCESS' ,
6274 chainIds : [ '1' , '4' , '56' , '100' , '137' , '246' , '73799' ] ,
6375 provider : null ,
76+ accessControl : {
77+ type : 'DOMAIN_ALLOWLIST' ,
78+ value : [ 'https://gnosis-safe.io' ] ,
79+ } ,
6480 } ,
6581 ] ) ,
6682} ) )
@@ -92,6 +108,9 @@ beforeEach(() => {
92108 chainIds : [ '4' ] ,
93109 provider : undefined ,
94110 fetchStatus : FETCH_STATUS . SUCCESS ,
111+ accessControl : {
112+ type : SafeAppAccessPolicyTypes . NoRestrictions ,
113+ } ,
95114 } ) ,
96115 )
97116} )
0 commit comments