|
| 1 | +angular.scenarioDef.widgets = { |
| 2 | + $before:[ |
| 3 | + {Given:"browser", at:"widgets.html"} |
| 4 | + ], |
| 5 | + checkWidgetBinding:[ |
| 6 | + {Then:"text", at:"{{name}}", should_be:""}, |
| 7 | + {When:"enter", text:"John", at:":input[name=name]"}, |
| 8 | + {Then:"text", at:"{{name}}", should_be:"John"}, |
| 9 | + |
| 10 | + {Then:"text", at:"{{gender}}", should_be:""}, |
| 11 | + {When:"click", at:"input:radio[value=male]"}, |
| 12 | + {Then:"text", at:"{{gender}}", should_be:"male"}, |
| 13 | + |
| 14 | + {Then:"text", at:"{{tea}}", should_be:"on"}, |
| 15 | + {When:"click", at:"input[name=tea]"}, |
| 16 | + {Then:"text", at:"{{tea}}", should_be:""}, |
| 17 | + |
| 18 | + {Then:"text", at:"{{coffee}}", should_be:""}, |
| 19 | + {When:"click", at:"input[name=coffee]"}, |
| 20 | + {Then:"text", at:"{{coffee}}", should_be:"on"}, |
| 21 | + |
| 22 | + {Then:"text", at:"{{count}}", should_be:0}, |
| 23 | + {When:"click", at:"form :button"}, |
| 24 | + {When:"click", at:"form :submit"}, |
| 25 | + {When:"click", at:"form :image"}, |
| 26 | + {Then:"text", at:"{{count}}", should_be:3}, |
| 27 | + |
| 28 | + {Then:"text", at:"{{select}}", should_be:"A"}, |
| 29 | + {When:"select", at:"select[name=select]", option:"B"}, |
| 30 | + {Then:"text", at:"{{select}}", should_be:"B"}, |
| 31 | + |
| 32 | + {Then:"text", at:"{{multiple}}", should_be:"[]"}, |
| 33 | + {When:"select", at:"select[name=multiple]", option:"A"}, |
| 34 | + {Then:"text", at:"{{multiple}}", should_be:["A"]}, |
| 35 | + {When:"select", at:"select[name=multiple]", option:"B"}, |
| 36 | + {Then:"text", at:"{{multiple}}", should_be:["A", "B"]}, |
| 37 | + {When:"select", at:"select[name=multiple]", option:"A"}, |
| 38 | + {Then:"text", at:"{{multiple}}", should_be:["B"]}, |
| 39 | + |
| 40 | + {Then:"text", at:"{{hidden}}", should_be:"hiddenValue"}, |
| 41 | + |
| 42 | + {Then:"text", at:"{{password}}", should_be:"passwordValue"}, |
| 43 | + {When:"enter", text:"reset", at:":input[name=password]"}, |
| 44 | + {Then:"text", at:"{{password}}", should_be:"reset"}, |
| 45 | + ], |
| 46 | + checkNewWidgetEmpty:[ |
| 47 | + {Then:"text", at:"{{name}}", should_be:""}, |
| 48 | + ] |
| 49 | +}; |
0 commit comments