diff --git a/pages/component/rich-text/rich-text.test.js b/pages/component/rich-text/rich-text.test.js
index 076d3221093fdb2e348b05e3a750f23a75d5259d..0aac79dfcc68d77ac0285cb0eb14f3884139fa5e 100644
--- a/pages/component/rich-text/rich-text.test.js
+++ b/pages/component/rich-text/rich-text.test.js
@@ -3,7 +3,7 @@ const PAGE_PATH = '/pages/component/rich-text/rich-text'
describe('rich-text-test', () => {
// 先屏蔽 android 及 web 平台
- if (process.env.uniTestPlatformInfo.startsWith('android') || process.env.uniTestPlatformInfo.startsWith('web')) {
+ if (process.env.uniTestPlatformInfo.startsWith('web')) {
it('other platform', () => {
expect(1).toBe(1)
})
@@ -32,5 +32,24 @@ describe('rich-text-test', () => {
console.log('afterValue:', afterValue)
expect(beforeValue).toBe(afterValue)
})
+
+ it('test selectable itemclick', async () => {
+ await page.setData({
+ autoTest: true,
+ isItemClickTrigger: false
+ });
+ await page.waitFor(1000);
+ const info = await page.callMethod('getWindowInfoForTest');
+ const rect = await page.callMethod('getBoundingClientRectForTest');
+ await program.tap({
+ x: (rect.right - rect.left) / 2,
+ y: info.statusBarHeight + 44 + (rect.bottom - rect.top) / 2
+ });
+ await page.waitFor(1000);
+ expect(await page.data('isItemClickTrigger')).toBe(true);
+ await page.setData({
+ autoTest: false
+ });
+ });
})
diff --git a/pages/component/rich-text/rich-text.uvue b/pages/component/rich-text/rich-text.uvue
index 3b2b5d3f59f67704d2e2cec159533634aa579db6..ba7d18af934201989b5b27848c0cabc10120076c 100644
--- a/pages/component/rich-text/rich-text.uvue
+++ b/pages/component/rich-text/rich-text.uvue
@@ -21,7 +21,8 @@
:nodes="text">
-
+
+