@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'
22
33import { OptionsController } from '../../exports/index.js'
44import { ConstantsUtil } from '../../src/utils/ConstantsUtil.js'
5+ import { CoreHelperUtil } from '../../src/utils/CoreHelperUtil.js'
56import { OptionsUtil } from '../../src/utils/OptionsUtil.js'
67import type { RemoteFeatures , SocialProvider } from '../../src/utils/TypeUtil.js'
78
@@ -32,7 +33,8 @@ describe('OptionsController', () => {
3233 solana : 'eoa'
3334 } ,
3435 enableNetworkSwitch : true ,
35- experimental_preferUniversalLinks : false
36+ experimental_preferUniversalLinks : false ,
37+ enableMobileFullScreen : false
3638 } )
3739 } )
3840
@@ -107,4 +109,18 @@ describe('OptionsController', () => {
107109 OptionsController . setSIWX ( { signOutOnDisconnect : false } as any )
108110 expect ( OptionsController . state . siwx ! . signOutOnDisconnect ) . toEqual ( false )
109111 } )
112+
113+ it ( 'should set enableMobileFullScreen to false when not on mobile' , ( ) => {
114+ const spy = vi . spyOn ( CoreHelperUtil , 'isMobile' ) . mockReturnValue ( false )
115+ OptionsController . setEnableMobileFullScreen ( true )
116+ expect ( OptionsController . state . enableMobileFullScreen ) . toBe ( false )
117+ spy . mockRestore ( )
118+ } )
119+
120+ it ( 'should set enableMobileFullScreen to true when on mobile' , ( ) => {
121+ const spy = vi . spyOn ( CoreHelperUtil , 'isMobile' ) . mockReturnValue ( true )
122+ OptionsController . setEnableMobileFullScreen ( true )
123+ expect ( OptionsController . state . enableMobileFullScreen ) . toBe ( true )
124+ spy . mockRestore ( )
125+ } )
110126} )
0 commit comments