I forgot to configure enzyme-to-json
I thought those snapshots looked terrible
This commit is contained in:
@@ -1,484 +1,42 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Footer rendering 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <Footer
|
||||
buildId="abc-123"
|
||||
t={[Function]}
|
||||
/>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<ul
|
||||
className="list"
|
||||
<footer
|
||||
className="footer"
|
||||
>
|
||||
<ul
|
||||
className="list"
|
||||
>
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Created by
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Created by
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Generated images licensed:
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>
|
||||
</ul>,
|
||||
<div
|
||||
className="buildId"
|
||||
Jeff Avallone
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Generated images licensed:
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
abc-123
|
||||
</div>,
|
||||
],
|
||||
"className": "footer",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Created by
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>,
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Generated images licensed:
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>,
|
||||
],
|
||||
"className": "list",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <WithMergedOptions(TransComponent)>
|
||||
Created by
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
"Created by ",
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
"Created by ",
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Jeff Avallone",
|
||||
"href": "mailto:jeff.avallone@gmail.com",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Jeff Avallone",
|
||||
"type": "a",
|
||||
},
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
"type": "li",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <WithMergedOptions(TransComponent)>
|
||||
Generated images licensed:
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
"Generated images licensed: ",
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
"Generated images licensed: ",
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>,
|
||||
"href": "http://creativecommons.org/licenses/by/3.0/",
|
||||
"rel": "license external noopener noreferrer",
|
||||
"target": "_blank",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"alt": "TRANSLATE(Creative Commons CC-BY-3.0 License)",
|
||||
"src": "https://licensebuttons.net/l/by/3.0/80x15.png",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": "img",
|
||||
},
|
||||
"type": "a",
|
||||
},
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
"type": "li",
|
||||
},
|
||||
],
|
||||
"type": "ul",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "abc-123",
|
||||
"className": "buildId",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "abc-123",
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "footer",
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<ul
|
||||
className="list"
|
||||
>
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Created by
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Generated images licensed:
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>
|
||||
</ul>,
|
||||
<div
|
||||
className="buildId"
|
||||
>
|
||||
abc-123
|
||||
</div>,
|
||||
],
|
||||
"className": "footer",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Created by
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>,
|
||||
<li>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Generated images licensed:
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>,
|
||||
],
|
||||
"className": "list",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <WithMergedOptions(TransComponent)>
|
||||
Created by
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
"Created by ",
|
||||
<a
|
||||
href="mailto:jeff.avallone@gmail.com"
|
||||
>
|
||||
Jeff Avallone
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
"Created by ",
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Jeff Avallone",
|
||||
"href": "mailto:jeff.avallone@gmail.com",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Jeff Avallone",
|
||||
"type": "a",
|
||||
},
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
"type": "li",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <WithMergedOptions(TransComponent)>
|
||||
Generated images licensed:
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
"Generated images licensed: ",
|
||||
<a
|
||||
href="http://creativecommons.org/licenses/by/3.0/"
|
||||
rel="license external noopener noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
"Generated images licensed: ",
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>,
|
||||
"href": "http://creativecommons.org/licenses/by/3.0/",
|
||||
"rel": "license external noopener noreferrer",
|
||||
"target": "_blank",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"alt": "TRANSLATE(Creative Commons CC-BY-3.0 License)",
|
||||
"src": "https://licensebuttons.net/l/by/3.0/80x15.png",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": "img",
|
||||
},
|
||||
"type": "a",
|
||||
},
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
"type": "li",
|
||||
},
|
||||
],
|
||||
"type": "ul",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "abc-123",
|
||||
"className": "buildId",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "abc-123",
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "footer",
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
<img
|
||||
alt="TRANSLATE(Creative Commons CC-BY-3.0 License)"
|
||||
src="https://licensebuttons.net/l/by/3.0/80x15.png"
|
||||
/>
|
||||
</a>
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</li>
|
||||
</ul>
|
||||
<div
|
||||
className="buildId"
|
||||
>
|
||||
abc-123
|
||||
</div>
|
||||
</footer>
|
||||
`;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,150 +1,15 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Layout rendering 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <Layout
|
||||
<SentryBoundary>
|
||||
<LoadNamespace(Header)
|
||||
banner="Test Banner"
|
||||
buildId="test-buildid"
|
||||
>
|
||||
/>
|
||||
<SentryBoundary>
|
||||
Example content
|
||||
</Layout>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<LoadNamespace(Header)
|
||||
banner="Test Banner"
|
||||
/>,
|
||||
<SentryBoundary>
|
||||
Example content
|
||||
</SentryBoundary>,
|
||||
<LoadNamespace(Footer)
|
||||
buildId="test-buildid"
|
||||
/>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"banner": "Test Banner",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": "Example content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Example content",
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"buildId": "test-buildid",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<LoadNamespace(Header)
|
||||
banner="Test Banner"
|
||||
/>,
|
||||
<SentryBoundary>
|
||||
Example content
|
||||
</SentryBoundary>,
|
||||
<LoadNamespace(Footer)
|
||||
buildId="test-buildid"
|
||||
/>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"banner": "Test Banner",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": "Example content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Example content",
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"buildId": "test-buildid",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</SentryBoundary>
|
||||
<LoadNamespace(Footer)
|
||||
buildId="test-buildid"
|
||||
/>
|
||||
</SentryBoundary>
|
||||
`;
|
||||
|
||||
@@ -1,323 +1,34 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`LocaleSwitcher rendering 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <LocaleSwitcher />,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Language
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
<div
|
||||
className="switcher"
|
||||
>
|
||||
<select
|
||||
onChange={[Function]}
|
||||
value="en"
|
||||
>
|
||||
<option
|
||||
value="en"
|
||||
>
|
||||
English
|
||||
</option>
|
||||
<option
|
||||
value="other"
|
||||
>
|
||||
Other
|
||||
</option>
|
||||
</select>
|
||||
<ChevronsDown
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>
|
||||
</div>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": "Language",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Language",
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<select
|
||||
onChange={[Function]}
|
||||
value="en"
|
||||
>
|
||||
<option
|
||||
value="en"
|
||||
>
|
||||
English
|
||||
</option>
|
||||
<option
|
||||
value="other"
|
||||
>
|
||||
Other
|
||||
</option>
|
||||
</select>,
|
||||
<ChevronsDown
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>,
|
||||
],
|
||||
"className": "switcher",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<option
|
||||
value="en"
|
||||
>
|
||||
English
|
||||
</option>,
|
||||
<option
|
||||
value="other"
|
||||
>
|
||||
Other
|
||||
</option>,
|
||||
],
|
||||
"onChange": [Function],
|
||||
"value": "en",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": "en",
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "English",
|
||||
"value": "en",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "English",
|
||||
"type": "option",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": "other",
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Other",
|
||||
"value": "other",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Other",
|
||||
"type": "option",
|
||||
},
|
||||
],
|
||||
"type": "select",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {
|
||||
"color": "currentColor",
|
||||
"size": "24",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "label",
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Language
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
<div
|
||||
className="switcher"
|
||||
>
|
||||
<select
|
||||
onChange={[Function]}
|
||||
value="en"
|
||||
>
|
||||
<option
|
||||
value="en"
|
||||
>
|
||||
English
|
||||
</option>
|
||||
<option
|
||||
value="other"
|
||||
>
|
||||
Other
|
||||
</option>
|
||||
</select>
|
||||
<ChevronsDown
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>
|
||||
</div>,
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": "Language",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Language",
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<select
|
||||
onChange={[Function]}
|
||||
value="en"
|
||||
>
|
||||
<option
|
||||
value="en"
|
||||
>
|
||||
English
|
||||
</option>
|
||||
<option
|
||||
value="other"
|
||||
>
|
||||
Other
|
||||
</option>
|
||||
</select>,
|
||||
<ChevronsDown
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>,
|
||||
],
|
||||
"className": "switcher",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<option
|
||||
value="en"
|
||||
>
|
||||
English
|
||||
</option>,
|
||||
<option
|
||||
value="other"
|
||||
>
|
||||
Other
|
||||
</option>,
|
||||
],
|
||||
"onChange": [Function],
|
||||
"value": "en",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": "en",
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "English",
|
||||
"value": "en",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "English",
|
||||
"type": "option",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": "other",
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Other",
|
||||
"value": "other",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Other",
|
||||
"type": "option",
|
||||
},
|
||||
],
|
||||
"type": "select",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {
|
||||
"color": "currentColor",
|
||||
"size": "24",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "label",
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
<label>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
Language
|
||||
</WithMergedOptions(TransComponent)>
|
||||
<div
|
||||
className="switcher"
|
||||
>
|
||||
<select
|
||||
onChange={[Function]}
|
||||
value="en"
|
||||
>
|
||||
<option
|
||||
key="en"
|
||||
value="en"
|
||||
>
|
||||
English
|
||||
</option>
|
||||
<option
|
||||
key="other"
|
||||
value="other"
|
||||
>
|
||||
Other
|
||||
</option>
|
||||
</select>
|
||||
<ChevronsDown
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
`;
|
||||
|
||||
@@ -1,669 +1,69 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Message rendering 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <Message
|
||||
heading="Testing"
|
||||
<div
|
||||
className="message"
|
||||
>
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</Message>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>,
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</div>,
|
||||
],
|
||||
"className": "message",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
undefined,
|
||||
<h2>
|
||||
Testing
|
||||
</h2>,
|
||||
],
|
||||
"className": "header",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
undefined,
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Testing",
|
||||
"type": "h2",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
Message content
|
||||
</p>,
|
||||
"className": "content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Message content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Message content",
|
||||
"type": "p",
|
||||
},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>,
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</div>,
|
||||
],
|
||||
"className": "message",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
undefined,
|
||||
<h2>
|
||||
Testing
|
||||
</h2>,
|
||||
],
|
||||
"className": "header",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
undefined,
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Testing",
|
||||
"type": "h2",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
Message content
|
||||
</p>,
|
||||
"className": "content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Message content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Message content",
|
||||
"type": "p",
|
||||
},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Message rendering with icon 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <Message
|
||||
heading="Testing"
|
||||
icon={[Function]}
|
||||
<div
|
||||
className="message"
|
||||
>
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<Icon />
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</Message>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<Icon />
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>,
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</div>,
|
||||
],
|
||||
"className": "message",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<Icon />,
|
||||
<h2>
|
||||
Testing
|
||||
</h2>,
|
||||
],
|
||||
"className": "header",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Testing",
|
||||
"type": "h2",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
Message content
|
||||
</p>,
|
||||
"className": "content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Message content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Message content",
|
||||
"type": "p",
|
||||
},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<Icon />
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>,
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</div>,
|
||||
],
|
||||
"className": "message",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<Icon />,
|
||||
<h2>
|
||||
Testing
|
||||
</h2>,
|
||||
],
|
||||
"className": "header",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Testing",
|
||||
"type": "h2",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
Message content
|
||||
</p>,
|
||||
"className": "content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Message content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Message content",
|
||||
"type": "p",
|
||||
},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Message rendering with type 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <Message
|
||||
heading="Testing"
|
||||
type="error"
|
||||
<div
|
||||
className="message error"
|
||||
>
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<AlertOctagon
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</Message>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<AlertOctagon
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>,
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</div>,
|
||||
],
|
||||
"className": "message error",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<AlertOctagon
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>,
|
||||
<h2>
|
||||
Testing
|
||||
</h2>,
|
||||
],
|
||||
"className": "header",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {
|
||||
"color": "currentColor",
|
||||
"size": "24",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Testing",
|
||||
"type": "h2",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
Message content
|
||||
</p>,
|
||||
"className": "content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Message content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Message content",
|
||||
"type": "p",
|
||||
},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<div
|
||||
className="header"
|
||||
>
|
||||
<AlertOctagon
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>
|
||||
<h2>
|
||||
Testing
|
||||
</h2>
|
||||
</div>,
|
||||
<div
|
||||
className="content"
|
||||
>
|
||||
<p>
|
||||
Message content
|
||||
</p>
|
||||
</div>,
|
||||
],
|
||||
"className": "message error",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
<AlertOctagon
|
||||
color="currentColor"
|
||||
size="24"
|
||||
/>,
|
||||
<h2>
|
||||
Testing
|
||||
</h2>,
|
||||
],
|
||||
"className": "header",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {
|
||||
"color": "currentColor",
|
||||
"size": "24",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Testing",
|
||||
"type": "h2",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
Message content
|
||||
</p>,
|
||||
"className": "content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Message content",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Message content",
|
||||
"type": "p",
|
||||
},
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
"type": "div",
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
@@ -1,171 +1,23 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Metadata rendering 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <Metadata />,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": <title>
|
||||
Regexper
|
||||
</title>,
|
||||
"defer": true,
|
||||
"encodeSpecialCharacters": true,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Regexper",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Regexper",
|
||||
"type": "title",
|
||||
},
|
||||
"type": [Function],
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": <title>
|
||||
Regexper
|
||||
</title>,
|
||||
"defer": true,
|
||||
"encodeSpecialCharacters": true,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Regexper",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Regexper",
|
||||
"type": "title",
|
||||
},
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
<HelmetWrapper
|
||||
defer={true}
|
||||
encodeSpecialCharacters={true}
|
||||
>
|
||||
<title>
|
||||
Regexper
|
||||
</title>
|
||||
</HelmetWrapper>
|
||||
`;
|
||||
|
||||
exports[`Metadata rendering with a title 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <Metadata
|
||||
title="Testing"
|
||||
/>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": <title>
|
||||
Regexper - Testing
|
||||
</title>,
|
||||
"defer": true,
|
||||
"encodeSpecialCharacters": true,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Regexper - Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Regexper - Testing",
|
||||
"type": "title",
|
||||
},
|
||||
"type": [Function],
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": <title>
|
||||
Regexper - Testing
|
||||
</title>,
|
||||
"defer": true,
|
||||
"encodeSpecialCharacters": true,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "Regexper - Testing",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "Regexper - Testing",
|
||||
"type": "title",
|
||||
},
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
<HelmetWrapper
|
||||
defer={true}
|
||||
encodeSpecialCharacters={true}
|
||||
>
|
||||
<title>
|
||||
Regexper - Testing
|
||||
</title>
|
||||
</HelmetWrapper>
|
||||
`;
|
||||
|
||||
@@ -1,147 +1,7 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`SentryBoundary error handling 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <SentryBoundary>
|
||||
<Child />
|
||||
</SentryBoundary>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
exports[`SentryBoundary error handling 1`] = `<Child />`;
|
||||
|
||||
exports[`SentryBoundary error handling 2`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <SentryBoundary>
|
||||
<Child />
|
||||
</SentryBoundary>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {},
|
||||
"ref": null,
|
||||
"rendered": null,
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
exports[`SentryBoundary error handling 2`] = `<LoadNamespace(SentryError) />`;
|
||||
|
||||
exports[`SentryBoundary rendering 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <SentryBoundary>
|
||||
Example content
|
||||
</SentryBoundary>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): "Example content",
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
"Example content",
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
`;
|
||||
exports[`SentryBoundary rendering 1`] = `"Example content"`;
|
||||
|
||||
@@ -1,193 +1,21 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`SentryError rendering 1`] = `
|
||||
ShallowWrapper {
|
||||
Symbol(enzyme.__root__): [Circular],
|
||||
Symbol(enzyme.__unrendered__): <SentryError
|
||||
t={[Function]}
|
||||
/>,
|
||||
Symbol(enzyme.__renderer__): Object {
|
||||
"batchedUpdates": [Function],
|
||||
"getNode": [Function],
|
||||
"render": [Function],
|
||||
"simulateError": [Function],
|
||||
"simulateEvent": [Function],
|
||||
"unmount": [Function],
|
||||
},
|
||||
Symbol(enzyme.__node__): Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
This error has been logged. You may also
|
||||
<a
|
||||
href="#error-report"
|
||||
onClick={[Function]}
|
||||
>
|
||||
fill out a report
|
||||
</a>
|
||||
.
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</p>,
|
||||
"heading": "TRANSLATE(An error has occurred)",
|
||||
"type": "error",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <WithMergedOptions(TransComponent)>
|
||||
This error has been logged. You may also
|
||||
<a
|
||||
href="#error-report"
|
||||
onClick={[Function]}
|
||||
>
|
||||
fill out a report
|
||||
</a>
|
||||
.
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
"This error has been logged. You may also ",
|
||||
<a
|
||||
href="#error-report"
|
||||
onClick={[Function]}
|
||||
>
|
||||
fill out a report
|
||||
</a>,
|
||||
".",
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
"This error has been logged. You may also ",
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "fill out a report",
|
||||
"href": "#error-report",
|
||||
"onClick": [Function],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "fill out a report",
|
||||
"type": "a",
|
||||
},
|
||||
".",
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
"type": "p",
|
||||
},
|
||||
"type": [Function],
|
||||
},
|
||||
Symbol(enzyme.__nodes__): Array [
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "function",
|
||||
"props": Object {
|
||||
"children": <p>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
This error has been logged. You may also
|
||||
<a
|
||||
href="#error-report"
|
||||
onClick={[Function]}
|
||||
>
|
||||
fill out a report
|
||||
</a>
|
||||
.
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</p>,
|
||||
"heading": "TRANSLATE(An error has occurred)",
|
||||
"type": "error",
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": <WithMergedOptions(TransComponent)>
|
||||
This error has been logged. You may also
|
||||
<a
|
||||
href="#error-report"
|
||||
onClick={[Function]}
|
||||
>
|
||||
fill out a report
|
||||
</a>
|
||||
.
|
||||
</WithMergedOptions(TransComponent)>,
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "class",
|
||||
"props": Object {
|
||||
"children": Array [
|
||||
"This error has been logged. You may also ",
|
||||
<a
|
||||
href="#error-report"
|
||||
onClick={[Function]}
|
||||
>
|
||||
fill out a report
|
||||
</a>,
|
||||
".",
|
||||
],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": Array [
|
||||
"This error has been logged. You may also ",
|
||||
Object {
|
||||
"instance": null,
|
||||
"key": undefined,
|
||||
"nodeType": "host",
|
||||
"props": Object {
|
||||
"children": "fill out a report",
|
||||
"href": "#error-report",
|
||||
"onClick": [Function],
|
||||
},
|
||||
"ref": null,
|
||||
"rendered": "fill out a report",
|
||||
"type": "a",
|
||||
},
|
||||
".",
|
||||
],
|
||||
"type": [Function],
|
||||
},
|
||||
"type": "p",
|
||||
},
|
||||
"type": [Function],
|
||||
},
|
||||
],
|
||||
Symbol(enzyme.__options__): Object {
|
||||
"adapter": ReactSixteenAdapter {
|
||||
"options": Object {
|
||||
"enableComponentDidUpdateOnSetState": true,
|
||||
"lifecycles": Object {
|
||||
"componentDidUpdate": Object {
|
||||
"onSetState": true,
|
||||
},
|
||||
"getDerivedStateFromProps": true,
|
||||
"getSnapshotBeforeUpdate": true,
|
||||
"setState": Object {
|
||||
"skipsComponentDidUpdateOnNullish": true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
<Message
|
||||
heading="TRANSLATE(An error has occurred)"
|
||||
type="error"
|
||||
>
|
||||
<p>
|
||||
<WithMergedOptions(TransComponent)>
|
||||
This error has been logged. You may also
|
||||
<a
|
||||
href="#error-report"
|
||||
onClick={[Function]}
|
||||
>
|
||||
fill out a report
|
||||
</a>
|
||||
.
|
||||
</WithMergedOptions(TransComponent)>
|
||||
</p>
|
||||
</Message>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user