]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
test(e2e): direct navigation encoded
authorEduardo San Martin Morote <posva13@gmail.com>
Fri, 2 Oct 2020 09:24:40 +0000 (11:24 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Fri, 2 Oct 2020 09:24:40 +0000 (11:24 +0200)
e2e/encoding/index.ts
e2e/specs/encoding.js

index bca03ef6f77863a1808692bc9af6ba6870bd618b..ac9dafe84852c7bb30aa3deac912d59f7e0f3699 100644 (file)
@@ -32,7 +32,7 @@ const app = createApp({
     const url =
       '/' +
       __dirname +
-      '/ !"%23$&\'()*+,%2F:;<=>%3F@[]^`{|}?a= !"$%26\'()*+,/:;<=>?@[]^`{|}# !"#$&\'()*+,/:;<=>?@[]^`{|}'
+      '/ !"%23$&\'()*+,%2F:;<=>%3F@[]^`{|}?a%3D= !"%23$%26\'()*+,/:;<=>?@[]^`{|}# !"#$&\'()*+,/:;<=>?@[]^`{|}'
     const urlObject = {
       name: 'param',
       params: { id: ' !"#$&\'()*+,/:;<=>?@[]^`{|}' },
index e3e01967b63ac02d3539933f163b60c450596226..64e738d60fd197fc0e26d58f0421cf4906744980 100644 (file)
@@ -30,6 +30,16 @@ module.exports = {
       .text.equals(JSON.stringify({ 'a=': rawText }, null, 2))
     browser.expect.element('#hash').text.equals('#' + rawText)
 
+    // link by the browser with minimal encoding
+    // browsers will encode it differently but the resulted decoded values
+    // should be consistent across browsers
+    browser.click('li:nth-child(7) a').waitForElementPresent('#app > *', 1000)
+    browser.expect.element('#p-id').text.equals(`"${rawText}"`)
+    browser.expect
+      .element('#query')
+      .text.equals(JSON.stringify({ 'a=': rawText }, null, 2))
+    browser.expect.element('#hash').text.equals('#' + rawText)
+
     // check initial visit
     browser
       .url(baseURL + '/documents/%E2%82%ACuro')