From 61ef0fba5d0c96b6c4df1588463159022a2a5f4c Mon Sep 17 00:00:00 2001 From: Tom Medema Date: Fri, 9 Mar 2018 20:04:31 +0100 Subject: [PATCH] wip test case --- test/specs/grapesjs/index.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test/specs/grapesjs/index.js b/test/specs/grapesjs/index.js index 110ef6c76..c55b4935b 100644 --- a/test/specs/grapesjs/index.js +++ b/test/specs/grapesjs/index.js @@ -69,7 +69,10 @@ describe('GrapesJS', () => { }); it('New editor is empty', () => { - var editor = obj.init(config); + var editor = obj.init({ + ...config, + baseCss: '#wrapper { background-color: #fff; }' + }); var html = editor.getHtml(); //var css = editor.getCss(); var protCss = editor.getConfig().protectedCss; @@ -79,6 +82,21 @@ describe('GrapesJS', () => { expect(editor.getStyle().length).toEqual(0); }); + // FIXME: remove .only + it.only('Editor canvas baseCSS can be overwritten', done => { + config.components = htmlString; + config.baseCss = '#wrapper { background-color: #fff; }'; + var editor = obj.init(config); + + const frame = editor.Canvas.getFrameEl(); + console.log(frame); + frame.onload = () => { + // FIXME: this never fires + console.log(frame.contentDocument.outerHTML); + done(); + }; + }); + it('Init editor with html', () => { config.components = htmlString; var editor = obj.init(config);