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

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

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