From: Eduardo San Martin Morote Date: Fri, 2 Oct 2020 09:24:40 +0000 (+0200) Subject: test(e2e): direct navigation encoded X-Git-Tag: v4.0.0-beta.13~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bae61ceafa0e850266a9c7c23607b61c02c8987b;p=thirdparty%2Fvuejs%2Frouter.git test(e2e): direct navigation encoded --- diff --git a/e2e/encoding/index.ts b/e2e/encoding/index.ts index bca03ef6..ac9dafe8 100644 --- a/e2e/encoding/index.ts +++ b/e2e/encoding/index.ts @@ -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: ' !"#$&\'()*+,/:;<=>?@[]^`{|}' }, diff --git a/e2e/specs/encoding.js b/e2e/specs/encoding.js index e3e01967..64e738d6 100644 --- a/e2e/specs/encoding.js +++ b/e2e/specs/encoding.js @@ -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')