Répare le test de l'integration iframe en prod

pull/297/head
Johan Girod 2018-08-10 11:20:25 +02:00
parent dcc4baa336
commit d56515301e
2 changed files with 2 additions and 7 deletions

View File

@ -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 = {

View File

@ -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() {