{"id": "tse",
"buttonid": "TestingTour",
"title": "Testing extended",
"needsConnection" : true,
"needsProjectSetting" : true,
"needsTestingSetting" : true,
"slides":
[ {"title": "Testing expressions extended","description": "Variable types and set variables"},
  { "title":"Simple Application","description":"First, write a small application to change some values...",
    "attachTo":"#divcode",
    "source":"var a=0;\nvar b=2;\nvar t1 = setInterval(function(){\n  a+=b;\n  if(a>25) {\n    a = 0;\n    b++;\n  }\n},2000);\n","onHide":"sendEditor"},
  { "title": "Open the Testing window","description": "Click on &lt/&gt to the left of the terminal window.",
    "attachTo": "#icon-terminalTesting","position": "right","onHide": "clickAttached"},
  { "title": "Reset list of expressions","description":"Reset testing list to a startingpoint by dropping old entrys",
    "attachTo":"#testingExpressionClear","position":"right","onHide":"clickAttached"},
  { "title": "Set Name","description": "First assign the name that you will see in chart",
    "attachTo": "#testingLabel","position": "7","source": "a-value","onHide": "sendAttached"},
  { "title": "Set Expression","description": "Next assign an expression that you would like to observe",
    "attachTo": "#testingExpression","position": "7","source": "a","onHide": "sendAttached"},
  { "title": "Select type of variable","description": "Lastly, select the type of expression.<br>Number will shown as a line in the chart",
    "attachTo": "#testingType","position": "6","source":"number","onHide": "sendAttached"},
  { "title": "Add to expression list","description": "Click on this button to add the new expression.",
    "attachTo": "#testingAdd","position": "bottom","onHide": "clickAttached"},
  { "title": "Remove old expressions","description": "Any expressions that you don't need any more...",
    "attachTo": ".dropDataPoint","position": "7","onHide":"clickAttached"},
  { "title": "Remove old expressions","description": "And remove one more...",
    "attachTo": ".dropDataPoint","position": "7","onHide":"clickAttached"},
  { "title": "Set Name","description": "Assign a name for a second value",
    "attachTo": "#testingLabel","position": "7","source": "b-text","onHide": "sendAttached"},
  { "title": "Set Expression","description": "Assign an expression for a 2nd value",
    "attachTo": "#testingExpression","position": "7","source": "b","onHide": "sendAttached"},
  { "title": "Select type of variable","description": "Select the type of expression.<br>Text will show a point on each change, and will show data when you move the mouse over it",
    "attachTo": "#testingType","position": "6","source":"text","onHide": "sendAttached"},
  { "title": "Add to expression list","description": "Click on this button to add the new expression.",
    "attachTo": "#testingAdd","position": "bottom","onHide": "clickAttached"},
  { "title": "Set Name","description": "Assign a name for a third value",
    "attachTo": "#testingLabel","position": "7","source": "b-value","onHide": "sendAttached"},
  { "title": "Set Expression","description": "Assign an expression for a 3rd value",
    "attachTo": "#testingExpression","position": "7","source": "b","onHide": "sendAttached"},
  { "title": "Select type of variable","description": "Select the type of expression...",
    "attachTo": "#testingType","position": "6","source":"number","onHide": "sendAttached"},
  { "title": "Add to expression list","description": "Add the 3rd Expression...",
    "attachTo": "#testingAdd","position": "bottom","onHide": "clickAttached"},
  { "title": "Add action","description":"Now lets add an action"},
  { "title": "Reset actionlist","description":"Reset action list to a startingpoint by dropping old entrys",
    "attachTo":"#testingSetClear","position":"right","onHide":"clickAttached"},
  { "title": "Set Name","description":"Assign a name for the action",
    "attachTo":"#actionName","position":"11","source":"b-action","onHide": "sendAttached"},    
  { "title": "Set Expression","description":"Assign a JavaScript expression for the action",
    "attachTo":"#actionExpression","position":"11","source":"b","onHide": "sendAttached"},
  { "title":"Add to Actions","description":"Finally, add the action as a simple assignment",
    "attachTo":"#testingAddNumber","position":"1","onHide":"clickAttached"},
  { "title":"Send source","description":"Send the test application to the board",
    "attachTo":"#icon-deploy","position":"left","onHide":"clickAttached"},    
  { "title": "Start fetching expressions","description": "Click on the run button to start testing. Values update once a second so it'll take a few seconds to see the results.",
    "attachTo": "#testingExpressionRun","onHide": "clickAttached","position": "bottom"},
  { "title": "Wait","description":"Watch the chart change for a few seconds..."},
  { "title": "Action","description":"Assign a new value to the action expression...<br>Lets change the expression <b>b</b> to 1",
    "attachTo":"#b-action_input","position":"right","source":"1","onHide":"sendAttached"},
  { "title": "Assign value", "description":"Assign the value to variable b on Espruino",
    "attachTo": ".executeActionPoint","position":"right","onHide":"clickAttached"},
  { "title": "Wait","description":"Now you can see the changes in the chart..."},
  { "title": "Stop fetching expressions","description": "Finally, click to stop refreshing the chart...",
    "attachTo": "#testingExpressionStop","onHide": "clickAttached","position": "bottom"},
  { "title": "Switch back to the terminal","description": "And switch back to Terminal mode.",
    "attachTo": "#icon-terminalTesting","onHide": "clickAttached","position": "right"},
  { "title": "All Done","description": "That's it!"}
]
}