diff --git a/pages/component/input/input.test.js b/pages/component/input/input.test.js index d419ddccac41c2ee20159e84c0f624a22ca3d2cc..fe7fd79e05c4e00cfd8b05d4e204608141c47583 100644 --- a/pages/component/input/input.test.js +++ b/pages/component/input/input.test.js @@ -15,30 +15,30 @@ describe('component-native-input', () => { // expect(image).toMatchImageSnapshot() // }) // 测试焦点及键盘弹起 - // it('focus', async () => { - // const input = await page.$('.uni-input-focus'); - // expect(await input.property('focus')).toBe(true) - // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(true) - // await page.setData({ - // focus: false, - // }) - // expect(await input.property('focus')).toBe(false) - // await page.waitFor(1000) - // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(false) - // await page.setData({ - // focus: true, - // }) - // expect(await input.property('focus')).toBe(true) - // await page.waitFor(1000) - // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(true) - // await page.setData({ - // focus: false, - // }) - // expect(await input.property('focus')).toBe(false) - // await page.waitFor(1000) - // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(false) - // await page.waitFor(1000) - // }); + it('focus', async () => { + const input = await page.$('.uni-input-focus'); + expect(await input.property('focus')).toBe("true") + // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(true) + await page.setData({ + focus: false, + }) + expect(await input.property('focus')).toBe("false") + // await page.waitFor(1000) + // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(false) + // await page.setData({ + // focus: true, + // }) + // expect(await input.property('focus')).toBe(true) + // await page.waitFor(1000) + // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(true) + // await page.setData({ + // focus: false, + // }) + // expect(await input.property('focus')).toBe(false) + // await page.waitFor(1000) + // expect(await page.data("inputFocusKeyBoardChangeValue")).toBe(false) + // await page.waitFor(1000) + }); // 测试修改value属性 it("value", async () => { diff --git a/pages/component/text/text-props.uvue b/pages/component/text/text-props.uvue index 691cf291d3634370480bf2c19addefb5a08cc505..7ecd6abfecbc87a7a43554ee3d999a88754fba1f 100644 --- a/pages/component/text/text-props.uvue +++ b/pages/component/text/text-props.uvue @@ -21,6 +21,7 @@ \\n 换行 \\\n 换行 \n 换行 \\n 换行 \\\n 换行 \\\\n 换行 \\\\\n 换行 + HBuilderX,轻巧、极速,极客编辑器;\nuni-app x,终极跨平台方案; @@ -84,6 +85,17 @@ 二级节点大字体 + + + padding + + + hello uni-app x + hello uni-app x + hello uni-app x + hello uni-app x + + @@ -118,4 +130,11 @@ export default { line-height: 54rpx; text-align: center; } + +.text-padding { + margin-top: 5px; + padding: 20px; + border: 1px solid red; + text-align: center; +}