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

test: 下载特殊字符的地址的文件

上级 94da1395
...@@ -21,7 +21,13 @@ describe('ExtApi-DownloadFile', () => { ...@@ -21,7 +21,13 @@ describe('ExtApi-DownloadFile', () => {
it('Check ', async () => { it('Check ', async () => {
expect(res).toBe(true); expect(res).toBe(true);
}); });
it('Check Special characters Url download file', async () => {
res = await page.callMethod('jest_special_characters_download')
await page.waitFor(2000);
res = await page.data('jest_result');
expect(res).toBe(true)
});
if (!process.env.uniTestPlatformInfo.startsWith('web')) { if (!process.env.uniTestPlatformInfo.startsWith('web')) {
it('Check uni.env', async () => { it('Check uni.env', async () => {
......
...@@ -149,6 +149,18 @@ ...@@ -149,6 +149,18 @@
} }
} as CommonOptions) } as CommonOptions)
// #endif // #endif
},
jest_special_characters_download(){
uni.downloadFile({
url: "https://web-ext-storage.dcloud.net.cn/hello-uni-app-x/1789834995055525889-你好%23你好.png",
success: (res: DownloadFileSuccess) => {
this.jest_result = true;
console.log("res :", res);
},
fail: () => {
this.jest_result = false;
}
});
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册