fix: fix route resolving error with hash and queries (close #1561) #375
Annotations
4 errors and 1 notice
E2E test (base /):
e2e\tests\routes\permalinks.spec.ts#L78
1) [chromium] › routes\permalinks.spec.ts:67:1 › should support rendering link by filename and navigate to it correctly
Error: Timed out 5000ms waiting for expect(locator).toHaveAttribute(expected)
Locator: locator('.e2e-theme-content #中文-ascii + ul > li a').nth(2)
Expected string: "/permalink-non-ascii-ascii/"
Received string: "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
Call log:
- expect.toHaveAttribute with timeout 5000ms
- waiting for locator('.e2e-theme-content #中文-ascii + ul > li a').nth(2)
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
76 | await expect(linksLocator).toHaveCount(3)
77 |
> 78 | await expect(linksLocator.nth(2)).toHaveAttribute(
| ^
79 | 'href',
80 | encodeURI(`${PERMALINK_PREFIX}${permalink}`),
81 | )
at D:\a\core\core\e2e\tests\routes\permalinks.spec.ts:78:39
|
E2E test (base /):
e2e\tests\routes\permalinks.spec.ts#L78
1) [chromium] › routes\permalinks.spec.ts:67:1 › should support rendering link by filename and navigate to it correctly
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toHaveAttribute(expected)
Locator: locator('.e2e-theme-content #中文-ascii + ul > li a').nth(2)
Expected string: "/permalink-non-ascii-ascii/"
Received string: "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
Call log:
- expect.toHaveAttribute with timeout 5000ms
- waiting for locator('.e2e-theme-content #中文-ascii + ul > li a').nth(2)
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
76 | await expect(linksLocator).toHaveCount(3)
77 |
> 78 | await expect(linksLocator.nth(2)).toHaveAttribute(
| ^
79 | 'href',
80 | encodeURI(`${PERMALINK_PREFIX}${permalink}`),
81 | )
at D:\a\core\core\e2e\tests\routes\permalinks.spec.ts:78:39
|
E2E test (base /):
e2e\tests\routes\permalinks.spec.ts#L78
1) [chromium] › routes\permalinks.spec.ts:67:1 › should support rendering link by filename and navigate to it correctly
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: Timed out 5000ms waiting for expect(locator).toHaveAttribute(expected)
Locator: locator('.e2e-theme-content #中文-ascii + ul > li a').nth(2)
Expected string: "/permalink-non-ascii-ascii/"
Received string: "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
Call log:
- expect.toHaveAttribute with timeout 5000ms
- waiting for locator('.e2e-theme-content #中文-ascii + ul > li a').nth(2)
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
- locator resolved to <a class="route-link" href="/routes/permalinks/%E4%…>filename</a>
- unexpected value "/routes/permalinks/%E4%B8%AD%E6%96%87-ascii.html"
76 | await expect(linksLocator).toHaveCount(3)
77 |
> 78 | await expect(linksLocator.nth(2)).toHaveAttribute(
| ^
79 | 'href',
80 | encodeURI(`${PERMALINK_PREFIX}${permalink}`),
81 | )
at D:\a\core\core\e2e\tests\routes\permalinks.spec.ts:78:39
|
E2E test (base /)
Process completed with exit code 1.
|
E2E test (base /)
1 failed
[chromium] › routes\permalinks.spec.ts:67:1 › should support rendering link by filename and navigate to it correctly
48 passed (49.8s)
|
Loading