Skip to content

Commit

Permalink
rename instructions in apps tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamms committed Aug 6, 2018
1 parent d127796 commit 2aed19b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions apps/test/integration/levelSolutions/applab/cspunit3.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var levelDefinition = {
"definitionHighlight": false,
"definitionCollapse": false,
"disableExamples": false,
"instructions": "Draw a square ABOVE and to the RIGHT of the starting location. (Click to show full instructions)",
"shortInstructions": "Draw a square ABOVE and to the RIGHT of the starting location. (Click to show full instructions)",
"calloutJson": "[]",
"aniGifURL": "/script_assets/k_1_images/instruction_gifs/csp/U3L02-rightSquare.png",
"showTurtleBeforeRun": true,
Expand All @@ -48,7 +48,7 @@ var levelDefinition = {
"designModeAtStart": false,
"hideDesignMode": true,
"beginnerMode": false,
"markdownInstructions": "<img src=\"https://images.code.org/ad48e7224312a6c41f4fc5727af53cc0-image-1436287265071.png\" align=right> **Warm up 2:** Draw a 1 x 1 square to the front and right of the turtle as efficiently as possible. The program should stop with turtle in its original position, facing its original direction.\r\n\r\nWhen you're done click the Finish button to move onto the next problem.\r\n\r\n",
"longInstructions": "<img src=\"https://images.code.org/ad48e7224312a6c41f4fc5727af53cc0-image-1436287265071.png\" align=right> **Warm up 2:** Draw a 1 x 1 square to the front and right of the turtle as efficiently as possible. The program should stop with turtle in its original position, facing its original direction.\r\n\r\nWhen you're done click the Finish button to move onto the next problem.\r\n\r\n",
"puzzle_number": 3,
"stage_total": 7,
"lastAttempt": "",
Expand Down
4 changes: 2 additions & 2 deletions apps/test/unit/instructionsComponentsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('NonMarkdownInstructions', function () {
<div>
<NonMarkdownInstructions
puzzleTitle="title"
instructions="instructions"
shortInstructions="instructions"
/>
</div>
);
Expand All @@ -64,7 +64,7 @@ describe('NonMarkdownInstructions', function () {
<div>
<NonMarkdownInstructions
puzzleTitle="title"
instructions="instructions"
shortInstructions="instructions"
instructions2="instructions2"
/>
</div>
Expand Down
48 changes: 24 additions & 24 deletions apps/test/unit/instructionsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ describe('determineInstructionsConstants', () => {
const hasContainedLevels = false;
const overlayVisible = false;

it('sets longInstructions to markdownInstructions regardless of locale', () => {
it('sets longInstructions to markdown instructions regardless of locale', () => {
const locales = ['fr-fr', ENGLISH_LOCALE, undefined];
const results = locales.map(locale => determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: 'markdown',
shortInstructions: 'non-markdown',
longInstructions: 'markdown',
},
skin: {},
locale,
Expand All @@ -157,11 +157,11 @@ describe('determineInstructionsConstants', () => {
});
});

it('sets longInstructions to be non-markdown instructions if no markdownInstructions given', () => {
it('sets longInstructions to be non-markdown instructions if no markdown instructions given', () => {
const result = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: undefined,
shortInstructions: 'non-markdown',
longInstructions: undefined,
},
skin: {},
ENGLISH_LOCALE,
Expand All @@ -178,8 +178,8 @@ describe('determineInstructionsConstants', () => {
// only given non-markdown
const result = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: undefined,
shortInstructions: 'non-markdown',
longInstructions: undefined,
},
skin: {},
ENGLISH_LOCALE,
Expand All @@ -194,8 +194,8 @@ describe('determineInstructionsConstants', () => {
// only given markdown
const result2 = determineInstructionsConstants({
level: {
instructions: undefined,
markdownInstructions: 'markdown',
shortInstructions: undefined,
longInstructions: 'markdown',
},
skin: {},
ENGLISH_LOCALE,
Expand All @@ -210,8 +210,8 @@ describe('determineInstructionsConstants', () => {
// given both
const result3 = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: 'markdown',
shortInstructions: 'non-markdown',
longInstructions: 'markdown',
},
skin: {},
ENGLISH_LOCALE,
Expand All @@ -236,8 +236,8 @@ describe('determineInstructionsConstants', () => {
['en_us', undefined].forEach(locale => {
const result = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: 'markdown',
shortInstructions: 'non-markdown',
longInstructions: 'markdown',
},
skin: {},
locale,
Expand All @@ -263,8 +263,8 @@ describe('determineInstructionsConstants', () => {
it('does not set long instructions if non-english locale', () => {
const result = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: 'markdown',
shortInstructions: 'non-markdown',
longInstructions: 'markdown',
},
skin: {},
locale: 'fr-fr',
Expand All @@ -291,8 +291,8 @@ describe('determineInstructionsConstants', () => {
'showInstructionsInTopPane is true', () => {
const result = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: 'non-markdown',
shortInstructions: 'non-markdown',
longInstructions: 'non-markdown',
},
skin: {},
ENGLISH_LOCALE,
Expand All @@ -319,8 +319,8 @@ describe('determineInstructionsConstants', () => {
const inputOutputTable = [[15, 5], [20, 10]];
const result = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: undefined,
shortInstructions: 'non-markdown',
longInstructions: undefined,
inputOutputTable
},
skin: {},
Expand All @@ -334,8 +334,8 @@ describe('determineInstructionsConstants', () => {

const result2 = determineInstructionsConstants({
level: {
instructions: 'non-markdown',
markdownInstructions: 'markdown',
shortInstructions: 'non-markdown',
longInstructions: 'markdown',
inputOutputTable
},
skin: {},
Expand All @@ -351,9 +351,9 @@ describe('determineInstructionsConstants', () => {
it('substitutes images in instructions', () => {
const result = determineInstructionsConstants({
level: {
instructions: 'Instructions with [image1]',
shortInstructions: 'Instructions with [image1]',
instructions2: 'Instructions with [image2]',
markdownInstructions: undefined
longInstructions: undefined
},
skin: {
instructions2ImageSubstitutions: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe('DialogInstructions', () => {
expect(wrapper).to.containMatchingElement(
<Instructions
puzzleTitle={EXPECTED_PUZZLE_TITLE}
instructions={TEST_INSTRUCTIONS_1}
shortInstructions={TEST_INSTRUCTIONS_1}
instructions2={TEST_INSTRUCTIONS_2}
renderedMarkdown={undefined}
imgURL={SAMPLE_IMAGE_URL}
Expand All @@ -60,7 +60,7 @@ describe('DialogInstructions', () => {
expect(wrapper).to.containMatchingElement(
<Instructions
puzzleTitle={EXPECTED_PUZZLE_TITLE}
instructions={TEST_INSTRUCTIONS_1}
shortInstructions={TEST_INSTRUCTIONS_1}
instructions2={TEST_INSTRUCTIONS_2}
renderedMarkdown={SAMPLE_RENDERED_MARKDOWN}
imgURL={SAMPLE_IMAGE_URL}
Expand All @@ -79,7 +79,7 @@ describe('DialogInstructions', () => {
expect(wrapper).to.containMatchingElement(
<Instructions
puzzleTitle={EXPECTED_PUZZLE_TITLE}
instructions={undefined}
shortInstructions={undefined}
instructions2={undefined}
renderedMarkdown={undefined}
imgURL={SAMPLE_IMAGE_URL}
Expand All @@ -98,7 +98,7 @@ describe('DialogInstructions', () => {
expect(wrapper).to.containMatchingElement(
<Instructions
puzzleTitle={EXPECTED_PUZZLE_TITLE}
instructions={undefined}
shortInstructions={undefined}
instructions2={undefined}
renderedMarkdown={undefined}
imgURL={undefined}
Expand Down

0 comments on commit 2aed19b

Please sign in to comment.