diff --git a/frontend/src/utils/lbPhoneAppBridge.test.ts b/frontend/src/utils/lbPhoneAppBridge.test.ts index aca7ba1..1a8c3fd 100644 --- a/frontend/src/utils/lbPhoneAppBridge.test.ts +++ b/frontend/src/utils/lbPhoneAppBridge.test.ts @@ -1,4 +1,5 @@ import { describe, expect, it } from 'vitest' +import { runInNewContext } from 'node:vm' import type { ExternalPhoneAppDefinition } from '@/types/apps' import { @@ -139,6 +140,79 @@ describe('LB Phone app bridge', () => { expect(() => new Function(runtime)).not.toThrow() }) + it('applies the LB iframe layout contract before revealing vendor apps', () => { + const document = createLbPhoneFrameDocument( + '
', + { + appName: 'radio-app', + localStorage: {}, + resourceName: 'lb-radioapp', + settings: createLbPhoneHostSettings({ + deviceName: 'Main phone', + isDarkMode: true, + language: 'en', + preferences: DEFAULT_PHONE_PREFERENCES, + securityEnabled: false, + }), + ui: 'https://cfx-nui-lb-radioapp/ui/dist/index.html', + }, + ) + const runtime = /