b921c46afe
移动壳 safeArea 单测补齐四边固定覆盖断言 移动壳配置门禁反查安全区测试边界 宿主壳方案和共享决策同步安全区验收口径
25 lines
603 B
TypeScript
25 lines
603 B
TypeScript
import { describe, expect, test } from 'vitest';
|
|
|
|
import { MOBILE_SHELL_SAFE_AREA_EDGES } from './safeArea';
|
|
|
|
describe('mobile shell safe area', () => {
|
|
test('protects the WebView from every device edge', () => {
|
|
expect(MOBILE_SHELL_SAFE_AREA_EDGES).toEqual([
|
|
'top',
|
|
'right',
|
|
'bottom',
|
|
'left',
|
|
]);
|
|
});
|
|
|
|
test('keeps the edge list fixed for shell layout usage', () => {
|
|
expect(MOBILE_SHELL_SAFE_AREA_EDGES).toHaveLength(4);
|
|
expect([...MOBILE_SHELL_SAFE_AREA_EDGES].sort()).toEqual([
|
|
'bottom',
|
|
'left',
|
|
'right',
|
|
'top',
|
|
]);
|
|
});
|
|
});
|