diff --git a/front/src/Connexion/ConnectionManager.ts b/front/src/Connexion/ConnectionManager.ts index 22289895..b75c6bc6 100644 --- a/front/src/Connexion/ConnectionManager.ts +++ b/front/src/Connexion/ConnectionManager.ts @@ -163,12 +163,13 @@ class ConnectionManager { console.error(err); } } else { + const query = urlParams.toString(); roomPath = window.location.protocol + "//" + window.location.host + 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; } diff --git a/tests/tests/test.ts b/tests/tests/test.ts index c7747578..94659ad7 100644 --- a/tests/tests/test.ts +++ b/tests/tests/test.ts @@ -4,8 +4,9 @@ const fs = require('fs') import { Selector } from 'testcafe'; import {userAlice} from "./utils/roles"; +// Note: we are also testing that we can connect if the URL contains a random query string 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) => { // Let's start by visiting a map that DOES not have the variable.