提交 4126a4e4 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

test: 调整ext-getAppAuthorizeSetting

上级 248b9868
......@@ -20,7 +20,16 @@ describe('ExtApi-GetAppAuthorizeSetting', () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(600);
res = await uni.getAppAuthorizeSetting();
});
});
it('Check albumAuthorized', async () => {
expect(commonSupportList).toContain(res.albumAuthorized)
});
it('Check bluetoothAuthorized', async () => {
expect(commonSupportList).toContain(res.bluetoothAuthorized)
});
it('Check cameraAuthorized', async () => {
expect(commonSupportList).toContain(res.cameraAuthorized)
});
......
......@@ -2,7 +2,6 @@
<page-head :title="title"></page-head>
<view class="uni-common-mt">
<view class="uni-list">
<!-- #ifdef APP-IOS -->
<view class="uni-list-cell">
<view class="uni-pd">
<view class="uni-label" style="width:180px;">是否授权使用相册</view>
......@@ -19,7 +18,6 @@
<input type="text" :disabled="true" placeholder="未获取" :value="bluetoothAuthorized" />
</view>
</view>
<!-- #endif -->
<view class="uni-list-cell">
<view class="uni-pd">
<view class="uni-label" style="width:180px;">是否授权使用摄像头</view>
......@@ -117,7 +115,9 @@
},
methods: {
getAppAuthorizeSetting: function () {
const res = uni.getAppAuthorizeSetting();
const res = uni.getAppAuthorizeSetting();
this.albumAuthorized = res.albumAuthorized;
this.bluetoothAuthorized = res.bluetoothAuthorized;
this.cameraAuthorized = res.cameraAuthorized;
this.locationAuthorized = res.locationAuthorized;
this.locationAccuracy = res.locationAccuracy ?? "unsupported";
......@@ -127,8 +127,6 @@
this.notificationAlertAuthorized = res.notificationAlertAuthorized;
this.notificationBadgeAuthorized = res.notificationBadgeAuthorized;
this.notificationSoundAuthorized = res.notificationSoundAuthorized;
this.bluetoothAuthorized = res.bluetoothAuthorized;
this.albumAuthorized = res.albumAuthorized;
// #endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册