feat: 完善淘宝小程序拍照、报告与登录流程
接入本地实时识别和自动三连拍,调整报告裁切、商品跳转、分享标题及居中页眉;完善游客会话、后台渠道隔离、部署脚本与回归测试。
This commit is contained in:
@@ -67,3 +67,14 @@ test('cameraSupported requires the native camera API and canIUse', () => {
|
||||
assert.equal(setup({ canIUse: () => true, createCameraContext() {} }).cameraSupported(), true);
|
||||
assert.equal(setup({ canIUse: (api) => api !== 'camera', createCameraContext() {} }).cameraSupported(), false);
|
||||
});
|
||||
|
||||
test('location and recording scopes never reach platform settings or authorization', async () => {
|
||||
let calls = 0;
|
||||
const permissions = setup({ getSetting() { calls++; }, authorize() { calls++; } });
|
||||
for (const scope of ['scope.location', 'scope.userLocation', 'scope.record', 'scope.audioRecord', 'location', 'record']) {
|
||||
await assert.rejects(permissions.ensure(scope), /不需要此项授权/);
|
||||
}
|
||||
assert.equal(calls, 0);
|
||||
const app = JSON.parse(fs.readFileSync(path.join(__dirname, '../app.json'), 'utf8'));
|
||||
assert.deepEqual(Object.keys(app.permission), ['scope.camera']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user