Skip to content

Commit bae61ce

Browse files
committed
test(e2e): direct navigation encoded
1 parent 373203e commit bae61ce

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

e2e/encoding/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const app = createApp({
3232
const url =
3333
'/' +
3434
__dirname +
35-
'/ !"%23$&\'()*+,%2F:;<=>%3F@[]^`{|}?a= !"$%26\'()*+,/:;<=>?@[]^`{|}# !"#$&\'()*+,/:;<=>?@[]^`{|}'
35+
'/ !"%23$&\'()*+,%2F:;<=>%3F@[]^`{|}?a%3D= !"%23$%26\'()*+,/:;<=>?@[]^`{|}# !"#$&\'()*+,/:;<=>?@[]^`{|}'
3636
const urlObject = {
3737
name: 'param',
3838
params: { id: ' !"#$&\'()*+,/:;<=>?@[]^`{|}' },

e2e/specs/encoding.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ module.exports = {
3030
.text.equals(JSON.stringify({ 'a=': rawText }, null, 2))
3131
browser.expect.element('#hash').text.equals('#' + rawText)
3232

33+
// link by the browser with minimal encoding
34+
// browsers will encode it differently but the resulted decoded values
35+
// should be consistent across browsers
36+
browser.click('li:nth-child(7) a').waitForElementPresent('#app > *', 1000)
37+
browser.expect.element('#p-id').text.equals(`"${rawText}"`)
38+
browser.expect
39+
.element('#query')
40+
.text.equals(JSON.stringify({ 'a=': rawText }, null, 2))
41+
browser.expect.element('#hash').text.equals('#' + rawText)
42+
3343
// check initial visit
3444
browser
3545
.url(baseURL + '/documents/%E2%82%ACuro')

0 commit comments

Comments
 (0)