From 9fd4641843097f15e01544a84693bde73694d97d Mon Sep 17 00:00:00 2001 From: taohebin Date: Thu, 12 Sep 2024 11:20:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0border=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E8=87=AA=E5=8A=A8=E5=8C=96=E6=B5=8B=E8=AF=95=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 7 +++++++ pages/CSS/border/border-update.test.js | 16 ++++++++++++++++ pages/CSS/border/border-update.uvue | 10 +++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 pages/CSS/border/border-update.test.js diff --git a/pages.json b/pages.json index d9297741..6670c519 100644 --- a/pages.json +++ b/pages.json @@ -1248,6 +1248,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 00000000..5ad6f275 --- /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 0356a382..108b618b 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 + })