Skip to content

Commit

Permalink
test: fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Apr 7, 2024
1 parent 9ecfa59 commit b6107eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/docs/router/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<button id="404" @click="go404">404</button>

<script setup lang="ts">
import { useRouter } from 'vue-router';
import { useRouter } from 'vuepress/client';

const router = useRouter();

Expand Down
6 changes: 4 additions & 2 deletions e2e/tests/router/navigation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ it('should preserve query', () => {

cy.get('#home').click()

cy.location().eq(`${E2E_BASE}?home=true`)
cy.location('pathname').should('eq', E2E_BASE)
cy.location('search').should('eq', '?home=true')
})

it('should preserve hash', () => {
Expand All @@ -15,5 +16,6 @@ it('should preserve hash', () => {

cy.get('#404').click()

cy.location().eq(`${E2E_BASE}404.html#404`)
cy.location('pathname').should('eq', `${E2E_BASE}404.html`)
cy.location('hash').should('eq', '#404')
})

0 comments on commit b6107eb

Please sign in to comment.