Skip to content

Commit 6c87af5

Browse files
committed
fix(inline-dropdown): updated snapshot PD-4065
1 parent 500e113 commit 6c87af5

2 files changed

Lines changed: 25 additions & 54 deletions

File tree

packages/inline-dropdown/configure/src/__tests__/__snapshots__/main.test.jsx.snap

Lines changed: 5 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -267,16 +267,7 @@ exports[`Main snapshot renders with teacher instructions, prompt and rationale e
267267
>
268268
<EditableHtml
269269
allowValidation={false}
270-
languageCharactersProps={
271-
Array [
272-
Object {
273-
"language": "spanish",
274-
},
275-
Object {
276-
"language": "special",
277-
},
278-
]
279-
}
270+
languageCharactersProps={Array []}
280271
markup=""
281272
mathMlOptions={
282273
Object {
@@ -321,16 +312,7 @@ exports[`Main snapshot renders with teacher instructions, prompt and rationale e
321312
<EditableHtml
322313
allowValidation={false}
323314
disableUnderline={true}
324-
languageCharactersProps={
325-
Array [
326-
Object {
327-
"language": "spanish",
328-
},
329-
Object {
330-
"language": "special",
331-
},
332-
]
333-
}
315+
languageCharactersProps={Array []}
334316
markup="Use the dropdowns to complete the sentence"
335317
mathMlOptions={
336318
Object {
@@ -424,16 +406,7 @@ There should be at most 10 choices defined per response area."
424406
disableImageAlignmentButtons={true}
425407
disabled={false}
426408
highlightShape={false}
427-
languageCharactersProps={
428-
Array [
429-
Object {
430-
"language": "spanish",
431-
},
432-
Object {
433-
"language": "special",
434-
},
435-
]
436-
}
409+
languageCharactersProps={Array []}
437410
markup="<div><p>The <span data-type=\\"inline_dropdown\\" data-index=\\"0\\" data-value=\\"cow\\"></span> jumped <span data-type=\\"inline_dropdown\\" data-index=\\"1\\" data-value=\\"over\\"></span> the <span data-type=\\"inline_dropdown\\" data-index=\\"2\\" data-value=\\"moon\\"></span></p></div>"
438411
mathMlOptions={
439412
Object {
@@ -772,16 +745,7 @@ There should be at most 10 choices defined per response area."
772745
>
773746
<EditableHtml
774747
allowValidation={false}
775-
languageCharactersProps={
776-
Array [
777-
Object {
778-
"language": "spanish",
779-
},
780-
Object {
781-
"language": "special",
782-
},
783-
]
784-
}
748+
languageCharactersProps={Array []}
785749
markup=""
786750
mathMlOptions={
787751
Object {
@@ -1143,16 +1107,7 @@ There should be at most 10 choices defined per response area."
11431107
disableImageAlignmentButtons={true}
11441108
disabled={false}
11451109
highlightShape={false}
1146-
languageCharactersProps={
1147-
Array [
1148-
Object {
1149-
"language": "spanish",
1150-
},
1151-
Object {
1152-
"language": "special",
1153-
},
1154-
]
1155-
}
1110+
languageCharactersProps={Array []}
11561111
markup="<div><p>The <span data-type=\\"inline_dropdown\\" data-index=\\"0\\" data-value=\\"cow\\"></span> jumped <span data-type=\\"inline_dropdown\\" data-index=\\"1\\" data-value=\\"over\\"></span> the <span data-type=\\"inline_dropdown\\" data-index=\\"2\\" data-value=\\"moon\\"></span></p></div>"
11571112
mathMlOptions={
11581113
Object {

packages/inline-dropdown/configure/src/main.jsx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,11 @@ export class Main extends React.Component {
469469
maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}
470470
maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}
471471
uploadSoundSupport={uploadSoundSupport}
472-
languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
472+
languageCharactersProps={
473+
getPluginProps(teacherInstructions?.inputConfiguration).languageCharacters?.disabled
474+
? [{ language: 'spanish' }, { language: 'special' }]
475+
: []
476+
}
473477
mathMlOptions={mathMlOptions}
474478
/>
475479
{teacherInstructionsError && <div className={classes.errorText}>{teacherInstructionsError}</div>}
@@ -492,7 +496,11 @@ export class Main extends React.Component {
492496
maxImageWidth={defaultImageMaxWidth}
493497
maxImageHeight={defaultImageMaxHeight}
494498
uploadSoundSupport={uploadSoundSupport}
495-
languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
499+
languageCharactersProps={
500+
getPluginProps(prompt?.inputConfiguration).languageCharacters?.disabled
501+
? [{ language: 'spanish' }, { language: 'special' }]
502+
: []
503+
}
496504
mathMlOptions={mathMlOptions}
497505
/>
498506
{promptError && <div className={classes.errorText}>{promptError}</div>}
@@ -557,7 +565,11 @@ export class Main extends React.Component {
557565
highlightShape={false}
558566
error={responseAreasError}
559567
uploadSoundSupport={uploadSoundSupport}
560-
languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
568+
languageCharactersProps={
569+
getPluginProps(template?.inputConfiguration).languageCharacters?.disabled
570+
? [{ language: 'spanish' }, { language: 'special' }]
571+
: []
572+
}
561573
mathMlOptions={mathMlOptions}
562574
/>
563575
{responseAreasError && <div className={classes.errorText}>{responseAreasError}</div>}
@@ -580,7 +592,11 @@ export class Main extends React.Component {
580592
maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}
581593
maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}
582594
uploadSoundSupport={uploadSoundSupport}
583-
languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}
595+
languageCharactersProps={
596+
getPluginProps(rationale?.inputConfiguration).languageCharacters?.disabled
597+
? [{ language: 'spanish' }, { language: 'special' }]
598+
: []
599+
}
584600
mathMlOptions={mathMlOptions}
585601
/>
586602
{rationaleError && <div className={classes.errorText}>{rationaleError}</div>}

0 commit comments

Comments
 (0)