diff --git a/pages.json b/pages.json index 8cb8c372aed7ea7745984c1112a0f1406c416071..6f2ad583135379142cad4f087ce5c8dcfcb91be4 100644 --- a/pages.json +++ b/pages.json @@ -1304,6 +1304,13 @@ "navigationBarTitleText": "border动态修改" } }, + { + "path": "pages/CSS/border/border-update", + "group": "2,13", + "style": { + "navigationBarTitleText": "border更新样式" + } + }, { "path": "pages/CSS/box-shadow/box-shadow", "group": "2,15", diff --git a/pages/CSS/border/border-update.test.js b/pages/CSS/border/border-update.test.js new file mode 100644 index 0000000000000000000000000000000000000000..5ad6f2750271cb1b8cd2890940089a8b634bc457 --- /dev/null +++ b/pages/CSS/border/border-update.test.js @@ -0,0 +1,16 @@ +describe('css-border-update', () => { + let page; + let res; + + beforeAll(async () => { + page = await program.reLaunch("/pages/CSS/border/border-update") + await page.waitFor(600); + }); + + it('Check Border Update', async () => { + await page.callMethod('jest_border_update') + await page.waitFor(100) + const image = await program.screenshot({fullPage: true}); + expect(image).toSaveImageSnapshot(); + }); +}); diff --git a/pages/CSS/border/border-update.uvue b/pages/CSS/border/border-update.uvue index 0356a38265ba4e59d713f7051d56f61954ddf5da..108b618be4307f916bce005d2ea49c4aaacdbd19 100644 --- a/pages/CSS/border/border-update.uvue +++ b/pages/CSS/border/border-update.uvue @@ -15,7 +15,15 @@ let borderStyle = ref("border:3px solid red;") const handleUpdate = () => { borderStyle.value = "border:7px solid red;" - } + } + + const jest_border_update = ()=>{ + handleUpdate() + } + + defineExpose({ + jest_border_update + })