From: Eduardo San Martin Morote Date: Mon, 28 Jun 2021 15:01:23 +0000 (+0200) Subject: test(e2e): updates X-Git-Tag: v4.0.11~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b07a03d6446b6ceb287b10e23ba657d5979be63;p=thirdparty%2Fvuejs%2Frouter.git test(e2e): updates --- diff --git a/e2e/scroll-behavior/index.ts b/e2e/scroll-behavior/index.ts index f0255362..21d1d64e 100644 --- a/e2e/scroll-behavior/index.ts +++ b/e2e/scroll-behavior/index.ts @@ -52,7 +52,7 @@ const scrollBehavior: RouterScrollBehavior = async function ( } // check if any matched route config has meta that requires scrolling to top - if (to.matched.some(m => m.meta.scrollToTop)) { + if (to.meta.scrollToTop) { // coords will be used if no selector is provided, // or if the selector didn't match any element. return { left: 0, top: 0, behavior } @@ -73,6 +73,12 @@ const router = createRouter({ ], }) +declare module '../../src' { + export interface RouteMeta { + scrollToTop?: boolean + } +} + scrollWaiter.add() const smoothScroll = ref(false)