提交 1f59f1b3 编写于 作者: DCloud-yinjiacheng's avatar DCloud-yinjiacheng

更新text示例和自动化测试用例

上级 9394e36f
const PAGE_PATH = '/pages/component/text/text-props'
describe('text-props', () => {
let page
beforeAll(async () => {
const page = await program.navigateTo(PAGE_PATH)
page = await program.navigateTo(PAGE_PATH)
await page.waitFor(1000)
})
it('screenshot', async () => {
const image = await program.screenshot({ fullPage: true })
expect(image).toMatchImageSnapshot()
})
it('empty text', async () => {
const element = await page.$('#empty-text')
if (element != null) {
const { width, height } = await element.size()
expect(width).toBe(0)
expect(height).toBe(0)
}
})
})
......@@ -27,8 +27,8 @@
<view class="uni-title">
<text class="uni-subtitle-text">截断(clip)</text>
</view>
<view class="text-box" style="height: 100px">
<text class="uni-flex-item" style="text-overflow: clip">{{
<view class="text-box">
<text class="uni-flex-item" style="text-overflow: clip; white-space: nowrap;">{{
multiLineText
}}</text>
</view>
......@@ -36,8 +36,8 @@
<view class="uni-title">
<text class="uni-subtitle-text">截断(ellipsis)</text>
</view>
<view class="text-box" style="height: 100px">
<text class="uni-flex-item" style="text-overflow: ellipsis">{{
<view class="text-box">
<text class="uni-flex-item" style="text-overflow: ellipsis; white-space: nowrap;">{{
multiLineText
}}</text>
</view>
......@@ -96,6 +96,10 @@
<text class="text-padding" style="width: 200px;height: 100px;">hello uni-app x</text>
</view>
<view class="uni-row">
<text id="empty-text"></text>
</view>
</view>
</scroll-view>
</template>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册