提交 87913c27 编写于 作者: 雪洛's avatar 雪洛

feat: web端放开defineOptions、defineModel测试例

上级 90d6d773
......@@ -435,7 +435,6 @@
"navigationBarTitleText": "defineExpose"
}
},
// #ifdef APP
{
"path": "pages/composition-api/basic/define-model/define-model",
"style": {
......@@ -448,7 +447,6 @@
"navigationBarTitleText": "defineOptions"
}
},
// #endif
{
"path": "pages/composition-api/basic/define-slots/define-slots",
"style": {
......
const PAGE_PATH = '/pages/composition-api/basic/define-model/define-model'
describe('defineModel', () => {
if (process.env.uniTestPlatformInfo.startsWith('web')) {
// TODO: web 端暂不支持
it('web', async () => {
expect(1).toBe(1)
})
return
}
let page = null
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
......@@ -18,7 +11,7 @@ describe('defineModel', () => {
expect(await modelValueText.text()).toBe('modelValue in Foo: str')
const modelValueInput = await page.$('#model-value-input')
expect(await modelValueInput.property('value')).toBe('str')
expect(await modelValueInput.value()).toBe('str')
const msgText = await page.$('#msg-text')
expect(await msgText.text()).toBe('msg in Foo: msg')
......@@ -27,15 +20,15 @@ describe('defineModel', () => {
expect(await defaultNumText.text()).toBe('num: 10')
const msgInput = await page.$('#msg-input')
expect(await msgInput.property('value')).toBe('msg')
expect(await msgInput.value()).toBe('msg')
const updateValueBtn = await page.$('#update-value-btn')
await updateValueBtn.tap()
expect(await modelValueText.text()).toBe('modelValue in Foo: str1')
expect(await modelValueInput.property('value')).toBe('str1')
expect(await modelValueInput.value()).toBe('str1')
expect(await msgText.text()).toBe('msg in Foo: msg2')
expect(await msgInput.property('value')).toBe('msg2')
expect(await msgInput.value()).toBe('msg2')
})
})
\ No newline at end of file
const PAGE_PATH = '/pages/composition-api/basic/define-options/define-options'
describe('defineOptions', () => {
if (process.env.uniTestPlatformInfo.startsWith('web')) {
// TODO: web 端暂不支持
it('web', async () => {
expect(1).toBe(1)
})
return
}
let page = null
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
......
......@@ -59,13 +59,8 @@
},
{
name: 'defineOptions',
url: 'define-options',
// #ifdef APP
url: 'define-options',
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
{
name: 'defineSlots',
......@@ -74,13 +69,8 @@
},
{
name: 'defineModel',
url: 'define-model',
// #ifdef APP
url: 'define-model',
enable: true,
// #endif
// #ifdef WEB
enable: false,
// #endif
},
{
name: 'useSlots',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册