提交 3216a759 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

fix: 修改input maxlength自动化测试例

上级 f6d86f09
......@@ -147,19 +147,19 @@ describe('component-native-input', () => {
expect(await (await page.$('#uni-input-cursor-color')).attribute("cursor-color")).toBe("red")
})
it("maxlength default", async () => {
const input = await page.$('#uni-input-disable');
it("maxlength", async () => {
const input = await page.$('#uni-input-maxlength');
let str = "";
for(let i = 0;i < 200;i++){
str += `${i}`
}
await page.setData({
disableValue: str
inputMaxLengthValue: str
})
let length = (await input.attribute("value")).length
expect(length).toBe(140)
expect(length).toBe(10)
await page.setData({
disableValue: ""
inputMaxLengthValue: ""
})
})
......
......@@ -59,7 +59,7 @@
<text class="uni-title-text">设置禁用输入框</text>
</view>
<view class="input-wrapper">
<input id="uni-input-disable" class="uni-input" :disabled="true" :value="disableValue"/>
<input id="uni-input-disable" class="uni-input" :disabled="true"/>
</view>
</view>
......@@ -266,7 +266,6 @@
inputPasswordValue: "",
inputFocusKeyBoardChangeValue: true,
holdKeyboard: false,
disableValue: ""
}
},
methods: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册