diff --git a/pages/component/rich-text/rich-text.test.js b/pages/component/rich-text/rich-text.test.js new file mode 100644 index 0000000000000000000000000000000000000000..a51444168f221dee36634139f740f9ee911e28c7 --- /dev/null +++ b/pages/component/rich-text/rich-text.test.js @@ -0,0 +1,32 @@ +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')) { + it('other platform', () => { + expect(1).toBe(1) + }) + return + } + + let page + beforeAll(async () => { + page = await program.reLaunch(PAGE_PATH) + await page.waitFor(1000); + }) + + + it('richt-text-height', async () => { + let beforeValue = await page.data('richTextHeight') + await page.callMethod('changeText') + await page.waitFor(500) + await page.callMethod('changeText') + await page.waitFor(500) + let afterValue = await page.data('richTextHeight') + console.log('beforeValue:', beforeValue) + console.log('afterValue:', afterValue) + expect(beforeValue).toBe(afterValue) + }) + +}) diff --git a/pages/component/rich-text/rich-text.uvue b/pages/component/rich-text/rich-text.uvue index 6155e08073ddb57fda63c87b0a8451ad5857017d..0744c1b5d76d1c0b1767f09b43809b42165a81a1 100644 --- a/pages/component/rich-text/rich-text.uvue +++ b/pages/component/rich-text/rich-text.uvue @@ -16,14 +16,48 @@ selectable - +