Skip to content

Commit 3d2b3dd

Browse files
committed
fix: update Jest snapshots for TinyMceWidget to reflect component changes
1 parent e681d82 commit 3d2b3dd

1 file changed

Lines changed: 173 additions & 73 deletions

File tree

Lines changed: 173 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,65 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`TinyMceWidget snapshots ImageUploadModal is not rendered 1`] = `
4-
<[object Object]
5-
value={
6-
{
7-
"store": {
8-
"dispatch": [Function],
9-
"getState": [Function],
10-
"replaceReducer": [Function],
11-
"subscribe": [Function],
12-
Symbol(Symbol.observable): [Function],
13-
},
14-
"subscription": {
15-
"addNestedSub": [Function],
16-
"getListeners": [Function],
17-
"handleChangeWrapper": [Function],
18-
"isSubscribed": [Function],
19-
"notifyNestedSubs": [Function],
20-
"trySubscribe": [Function],
21-
"tryUnsubscribe": [Function],
22-
},
23-
}
24-
}
25-
>
26-
<TinyMceWidget
27-
disabled={false}
4+
<Fragment>
5+
<SourceCodeModal
6+
close={[MockFunction modal.closeModal]}
287
editorRef={
298
{
309
"current": {
3110
"value": "something",
3211
},
3312
}
3413
}
35-
editorType="text"
36-
enableImageUpload={false}
37-
id="sOMeiD"
38-
images={
14+
isOpen={false}
15+
/>
16+
<Editor
17+
disabled={false}
18+
editorConfig={
3919
{
40-
"sOmEaSsET": {
41-
"staTICUrl": "/assets/sOmEaSsET",
20+
"clearSelection": [MockFunction hooks.selectedImage.clearSelection],
21+
"content": undefined,
22+
"editorContentHtml": undefined,
23+
"editorRef": {
24+
"current": {
25+
"value": "something",
26+
},
4227
},
28+
"editorType": "text",
29+
"enableImageUpload": false,
30+
"images": {
31+
"current": [
32+
{
33+
"externalUrl": "/assets/sOmEaSsET",
34+
},
35+
],
36+
},
37+
"initializeEditor": undefined,
38+
"learningContextId": "course+org+run",
39+
"lmsEndpointUrl": "sOmEvaLue.cOm",
40+
"minHeight": undefined,
41+
"openImgModal": [MockFunction modal.openModal],
42+
"openSourceCodeModal": [MockFunction modal.openModal],
43+
"placeholder": undefined,
44+
"selection": "hooks.selectedImage.selection",
45+
"setEditorRef": undefined,
46+
"setSelection": [MockFunction hooks.selectedImage.setSelection],
47+
"staticRootUrl": undefined,
48+
"studioEndpointUrl": "sOmEoThERvaLue.cOm",
49+
"updateContent": [Function],
4350
}
4451
}
45-
isLibrary={false}
46-
learningContextId="course+org+run"
47-
lmsEndpointUrl="sOmEvaLue.cOm"
48-
onChange={[Function]}
49-
studioEndpointUrl="sOmEoThERvaLue.cOm"
50-
updateContent={[Function]}
52+
id="sOMeiD"
53+
onEditorChange={[Function]}
5154
/>
52-
</[object Object]>
55+
</Fragment>
5356
`;
5457

