diff --git a/pages/composition-api/basic/use-attrs/Foo.uvue b/pages/composition-api/basic/use-attrs/Foo.uvue new file mode 100644 index 0000000000000000000000000000000000000000..657c3fa5202700d877aee586cc73331c44896e8c --- /dev/null +++ b/pages/composition-api/basic/use-attrs/Foo.uvue @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git a/pages/composition-api/basic/use-attrs/use-attrs.test.js b/pages/composition-api/basic/use-attrs/use-attrs.test.js new file mode 100644 index 0000000000000000000000000000000000000000..4b2575e0bac1ae148c1e74970614f8d790c2aa1c --- /dev/null +++ b/pages/composition-api/basic/use-attrs/use-attrs.test.js @@ -0,0 +1,22 @@ +const PAGE_PATH = '/pages/composition-api/basic/use-attrs/use-attrs' + +describe('useAttrs', () => { + if (process.env.uniTestPlatformInfo.startsWith('android')) { + let page = null + beforeAll(async () => { + page = await program.reLaunch(PAGE_PATH) + await page.waitFor('view') + }) + it('basic', async () => { + const attrsClass = await page.$('#attrs-class') + expect(await attrsClass.text()).toBe('attrs.class: foo') + + const attrsMsg = await page.$('#attrs-msg') + expect(await attrsMsg.text()).toBe('attrs.msg: msg') + }) + } else { + it('other platform', () => { + expect(1).toBe(1) + }) + } +}) \ No newline at end of file diff --git a/pages/composition-api/basic/use-attrs/use-attrs.uvue b/pages/composition-api/basic/use-attrs/use-attrs.uvue index 69a33ac8d5cdd6e2b1774527e58ba3821d40fda2..6ce3eada60c41aee1607474eba85c53e2f30affd 100644 --- a/pages/composition-api/basic/use-attrs/use-attrs.uvue +++ b/pages/composition-api/basic/use-attrs/use-attrs.uvue @@ -1,5 +1,10 @@ - + \ No newline at end of file diff --git a/pages/tab-bar/composition-api.uvue b/pages/tab-bar/composition-api.uvue index 4e9f5ad400be742d993f825e168f4c892df9d617..91019ee93b9d2afb24fa52c31806e6fbaa370442 100644 --- a/pages/tab-bar/composition-api.uvue +++ b/pages/tab-bar/composition-api.uvue @@ -80,7 +80,7 @@ { name: 'useAttrs', url: 'use-attrs', - enable: false, + enable: true, }, ] as PageItem[], }, {