提交 1e3e1b4f 编写于 作者: 雪洛's avatar 雪洛

test: 使用property方法替换attribute方法获取input value

上级 1647827a
...@@ -156,7 +156,7 @@ describe('component-native-input', () => { ...@@ -156,7 +156,7 @@ describe('component-native-input', () => {
await page.setData({ await page.setData({
inputMaxLengthValue: str inputMaxLengthValue: str
}) })
let length = (await input.attribute("value")).length let length = (await input.property("value")).length
expect(length).toBe(10) expect(length).toBe(10)
await page.setData({ await page.setData({
inputMaxLengthValue: "" inputMaxLengthValue: ""
...@@ -165,7 +165,7 @@ describe('component-native-input', () => { ...@@ -165,7 +165,7 @@ describe('component-native-input', () => {
it("password and value order", async () => { it("password and value order", async () => {
const input = await page.$('#uni-input-password'); const input = await page.$('#uni-input-password');
let length = (await input.attribute("value")).length let length = (await input.property("value")).length
expect(length).toBe(6) expect(length).toBe(6)
await page.setData({ await page.setData({
inputPasswordValue: "" inputPasswordValue: ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册