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

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

上级 569cd655
......@@ -22,6 +22,12 @@ describe('ExtApi-DownloadFile', () => {
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')) {
it('Check uni.env', async () => {
......
......@@ -149,6 +149,18 @@
}
} as CommonOptions)
// #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.
先完成此消息的编辑!
想要评论请 注册