From d56515301e52a814df018bfcde00675294047599 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 10 Aug 2018 11:20:25 +0200 Subject: [PATCH] =?UTF-8?q?R=C3=A9pare=20le=20test=20de=20l'integration=20?= =?UTF-8?q?iframe=20en=20prod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/sites/embauche.gouv.fr/iframe-script.js | 2 +- source/sites/embauche.gouv.fr/pages/IntegrationTest.js | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/source/sites/embauche.gouv.fr/iframe-script.js b/source/sites/embauche.gouv.fr/iframe-script.js index 6904cd1cd..acf89ed9f 100644 --- a/source/sites/embauche.gouv.fr/iframe-script.js +++ b/source/sites/embauche.gouv.fr/iframe-script.js @@ -5,7 +5,7 @@ let script = document.getElementById('script-simulateur-embauche'), baseUrl = script.dataset.iframeUrl || script.getAttribute('src').split('dist')[0], integratorUrl = encodeURIComponent(window.location.href.toString()), lang = script.dataset.lang, - src = baseUrl + `?couleur=${couleur}&iframe&integratorUrl=${integratorUrl}&lang=${lang}` + src = baseUrl + `?site=embauche&couleur=${couleur}&iframe&integratorUrl=${integratorUrl}&lang=${lang}` const iframe = document.createElement('iframe') const iframeAttributes = { diff --git a/source/sites/embauche.gouv.fr/pages/IntegrationTest.js b/source/sites/embauche.gouv.fr/pages/IntegrationTest.js index 356f69934..431a37357 100644 --- a/source/sites/embauche.gouv.fr/pages/IntegrationTest.js +++ b/source/sites/embauche.gouv.fr/pages/IntegrationTest.js @@ -10,12 +10,7 @@ export default class IntegrationTest extends Component { window.location.origin + '/dist/simulateur.js' script.dataset.couleur = '#2975D1' script.dataset.iframeUrl = - window.location.origin + - this.props.history.createHref({ - search: this.props.location.search.includes('site=embauche') - ? '?site=embauche' - : '' - }) + window.location.origin + this.props.history.createHref({}) this.DOMNode.appendChild(script) } render() {