Skip to content

Commit

Permalink
Merge pull request #20690 from code-dot-org/artist-jump-integration-test
Browse files Browse the repository at this point in the history
Add an integration test for "jump forward" in Artist
  • Loading branch information
joshlory committed Feb 26, 2018
2 parents 3f04a09 + c0e4642 commit 984d2f5
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions apps/test/integration/levelSolutions/turtle/1_1.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,49 @@ module.exports = {
solution +
'</xml>'
},
{
description: "Solution using more than the ideal number of blocks",
expected: {
result: true,
testResult: TestResults.TOO_MANY_BLOCKS_FAIL
},
missingBlocks: [],
xml:
`<xml>
<block type="when_run">
<next>
<block type="jump_by_constant_dropdown">
<title name="DIR">jumpBackward</title>
<title name="VALUE">50</title>
<next>
<block type="jump_by_constant_dropdown">
<title name="DIR">jumpForward</title>
<title name="VALUE">50</title>
<next>
<block type="draw_move_by_constant">
<title name="DIR">moveForward</title>
<title name="VALUE">100</title>
<next>
<block type="draw_turn_by_constant_restricted">
<title name="DIR">turnRight</title>
<title name="VALUE">90</title>
<next>
<block type="draw_move_by_constant">
<title name="DIR">moveForward</title>
<title name="VALUE">100</title>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</next>
</block>
</xml>`
},
{
description: "User doesnt add any blocks. Should fail.",
expected: {
Expand Down

0 comments on commit 984d2f5

Please sign in to comment.