|
1 | 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP |
2 | 2 |
|
3 | | -exports[`Registry should correctly serve rendered and unrendered components 1`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"unrendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"data\\":{\\"reactComponent\\":{\\"key\\":\\"b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c\\",\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/react-component.js\\",\\"props\\":{\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}}},\\"template\\":{\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/template.js\\",\\"type\\":\\"oc-template-react\\",\\"key\\":\\"0633c8cf7bd05045e541620d85064180f21d7321\\"}}"`; |
| 3 | +exports[`Registry should correctly serve rendered and unrendered components 1`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"unrendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"data\\":{\\"reactComponent\\":{\\"key\\":\\"b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c\\",\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/react-component.js\\",\\"props\\":{\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}}},\\"template\\":{\\"src\\":\\"http://localhost:3000/react-app/1.0.0/static/template.js\\",\\"type\\":\\"oc-template-react\\",\\"key\\":\\"1b0e2d10dfd2021949e8072206ea7ec52a7ec5ea\\"}}"`; |
4 | 4 |
|
5 | | -exports[`Registry should correctly serve rendered and unrendered components 2`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"rendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"html\\":\\"<oc-component href=\\\\\\"http://localhost:3000/react-app?name=SuperMario\\\\\\" data-hash=\\\\\\"0633c8cf7bd05045e541620d85064180f21d7321\\\\\\" data-name=\\\\\\"react-app\\\\\\" data-rendered=\\\\\\"true\\\\\\" data-version=\\\\\\"1.0.0\\\\\\"><div id=\\\\\\"oc-reactRoot-react-app\\\\\\" class=\\\\\\"oc-reactRoot-react-app\\\\\\" ><div class=\\\\\\"special__3K6pmcHx\\\\\\" data-reactroot=\\\\\\"\\\\\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\\\\\"global\\\\\\":\\\\\\"React\\\\\\",\\\\\\"url\\\\\\":\\\\\\"https://unpkg.com/ [email protected]/umd/react.production.min.js\\\\\\",\\\\\\"name\\\\\\":\\\\\\"react\\\\\\"},{\\\\\\"global\\\\\\":\\\\\\"ReactDOM\\\\\\",\\\\\\"url\\\\\\":\\\\\\"https://unpkg.com/ [email protected]/umd/react-dom.production.min.js\\\\\\",\\\\\\"name\\\\\\":\\\\\\"react-dom\\\\\\"}], function(){ oc.require( ['oc', 'reactComponents', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\\\\\"oc-reactRoot-react-app\\\\\\"); targetNode.setAttribute(\\\\\\"id\\\\\\",\\\\\\"\\\\\\"); ReactDOM.render(React.createElement(ReactComponent, {\\\\\\"name\\\\\\":\\\\\\"SuperMario\\\\\\",\\\\\\"staticPath\\\\\\":\\\\\\"http://localhost:3000/react-app/1.0.0/static/\\\\\\",\\\\\\"baseUrl\\\\\\":\\\\\\"http://localhost:3000/\\\\\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\\\\\"react-app\\\\\\"]=\\\\\\"1.0.0\\\\\\";</script></oc-component>\\"}"`; |
| 5 | +exports[`Registry should correctly serve rendered and unrendered components 2`] = `"{\\"type\\":\\"oc-component-local\\",\\"version\\":\\"1.0.0\\",\\"requestVersion\\":\\"\\",\\"name\\":\\"react-app\\",\\"renderMode\\":\\"rendered\\",\\"href\\":\\"http://localhost:3000/react-app?name=SuperMario\\",\\"html\\":\\"<oc-component href=\\\\\\"http://localhost:3000/react-app?name=SuperMario\\\\\\" data-hash=\\\\\\"1b0e2d10dfd2021949e8072206ea7ec52a7ec5ea\\\\\\" data-name=\\\\\\"react-app\\\\\\" data-rendered=\\\\\\"true\\\\\\" data-version=\\\\\\"1.0.0\\\\\\"><div id=\\\\\\"oc-reactRoot-react-app\\\\\\" class=\\\\\\"oc-reactRoot-react-app\\\\\\" ><div class=\\\\\\"special__3K6pmcHx\\\\\\" data-reactroot=\\\\\\"\\\\\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\\\\\"global\\\\\\":\\\\\\"React\\\\\\",\\\\\\"url\\\\\\":\\\\\\"https://unpkg.com/ [email protected]/umd/react.production.min.js\\\\\\",\\\\\\"name\\\\\\":\\\\\\"react\\\\\\"},{\\\\\\"global\\\\\\":\\\\\\"ReactDOM\\\\\\",\\\\\\"url\\\\\\":\\\\\\"https://unpkg.com/ [email protected]/umd/react-dom.production.min.js\\\\\\",\\\\\\"name\\\\\\":\\\\\\"react-dom\\\\\\"}], function(){ oc.require( ['oc', 'reactComponents', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\\\\\"oc-reactRoot-react-app\\\\\\"); targetNode.setAttribute(\\\\\\"id\\\\\\",\\\\\\"\\\\\\"); ReactDOM.render(React.createElement(ReactComponent, {\\\\\\"name\\\\\\":\\\\\\"SuperMario\\\\\\",\\\\\\"staticPath\\\\\\":\\\\\\"http://localhost:3000/react-app/1.0.0/static/\\\\\\",\\\\\\"baseUrl\\\\\\":\\\\\\"http://localhost:3000/\\\\\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\\\\\"react-app\\\\\\"]=\\\\\\"1.0.0\\\\\\";</script></oc-component>\\"}"`; |
6 | 6 |
|
7 | 7 | exports[`server-side-side rendering 1`] = ` |
8 | 8 | "<!DOCTYPE html><html><head> |
9 | 9 | <title>A page</title> |
10 | 10 | </head> |
11 | 11 | <body> |
12 | | - <oc-component href=\\"http://localhost:3000/react-app?name=SuperMario\\" data-hash=\\"0633c8cf7bd05045e541620d85064180f21d7321\\" data-name=\\"react-app\\" data-rendered=\\"true\\" data-version=\\"1.0.0\\"><div id=\\"oc-reactRoot-react-app\\" class=\\"oc-reactRoot-react-app\\"><div class=\\"special__3K6pmcHx\\" data-reactroot=\\"\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}], function(){ oc.require( ['oc', 'reactComponents', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\"oc-reactRoot-react-app\\"); targetNode.setAttribute(\\"id\\",\\"\\"); ReactDOM.render(React.createElement(ReactComponent, {\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"react-app\\"]=\\"1.0.0\\";</script></oc-component> |
| 12 | + <oc-component href=\\"http://localhost:3000/react-app?name=SuperMario\\" data-hash=\\"1b0e2d10dfd2021949e8072206ea7ec52a7ec5ea\\" data-name=\\"react-app\\" data-rendered=\\"true\\" data-version=\\"1.0.0\\"><div id=\\"oc-reactRoot-react-app\\" class=\\"oc-reactRoot-react-app\\"><div class=\\"special__3K6pmcHx\\" data-reactroot=\\"\\"><h1>Hello <!-- -->SuperMario<!-- --> <!-- -->0</h1></div></div> <style>.special__3K6pmcHx{background:#db7093;color:#fff}</style> <script> window.oc = window.oc || {}; oc.cmd = oc.cmd || []; oc.cmd.push(function(oc){ oc.requireSeries([{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}], function(){ oc.require( ['oc', 'reactComponents', 'b7fe7d59ec6c94540b6f3015dc6f7c4740541d0c'], 'http://localhost:3000/react-app/1.0.0/static/react-component.js', function(ReactComponent){ var targetNode = document.getElementById(\\"oc-reactRoot-react-app\\"); targetNode.setAttribute(\\"id\\",\\"\\"); ReactDOM.render(React.createElement(ReactComponent, {\\"name\\":\\"SuperMario\\",\\"staticPath\\":\\"http://localhost:3000/react-app/1.0.0/static/\\",\\"baseUrl\\":\\"http://localhost:3000/\\"}),targetNode); } ); }); }); </script> <script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"react-app\\"]=\\"1.0.0\\";</script></oc-component> |
13 | 13 | <script>window.oc = window.oc || {}; |
14 | 14 | oc.conf = oc.conf || {}; |
15 | 15 | oc.conf.templates = oc.conf.templates || []; |
16 | | -oc.conf.templates = oc.conf.templates.concat([{\\"type\\":\\"oc-template-jade\\",\\"version\\":\\"6.0.9\\",\\"externals\\":[{\\"global\\":\\"jade\\",\\"url\\":\\"https://unpkg.com/[email protected]/runtime.js\\",\\"name\\":\\"jade\\"}]},{\\"type\\":\\"oc-template-handlebars\\",\\"version\\":\\"6.0.8\\",\\"externals\\":[{\\"global\\":\\"Handlebars\\",\\"url\\":\\"https://unpkg.com/[email protected]/dist/handlebars.runtime.min.js\\",\\"name\\":\\"handlebars\\"}]},{\\"type\\":\\"oc-template-react\\",\\"version\\":\\"1.0.1\\",\\"externals\\":[{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}]}]);</script><script src=\\"http://localhost:3000/oc-client/0.41.14/static/src/oc-client.min.js\\" type=\\"text/javascript\\"></script><script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"oc-client\\"]=\\"0.41.14\\";</script> |
| 16 | +oc.conf.templates = oc.conf.templates.concat([{\\"type\\":\\"oc-template-jade\\",\\"version\\":\\"6.0.9\\",\\"externals\\":[{\\"global\\":\\"jade\\",\\"url\\":\\"https://unpkg.com/[email protected]/runtime.js\\",\\"name\\":\\"jade\\"}]},{\\"type\\":\\"oc-template-handlebars\\",\\"version\\":\\"6.0.8\\",\\"externals\\":[{\\"global\\":\\"Handlebars\\",\\"url\\":\\"https://unpkg.com/[email protected]/dist/handlebars.runtime.min.js\\",\\"name\\":\\"handlebars\\"}]},{\\"type\\":\\"oc-template-react\\",\\"version\\":\\"1.0.1\\",\\"externals\\":[{\\"global\\":\\"React\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react.production.min.js\\",\\"name\\":\\"react\\"},{\\"global\\":\\"ReactDOM\\",\\"url\\":\\"https://unpkg.com/[email protected]/umd/react-dom.production.min.js\\",\\"name\\":\\"react-dom\\"}]}]);</script><script src=\\"http://localhost:3000/oc-client/0.41.14/static/src/oc-client.min.js\\" type=\\"text/javascript\\"></script><script>window.oc=window.oc||{};oc.renderedComponents=oc.renderedComponents||{};oc.renderedComponents[\\"oc-client\\"]=\\"0.41.14\\";</script> |
17 | 17 | |
18 | 18 | |
19 | 19 | </body></html>" |
|
0 commit comments