5558
exports[`TinyMceWidget snapshots SourcecodeModal is not rendered 1`] = `
56-
<[object Object]
57-
value={
58-
{
59-
"store": {
60-
"dispatch": [Function],
61-
"getState": [Function],
62-
"replaceReducer": [Function],
63-
"subscribe": [Function],
64-
Symbol(Symbol.observable): [Function],
65-
},
66-
"subscription": {
67-
"addNestedSub": [Function],
68-
"getListeners": [Function],
69-
"handleChangeWrapper": [Function],
70-
"isSubscribed": [Function],
71-
"notifyNestedSubs": [Function],
72-
"trySubscribe": [Function],
73-
"tryUnsubscribe": [Function],
74-
},
75-
}
76-
}
77-
>
78-
<TinyMceWidget
79-
disabled={false}
59+
<Fragment>
60+
<ImageUploadModal
61+
clearSelection={[MockFunction hooks.selectedImage.clearSelection]}
62+
close={[MockFunction modal.closeModal]}
8063
editorRef={
8164
{
8265
"current": {
@@ -85,23 +68,140 @@ exports[`TinyMceWidget snapshots SourcecodeModal is not rendered 1`] = `
8568
}
8669
}
8770
editorType="problem"
88-
enableImageUpload={true}
89-
id="sOMeiD"
9071
images={
9172
{
92-
"sOmEaSsET": {
93-
"staTICUrl": "/assets/sOmEaSsET",
73+
"current": [
74+
{
75+
"externalUrl": "/assets/sOmEaSsET",
76+
},
77+
],
78+
}
79+
}
80+
isLibrary={true}
81+
isOpen={false}
82+
lmsEndpointUrl="http://localhost:18000"
83+
selection="hooks.selectedImage.selection"
84+
setSelection={[MockFunction hooks.selectedImage.setSelection]}
85+
/>
86+
<Editor
87+
disabled={false}
88+
editorConfig={
89+
{
90+
"clearSelection": [MockFunction hooks.selectedImage.clearSelection],
91+
"content": undefined,
92+
"editorContentHtml": undefined,
93+
"editorRef": {
94+
"current": {
95+
"value": "something",
96+
},
97+
},
98+
"editorType": "problem",
99+
"enableImageUpload": true,
100+
"images": {
101+
"current": [
102+
{
103+
"externalUrl": "/assets/sOmEaSsET",
104+
},
105+
],
94106
},
107+
"initializeEditor": undefined,
108+
"learningContextId": "course+org+run",
109+
"lmsEndpointUrl": "sOmEvaLue.cOm",
110+
"minHeight": undefined,
111+
"openImgModal": [MockFunction modal.openModal],
112+
"openSourceCodeModal": [MockFunction modal.openModal],
113+
"placeholder": undefined,
114+
"selection": "hooks.selectedImage.selection",
115+
"setEditorRef": undefined,
116+
"setSelection": [MockFunction hooks.selectedImage.setSelection],
117+
"staticRootUrl": undefined,
118+
"studioEndpointUrl": "sOmEoThERvaLue.cOm",
119+
"updateContent": [Function],
95120
}
96121
}
97-
isLibrary={false}
98-
learningContextId="course+org+run"
99-
lmsEndpointUrl="sOmEvaLue.cOm"
100-
onChange={[Function]}
101-
studioEndpointUrl="sOmEoThERvaLue.cOm"
102-
updateContent={[Function]}
122+
id="sOMeiD"
123+
onEditorChange={[Function]}
103124
/>
104-
</[object Object]>
125+
</Fragment>
105126
`;
106127

107-
exports[`TinyMceWidget snapshots renders as expected with default behavior 1`] = `undefined`;
128+
exports[`TinyMceWidget snapshots renders as expected with default behavior 1`] = `
129+
<Fragment>
130+
<ImageUploadModal
131+
clearSelection={[MockFunction hooks.selectedImage.clearSelection]}
132+
close={[MockFunction modal.closeModal]}
133+
editorRef={
134+
{
135+
"current": {
136+
"value": "something",
137+
},
138+
}
139+
}
140+
editorType="text"
141+
images={
142+
{
143+
"current": [
144+
{
145+
"externalUrl": "/assets/sOmEaSsET",
146+
},
147+
],
148+
}
149+
}
150+
isLibrary={true}
151+
isOpen={false}
152+
lmsEndpointUrl="http://localhost:18000"
153+
selection="hooks.selectedImage.selection"
154+
setSelection={[MockFunction hooks.selectedImage.setSelection]}
155+
/>
156+
<SourceCodeModal
157+
close={[MockFunction modal.closeModal]}
158+
editorRef={
159+
{
160+
"current": {
161+
"value": "something",
162+
},
163+
}
164+
}
165+
isOpen={false}
166+
/>
167+
<Editor
168+
disabled={false}
169+
editorConfig={
170+
{
171+
"clearSelection": [MockFunction hooks.selectedImage.clearSelection],
172+
"content": undefined,
173+
"editorContentHtml": undefined,
174+
"editorRef": {
175+
"current": {
176+
"value": "something",
177+
},
178+
},
179+
"editorType": "text",
180+
"enableImageUpload": true,
181+
"images": {
182+
"current": [
183+
{
184+
"externalUrl": "/assets/sOmEaSsET",
185+
},
186+
],
187+
},
188+
"initializeEditor": undefined,
189+
"learningContextId": "course+org+run",
190+
"lmsEndpointUrl": "sOmEvaLue.cOm",
191+
"minHeight": undefined,
192+
"openImgModal": [MockFunction modal.openModal],
193+
"openSourceCodeModal": [MockFunction modal.openModal],
194+
"placeholder": undefined,
195+
"selection": "hooks.selectedImage.selection",
196+
"setEditorRef": undefined,
197+
"setSelection": [MockFunction hooks.selectedImage.setSelection],
198+
"staticRootUrl": undefined,
199+
"studioEndpointUrl": "sOmEoThERvaLue.cOm",
200+
"updateContent": [Function],
201+
}
202+
}
203+
id="sOMeiD"
204+
onEditorChange={[Function]}
205+
/>
206+
</Fragment>
207+
`;

0 commit comments

Comments
 (0)