diff --git a/pages/CSS/transform/rotate.test.js b/pages/CSS/transform/rotate.test.js new file mode 100644 index 0000000000000000000000000000000000000000..7a1a596039d244319f8d897556a002ab29fee6d7 --- /dev/null +++ b/pages/CSS/transform/rotate.test.js @@ -0,0 +1,16 @@ +// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ + +describe('/pages/CSS/transform/rotate.uvue', () => { + let page; + beforeAll(async () => { + page = await program.reLaunch('/pages/CSS/transform/rotate') + await page.waitFor(1000); + }); + + it("snap rotate", async () => { + const image = await program.screenshot({ + fullPage: true + }) + expect(image).toSaveImageSnapshot() + }) +}); diff --git a/pages/CSS/transform/scale.test.js b/pages/CSS/transform/scale.test.js new file mode 100644 index 0000000000000000000000000000000000000000..b3de428e5a42c2b58efd1fde6652805ff8e8271c --- /dev/null +++ b/pages/CSS/transform/scale.test.js @@ -0,0 +1,16 @@ +// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ + +describe('/pages/CSS/transform/scale.uvue', () => { + let page; + beforeAll(async () => { + page = await program.reLaunch('/pages/CSS/transform/scale') + await page.waitFor(1000); + }); + + it("snap scale", async () => { + const image = await program.screenshot({ + fullPage: true + }) + expect(image).toSaveImageSnapshot() + }) +}); diff --git a/pages/CSS/transform/translate.test.js b/pages/CSS/transform/translate.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a9d2ffd928a3830422f91ef082ef0f190a1ad210 --- /dev/null +++ b/pages/CSS/transform/translate.test.js @@ -0,0 +1,16 @@ +// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ + +describe('/pages/CSS/transform/translate.uvue', () => { + let page; + beforeAll(async () => { + page = await program.reLaunch('/pages/CSS/transform/translate') + await page.waitFor(1000); + }); + + it("snap translate", async () => { + const image = await program.screenshot({ + fullPage: true + }) + expect(image).toSaveImageSnapshot() + }) +}); diff --git a/pages/CSS/transition/transition.test.js b/pages/CSS/transition/transition.test.js new file mode 100644 index 0000000000000000000000000000000000000000..65ca9ae8bae55f621611fb708df20a6f18ccbff8 --- /dev/null +++ b/pages/CSS/transition/transition.test.js @@ -0,0 +1,31 @@ +// uni-app自动化测试教程: https://uniapp.dcloud.net.cn/worktile/auto/hbuilderx-extension/ + +describe('/pages/CSS/transition/transition.uvue', () => { + let page; + beforeAll(async () => { + page = await program.reLaunch('/pages/CSS/transition/transition') + await page.waitFor(2000); + }); + + it("snap transition finish", async () => { + await page.callMethod('changeWidthOrHeight') + await page.callMethod('changeWidthProgress') + await page.callMethod('changeMargin') + await page.callMethod('changePadding') + await page.callMethod('changeBackground') + await page.callMethod('changeBackground2') + await page.callMethod('changeStyleOpacity') + await page.callMethod('propertyChangeBackground') + await page.callMethod('changeTransform') + await page.callMethod('changeTransformTranslate') + await page.callMethod('changeTransformWithWidth') + await page.callMethod('changeTransformWithOrigin') + await page.callMethod('changeBorder') + await page.callMethod('changestylePosition') + await page.waitFor(3000) + const image = await program.screenshot({ + fullPage: true + }) + expect(image).toSaveImageSnapshot() + }) +}); diff --git a/pages/pages.test.js b/pages/pages.test.js index 289793c1ac21f1c053e16ff409caccc6103fbcf2..5e8d19db689a420a59e8e7da43470bd4e1ce0c9d 100755 --- a/pages/pages.test.js +++ b/pages/pages.test.js @@ -91,7 +91,7 @@ const pages = [ '/pages/CSS/transform/rotate', '/pages/CSS/transform/scale', '/pages/CSS/transform/translate', - // '/pages/CSS/transition/transition', + '/pages/CSS/transition/transition', '/pages/CSS/pointer-events/pointer-events', // tabBar //改动频繁,不再测试