File tree 1 file changed +29
-0
lines changed
src/plugins/workspace/public
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,35 @@ describe('workspace utils: isAppAccessibleInWorkspace', () => {
167
167
)
168
168
) . toBe ( false ) ;
169
169
} ) ;
170
+
171
+ it ( 'An app is accessible within a workspace if its workspaceAvailability is insideWorkspace' , ( ) => {
172
+ expect (
173
+ isAppAccessibleInWorkspace (
174
+ {
175
+ id : 'home' ,
176
+ title : 'Any app' ,
177
+ mount : jest . fn ( ) ,
178
+ workspaceAvailability : WorkspaceAvailability . insideWorkspace ,
179
+ } ,
180
+ { id : 'workspace_id' , name : 'workspace name' , features : [ ] }
181
+ )
182
+ ) . toBe ( true ) ;
183
+ } ) ;
184
+
185
+ it ( 'An app is accessible within a workspace if its workspaceAvailability is inside and outsideWorkspace' , ( ) => {
186
+ expect (
187
+ isAppAccessibleInWorkspace (
188
+ {
189
+ id : 'home' ,
190
+ title : 'Any app' ,
191
+ mount : jest . fn ( ) ,
192
+ // eslint-disable-next-line no-bitwise
193
+ workspaceAvailability : WorkspaceAvailability . insideWorkspace | WorkspaceAvailability . outsideWorkspace ,
194
+ } ,
195
+ { id : 'workspace_id' , name : 'workspace name' , features : [ ] }
196
+ )
197
+ ) . toBe ( true ) ;
198
+ } ) ;
170
199
} ) ;
171
200
172
201
describe ( 'workspace utils: filterWorkspaceConfigurableApps' , ( ) => {
You can’t perform that action at this time.
0 commit comments