From 0e70366e9c31d3085d505f110b586418c72c217e Mon Sep 17 00:00:00 2001 From: kumavis Date: Mon, 11 Sep 2017 20:14:52 -0700 Subject: test - integration - drop testem for karma --- mock-dev.js | 73 +++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 33 deletions(-) (limited to 'mock-dev.js') diff --git a/mock-dev.js b/mock-dev.js index 8e1923a82..b6652bdf7 100644 --- a/mock-dev.js +++ b/mock-dev.js @@ -85,40 +85,47 @@ actions.update = function(stateName) { var css = MetaMaskUiCss() injectCss(css) -const container = document.querySelector('#app-content') - // parse opts var store = configureStore(firstState) // start app -render( - h('.super-dev-container', [ - - h('button', { - onClick: (ev) => { - ev.preventDefault() - store.dispatch(actions.update('terms')) - }, - style: { - margin: '19px 19px 0px 19px', - }, - }, 'Reset State'), - - h(Selector, { actions, selectedKey: selectedView, states, store }), - - h('.mock-app-root', { - style: { - height: '500px', - width: '360px', - boxShadow: 'grey 0px 2px 9px', - margin: '20px', - }, - }, [ - h(Root, { - store: store, - }), - ]), - - ] -), container) - +startApp() + +function startApp(){ + const body = document.body + const container = document.createElement('div') + container.id = 'app-content' + body.appendChild(container) + console.log('container', container) + + render( + h('.super-dev-container', [ + + h('button', { + onClick: (ev) => { + ev.preventDefault() + store.dispatch(actions.update('terms')) + }, + style: { + margin: '19px 19px 0px 19px', + }, + }, 'Reset State'), + + h(Selector, { actions, selectedKey: selectedView, states, store }), + + h('.mock-app-root', { + style: { + height: '500px', + width: '360px', + boxShadow: 'grey 0px 2px 9px', + margin: '20px', + }, + }, [ + h(Root, { + store: store, + }), + ]), + + ] + ), container) +} -- cgit v1.2.3