From: Eduardo San Martin Morote Date: Tue, 7 Jul 2020 08:43:56 +0000 (+0200) Subject: test(e2e): add fixme note X-Git-Tag: v4.0.0-beta.2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5bd6bc805d658e54e206045b3595cae561895204;p=thirdparty%2Fvuejs%2Frouter.git test(e2e): add fixme note --- diff --git a/e2e/modal/index.ts b/e2e/modal/index.ts index e874b852..f8f8446e 100644 --- a/e2e/modal/index.ts +++ b/e2e/modal/index.ts @@ -1,6 +1,15 @@ import { createRouter, createWebHistory, useRoute } from '../../src' -import { RouteComponent, RouteLocationNormalizedLoaded } from '../../src/types' -import { createApp, readonly, ref, watchEffect, computed, toRefs } from 'vue' +import { RouteLocationNormalizedLoaded } from '../../src/types' +import { + createApp, + readonly, + ref, + watchEffect, + computed, + toRefs, + defineComponent, + PropType, +} from 'vue' const users = readonly([ { name: 'John' }, @@ -23,7 +32,7 @@ function closeUserModal() { history.back() } -const Home: RouteComponent = { +const Home = defineComponent({ template: `

Home

Select a user

@@ -80,9 +89,9 @@ const Home: RouteComponent = { users, } }, -} +}) -const About: RouteComponent = { +const About = defineComponent({ template: `

About

@@ -92,9 +101,9 @@ const About: RouteComponent = { methods: { back: () => history.back(), }, -} +}) -const UserDetails: RouteComponent = { +const UserDetails = defineComponent({ template: `

User #{{ id }}

@@ -102,9 +111,15 @@ const UserDetails: RouteComponent = {

Back home
`, - props: ['id'], + props: { + id: { + type: String, + // FIXME: setting this to true fails with props: true, as if it didn't fit the definition of RouteComponent + required: false, + }, + }, data: () => ({ users }), -} +}) const webHistory = createWebHistory('/' + __dirname) const router = createRouter({