diff --git a/pages/CSS/border/dynamic-border.test.js b/pages/CSS/border/dynamic-border.test.js new file mode 100644 index 0000000000000000000000000000000000000000..cc9dac65dec131ee4d7e52c06118291edb65e4b3 --- /dev/null +++ b/pages/CSS/border/dynamic-border.test.js @@ -0,0 +1,30 @@ +describe('css-dynamic-border', () => { + let page + beforeAll(async () => { + page = await program.reLaunch('/pages/CSS/border/dynamic-border') + await page.waitFor(600); + }) + + // 左上、右上设置圆角 + it('check_topleft_topright', async () => { + const image = await program.screenshot({fullPage: true}); + expect(image).toSaveImageSnapshot(); + }) + + // 取消圆角 + it('check_none', async () => { + await page.callMethod('changeIndex', 2) + page.waitFor(100) + const image = await program.screenshot({fullPage: true}); + expect(image).toSaveImageSnapshot(); + }) + + // 左下,右下设置圆角 + it('check_bottomleft_bottomright', async () => { + await page.callMethod('changeIndex', 10) + page.waitFor(100) + const image = await program.screenshot({fullPage: true}); + expect(image).toSaveImageSnapshot(); + }) + +}) diff --git a/pages/CSS/border/dynamic-border.uvue b/pages/CSS/border/dynamic-border.uvue index d4f135215cacf14b88010c019eb34c95ca9e9100..fcec25580ec28ea1bd6d0689ea3ea24af6ed3bb8 100644 --- a/pages/CSS/border/dynamic-border.uvue +++ b/pages/CSS/border/dynamic-border.uvue @@ -1,13 +1,13 @@