提交 b5649d94 编写于 作者: M mahaifeng

[provider]补充provider测试用例

上级 1161b07a
......@@ -21,5 +21,12 @@ describe("provider", () => {
expect(providerIds[1]).toEqual('alipay')
expect(providerIds[2]).toEqual('system')
expect(providerIds[3]).toEqual('tencent')
let providerObjects = await page.data('providerObjects')
expect(providerObjects[0].description).toEqual('微信支付')
expect(providerObjects[1].description).toEqual('支付宝')
expect(providerObjects[2].description).toEqual('系统定位')
expect(providerObjects[3].description).toEqual('腾讯定位')
expect(providerObjects.length).toEqual(4)
});
});
......@@ -47,7 +47,8 @@
{ service: "payment", name: "支付", provider: [], providerObj: [], providerObjMap: [] },
{ service: "location", name: "定位", provider: [], providerObj: [], providerObjMap: [] }
] as ProviderItem[],
providerIds: [] as string[]
providerIds: [] as string[],
providerObjects : [] as UniProvider[],
}
},
methods: {
......@@ -73,8 +74,10 @@
});
if (item != null && provider != null) {
item.provider = provider
item.providerObj = uniProvider
item.providerObj.forEach((obj) => {
this.providerObjects.push(obj)
// #ifdef APP-ANDROID
if (obj instanceof UniPaymentWxpayProvider) {//判断微信是否安装
var isWeChatInstalled = (obj as UniPaymentWxpayProvider).isWeChatInstalled
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册