Merge pull request #1607 from thecodingmachine/fix_query_string
Fixing "Query string parameters prevent WA from loading"
This commit is contained in:
commit
986f826830
@ -163,12 +163,13 @@ class ConnectionManager {
|
|||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
const query = urlParams.toString();
|
||||||
roomPath =
|
roomPath =
|
||||||
window.location.protocol +
|
window.location.protocol +
|
||||||
"//" +
|
"//" +
|
||||||
window.location.host +
|
window.location.host +
|
||||||
window.location.pathname +
|
window.location.pathname +
|
||||||
urlParams.toString() + //use urlParams because the token param must be deleted
|
(query ? "?" + query : "") + //use urlParams because the token param must be deleted
|
||||||
window.location.hash;
|
window.location.hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,9 @@ const fs = require('fs')
|
|||||||
import { Selector } from 'testcafe';
|
import { Selector } from 'testcafe';
|
||||||
import {userAlice} from "./utils/roles";
|
import {userAlice} from "./utils/roles";
|
||||||
|
|
||||||
|
// Note: we are also testing that we can connect if the URL contains a random query string
|
||||||
fixture `Variables`
|
fixture `Variables`
|
||||||
.page `http://play.workadventure.localhost/_/global/maps.workadventure.localhost/tests/Variables/Cache/variables_tmp.json`;
|
.page `http://play.workadventure.localhost/_/global/maps.workadventure.localhost/tests/Variables/Cache/variables_tmp.json?somerandomparam=1`;
|
||||||
|
|
||||||
test("Test that variables cache in the back don't prevent setting a variable in case the map changes", async (t: TestController) => {
|
test("Test that variables cache in the back don't prevent setting a variable in case the map changes", async (t: TestController) => {
|
||||||
// Let's start by visiting a map that DOES not have the variable.
|
// Let's start by visiting a map that DOES not have the variable.
|
||||||
|
Loading…
Reference in New Issue
Block a user