提交 d9c7a1c5 编写于 作者: H hdx

cavnas: 优化结构减少一些重复的逻辑

上级 75386779
......@@ -25,22 +25,21 @@ describe('Canvas.uvue', () => {
})
it("测试异步创建canvas上下文", async () => {
await page.callMethod('useAsync');
const element = await page.$('#testCanvasContext')
expect(await element.text()).toBe('true')
})
it("测试同步创建canvas上下文", async () => {
await page.callMethod('useAsync');
const element = await page.$('#testCanvasContext')
// const element = await page.$('#testCanvasContext')
expect(await element.text()).toBe('true')
})
// it("测试同步创建canvas上下文", async () => {
// await page.callMethod('useAsync');
// const element = await page.$('#testCanvasContext')
// expect(await element.text()).toBe('true')
// })
it('测试 canvasToDataURL', async () => {
await page.callMethod('canvasToDataURL');
const element = await page.$('#testToDataURLResult')
expect(await element.text()).toBe('true')
})
it('测试 createImage', async () => {
await page.callMethod('drawImageAPI');
await page.callMethod('onCreateImage');
await page.waitFor(500) // 加载图片
const element = await page.$('#testCreateImage')
expect(await element.text()).toBe('true')
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册