Last active
September 9, 2019 09:04
-
-
Save klodoma/500b3aa7f544f0fd0adba64af8867ac7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
StartTest(function (t) { | |
let view = Ext.create({ | |
xtype: 'list', | |
itemTpl: '{title}', | |
plugins: [{ | |
type: 'pullrefresh', | |
mergeData: false | |
}, { | |
type: 'listpaging', | |
autoPaging: true | |
}, { | |
type: 'listswiper', | |
defaults: { | |
ui: 'action' | |
}, | |
left: [{ | |
iconCls: 'x-fa fa-phone', | |
text: 'Call', | |
commit: 'onCall' | |
}], | |
right: [{ | |
iconCls: 'x-fa fa-envelope', | |
ui: 'alt confirm', | |
text: 'Message', | |
commit: 'onMessage' | |
}, { | |
iconCls: 'x-fa fa-gear', | |
text: 'Gear', | |
commit: 'onGear' | |
}] | |
}], | |
data: [ | |
{ title: 'Item 1' }, | |
{ title: 'Item 2' }, | |
{ title: 'Item 3' }, | |
{ title: 'Item 4' } | |
] | |
}); | |
Ext.Viewport.add(view); | |
t.pass('View could be rendered'); | |
t.chain({ | |
waitForEvent: [view, 'childtap'], | |
trigger: { click: '.x-listitem:contains(Item 2)' } | |
},{ | |
waitForEvent: [view, 'childdoubletap'], | |
trigger: { doubleClick: '.x-listitem:contains(Item 2)' } | |
},{ | |
waitForEvent: [view, 'childdoubletap'], | |
trigger: { doubleTap: '.x-listitem:contains(Item 2)' }, | |
timeout: 1000 | |
},{ | |
waitForEvent: [view, 'childlongpress'], | |
trigger: { longPress: '.x-listitem:contains(Item 2)' }, | |
timeout: 1000 | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment