Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: e2e error
  • Loading branch information
CritasWang committed Apr 22, 2025
commit 863ca1959438661fc96ea896edef11132ad5279d
4 changes: 2 additions & 2 deletions e2e/docs/router/navigate-by-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<a :href="$withBase('/404.html')" class="not-found">404</a>
<a :href="$withBase('/?home=true')" class="home-with-query">Home</a>
<a :href="$withBase('/?home=true#home')" class="home-with-query-and-hash">Home</a>
<a :href="$withBase('/404.html#404')" class="not-found-with-hash">404</a>
<a :href="$withBase('/404.html#404?notFound=true')" class="not-found-with-hash-and-query">404</a>
<a :href="$withBase('/404.html#_404')" class="not-found-with-hash">404</a>
<a :href="$withBase('/404.html#_404?notFound=true')" class="not-found-with-hash-and-query">404</a>

## Markdown Links with html paths

Expand Down
4 changes: 2 additions & 2 deletions e2e/docs/router/navigate-by-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const goHomeWithQueryAndHash = () => {
}

const go404WithHash = () => {
router.push('/404.html#404');
router.push('/404.html#_404');
}

const go404WithHashAndQuery = () => {
router.push('/404.html#404?notFound=true');
router.push('/404.html#_404?notFound=true');
}
</script>
8 changes: 4 additions & 4 deletions e2e/tests/router/navigate-by-link.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ test.describe('markdown links', () => {

test('should preserve hash', async ({ page }) => {
await page.locator('#markdown-links + ul > li > a').nth(4).click()
await expect(page).toHaveURL(`${BASE}404.html#404`)
await expect(page).toHaveURL(`${BASE}404.html#_404`)
await expect(page.locator('#notfound-h2')).toHaveText('NotFound H2')
})

test('should preserve hash and query', async ({ page }) => {
await page.locator('#markdown-links + ul > li > a').nth(5).click()
await expect(page).toHaveURL(`${BASE}404.html#404?notFound=true`)
await expect(page).toHaveURL(`${BASE}404.html#_404?notFound=true`)
await expect(page.locator('#notfound-h2')).toHaveText('NotFound H2')
})
})
Expand Down Expand Up @@ -70,13 +70,13 @@ test.describe('html links', () => {

test('should preserve hash', async ({ page }) => {
await page.locator('#html-links + p > a').nth(4).click()
await expect(page).toHaveURL(`${BASE}404.html#404`)
await expect(page).toHaveURL(`${BASE}404.html#_404`)
await expect(page.locator('#notfound-h2')).toHaveText('NotFound H2')
})

test('should preserve hash and query', async ({ page }) => {
await page.locator('#html-links + p > a').nth(5).click()
await expect(page).toHaveURL(`${BASE}404.html#404?notFound=true`)
await expect(page).toHaveURL(`${BASE}404.html#_404?notFound=true`)
await expect(page.locator('#notfound-h2')).toHaveText('NotFound H2')
})
})
Expand Down
4 changes: 2 additions & 2 deletions e2e/tests/router/navigate-by-router.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ test('should preserve query and hash', async ({ page }) => {

test('should preserve hash', async ({ page }) => {
await page.locator('#not-found-with-hash').click()
await expect(page).toHaveURL(`${BASE}404.html#404`)
await expect(page).toHaveURL(`${BASE}404.html#_404`)
await expect(page.locator('#notfound-h2')).toHaveText('NotFound H2')
})

test('should preserve hash and query', async ({ page }) => {
await page.locator('#not-found-with-hash-and-query').click()
await expect(page).toHaveURL(`${BASE}404.html#404?notFound=true`)
await expect(page).toHaveURL(`${BASE}404.html#_404?notFound=true`)
await expect(page.locator('#notfound-h2')).toHaveText('NotFound H2')
})