siesta-lite
Version:
Stress-free JavaScript unit testing and functional testing tool, works in NodeJS and browsers
56 lines (44 loc) • 1.43 kB
JavaScript
StartTest(function(t) {
t.testSenchaTouch(function (t) {
var nameFld = new Ext.field.Text({
label : 'Name',
labelWidth : '50%'
});
var searchFld = new Ext.field.Search({
label : 'search',
labelWidth : '50%'
});
var checkbox = new Ext.field.Checkbox({
label : 'check',
labelWidth : '50%'
});
var button = new Ext.Button({
text : 'Button'
});
var panel = new Ext.Panel({
width : 300,
height : 300,
items : [
nameFld,
searchFld,
checkbox,
button
]
})
// t.firesOk(button, 'tap', 1)
t.chain(
{ tap : nameFld },
{ type : 'foo', target : nameFld },
{ tap : searchFld },
{ type : 'foo', target : searchFld },
{ tap : checkbox },
{ tap : button },
function(next) {
t.is(nameFld.getValue(), 'foo', 'textfield: Found typed text');
t.is(searchFld.getValue(), 'foo', 'searchfield: Found typed text');
// t.is(checkbox.getChecked(), true, 'Checkbox has been checked');
}
);
Ext.Viewport.add(panel);
})
});