Sencha Test 2.1
Is there a bug regarding the use of hasCls within an expect?
Lets say I have something like:
this.component().gotoButton('[text=See]').gotoComponent('menucheckitem[text=some text]')
.and(function (el) {
el.hasCls('x-menu-item-checked'); //this works correctly, validates the el has the class and returns a timeout if the el doesn't actually have the class
expect(el.hasCls('x-menu-item-checked')).toBe(true); // but doing this throws a nasty error, see the detail below
});
(although in this case it's a component not an element same thing happens with elements)
So I've tried referencing different elements and always that I try to do:
expect(el.hasClass('some')).toBe(true);
I get this error, wonder if I'm missing something or this is a bug.
I see in the docs that this should be possible. http://docs.sencha.com/sencha_test/2.1.0/api/ST.future.Element.html?#method-and
Expected constructor({ context: constructor({ breakOnFailure: false, evaluateTestsOnReady: true, eventDelay: 500, eventTranslation: true, failOnMultipleMatches: true, globals: Object({ speechSynthesis: true, caches: true, localStorage: true, sessionStorage: true, webkitStorageInfo: true, indexedDB: true, webkitIndexedDB: true, ondeviceorientationabsolute: true, ondeviceorientation: true, ondevicemotion: true, crypto: true, postMessage: true, blur: true, focus: true, close: true, stop: true, open: true, alert: true, applicationCache: true, performance: true, confirm: true, onunload: true, onunhandledrejection: true, onstorage: true, prompt: true, onrejectionhandled: true, onpopstate: true, onpageshow: true, print: true, onpagehide: true, ononline: true, onoffline: true, requestAnimationFrame: true, onmessage: true, onlanguagechange: true, onhashchange: true, cancelAnimationFrame: true, onbeforeunload: true, onwaiting: true, onvolumechange: true, captureEvents: true, ontoggle: true, ontimeupdate: true, onsuspend: true, releaseEvents: true, onsubmit: true, onstalled: true, onshow: true, getComputedStyle: true, onselect: true, onseeking: true, onseeked: true, matchMedia: true, onscroll: true, onresize: true, moveTo: true, onreset: true, onratechange: true, onprogress: true, moveBy: true, onplaying: true, onplay: true, onpause: true, onmousewheel: true, resizeTo: true, onmouseup: true, onmouseover: true, resizeBy: true, onmouseout: true, onmousemove: true, onmouseleave: true, onmouseenter: true, getSelection: true, onmousedown: true, onloadstart: true, onloadedmetadata: true, find: true, onloadeddata: true, onload: true, getMatchedCSSRules: true, onkeyup: true, onkeypress: true, onkeydown: true, webkitRequestAnimationFrame: true, oninvalid: true, oninput: true, onfocus: true, onerror: true, webkitCancelAnimationFrame: true, onended: true, onemptied: true, webkitCancelRequestAnimationFrame: true, onduratio ...