提交 d8df5881 编写于 作者: 辛宝Otto's avatar 辛宝Otto 🥊 提交者: DCloud-WZF

chore: 同步 alpha 调整测试代码,无功能变更

上级 be67dcf4
...@@ -64,7 +64,7 @@ describe('component-native-textarea', () => { ...@@ -64,7 +64,7 @@ describe('component-native-textarea', () => {
var x = inputmodeEnum[i] var x = inputmodeEnum[i]
console.log(x['value'], x['name']) console.log(x['value'], x['name'])
var selected = x['value'] - 1 var selected = x['value'] - 1
if(i == inputmodeEnum.length - 1){ if (i == inputmodeEnum.length - 1) {
selected = i selected = i
} }
await page.callMethod("radio_change_inputmode_enum", selected); await page.callMethod("radio_change_inputmode_enum", selected);
...@@ -74,15 +74,10 @@ describe('component-native-textarea', () => { ...@@ -74,15 +74,10 @@ describe('component-native-textarea', () => {
} }
}) })
it('both set modelValue and value', async () => {
const textarea2 = await page.$('#both-model-value');
expect(await textarea2.value()).toEqual("123")
})
it("maxlength", async () => { it("maxlength", async () => {
const input = await page.$('#textarea-instance-maxlength'); const input = await page.$('#textarea-instance-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({
...@@ -95,4 +90,9 @@ describe('component-native-textarea', () => { ...@@ -95,4 +90,9 @@ describe('component-native-textarea', () => {
}) })
}) })
it('both set modelValue and value', async () => {
const textarea2 = await page.$('#both-model-value');
expect(await textarea2.value()).toEqual("123")
})
}); });
...@@ -123,13 +123,6 @@ ...@@ -123,13 +123,6 @@
<textarea id="textarea-height-exception" class="textarea-instance" placeholder="底部textarea测试键盘遮挡" <textarea id="textarea-height-exception" class="textarea-instance" placeholder="底部textarea测试键盘遮挡"
placeholder-class="placeholder" placeholder-style="background-color:red" :cursor-spacing="300" /> placeholder-class="placeholder" placeholder-style="background-color:red" :cursor-spacing="300" />
</view> </view>
<view class="title-wrap">
<view>同时存在 v-model 和 value</view>
</view>
<view class="textarea-wrap">
<textarea id="both-model-value" class="textarea-instance" v-model='defaultModel' value='456'></textarea>
</view>
<view class="title-wrap"> <view class="title-wrap">
<view @click="setSelection(2, 5)">设置输入框聚焦时光标的起始位置和结束位置(点击生效)</view> <view @click="setSelection(2, 5)">设置输入框聚焦时光标的起始位置和结束位置(点击生效)</view>
</view> </view>
...@@ -146,6 +139,13 @@ ...@@ -146,6 +139,13 @@
<textarea class="textarea-instance" :hold-keyboard="hold_keyboard" /> <textarea class="textarea-instance" :hold-keyboard="hold_keyboard" />
</view> </view>
<view class="title-wrap">
<view>同时存在 v-model 和 value</view>
</view>
<view class="textarea-wrap">
<textarea id="both-model-value" class="textarea-instance" v-model='defaultModel' value='456'></textarea>
</view>
<view class="title-wrap"> <view class="title-wrap">
<view>设置adjust-position</view> <view>设置adjust-position</view>
<switch style="margin-left: 10px;" @change="changeAdjustPosition" :checked="adjust_position"></switch> <switch style="margin-left: 10px;" @change="changeAdjustPosition" :checked="adjust_position"></switch>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册