mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 05:35:13 +00:00
test: add page transition
This commit is contained in:
parent
16469917d5
commit
530b4cc76e
@ -523,7 +523,7 @@ describe('pages', () => {
|
|||||||
|
|
||||||
// that page should be client rendered
|
// that page should be client rendered
|
||||||
// TODO: investigate why multiple elements are appearing on page
|
// TODO: investigate why multiple elements are appearing on page
|
||||||
expect(await clientInitialPage.locator('#server-rendered').first().textContent()).toMatchInlineSnapshot('"false"')
|
expect(await clientInitialPage.locator('#server-rendered').textContent()).toMatchInlineSnapshot('"false"')
|
||||||
// and not contain any errors or warnings
|
// and not contain any errors or warnings
|
||||||
expect(errors.length).toBe(0)
|
expect(errors.length).toBe(0)
|
||||||
|
|
||||||
|
17
test/fixtures/basic/app.vue
vendored
Normal file
17
test/fixtures/basic/app.vue
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<template>
|
||||||
|
<NuxtLayout>
|
||||||
|
<NuxtPage />
|
||||||
|
</NuxtLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page-enter-active,
|
||||||
|
.page-leave-active {
|
||||||
|
transition: all 0.1s;
|
||||||
|
}
|
||||||
|
.page-enter-from,
|
||||||
|
.page-leave-to {
|
||||||
|
opacity: 0;
|
||||||
|
filter: blur(1rem);
|
||||||
|
}
|
||||||
|
</style>
|
2
test/fixtures/basic/nuxt.config.ts
vendored
2
test/fixtures/basic/nuxt.config.ts
vendored
@ -13,7 +13,7 @@ declare module 'nitropack' {
|
|||||||
|
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
app: {
|
app: {
|
||||||
pageTransition: true,
|
pageTransition: { name: 'page', mode: 'out-in' },
|
||||||
layoutTransition: true,
|
layoutTransition: true,
|
||||||
teleportId: 'nuxt-teleport',
|
teleportId: 'nuxt-teleport',
|
||||||
teleportTag: 'span',
|
teleportTag: 'span',
|
||||||
|
Loading…
Reference in New Issue
Block a user