From fe2bcdb64f125f85103f1d441aa14d8fb792e31f Mon Sep 17 00:00:00 2001
From: zhenyuWang <13641039885@163.com>
Date: Fri, 25 Aug 2023 20:39:25 +0800
Subject: [PATCH] test(component): general attribute and event
---
pages/component/view/general-attribute.test.js | 3 ++-
pages/component/view/general-attribute.uvue | 17 +++++++++++++++--
pages/component/view/general-event.test.js | 5 ++---
pages/component/view/general-event.uvue | 12 ++++++------
4 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/pages/component/view/general-attribute.test.js b/pages/component/view/general-attribute.test.js
index 5534c244..a413554a 100644
--- a/pages/component/view/general-attribute.test.js
+++ b/pages/component/view/general-attribute.test.js
@@ -14,6 +14,7 @@ describe('general attribute', () => {
it('validateGeneralAttributes', async () => {
const button = await page.$('.btn')
await button.tap()
- expect(await button.text()).toBe('基础属性验证成功')
+ const btnInner = await page.$('.btn-inner')
+ expect(await btnInner.text()).toBe('基础属性验证成功')
})
})
diff --git a/pages/component/view/general-attribute.uvue b/pages/component/view/general-attribute.uvue
index 7b5c524d..136edb75 100644
--- a/pages/component/view/general-attribute.uvue
+++ b/pages/component/view/general-attribute.uvue
@@ -6,7 +6,9 @@
-
+
+ {{ validateGeneralAttrText }}
+
按下 50 ms 后背景变红
抬起 400 ms 后背景恢复
@@ -72,6 +74,17 @@ export default {