ember.js - Click not working in Ember-CLI integration test with PhantomJS -


i'm trying click button in ember-cli integration test, , works chrome, tells me click undefined in phantomjs. i've seen other posts recommend defining own click event phantomjs, couldn't work.

$("a:contains('next'):visible")[0].click(); 

that works in chrome, not phantomjs. built in click helper, in ember-cli, appears not work "a:contains('next'):visible".

can help?

update:

i talked guys on ember-cli irc , got selectors work ember click helper in tests, clicks appear nothing. ideas?

test("tour next, back, , cancel builtinbuttons work", function(assert) { assert.expect(6); visit('/').then(function() {   assert.equal(find('.shepherd-active', 'html').length, 1, "body gets class of shepherd-active, when shepherd becomes active");   assert.equal(find('.shepherd-enabled', 'body').length, 2, "attachto element , tour shepherd-enabled class");   assert.equal(find('#shepherdoverlay', 'body').length, 1, "#shepherdoverlay should exist, since ismodal=true");   click('.next-button', '.shepherd-enabled');   andthen(function() {     assert.equal(find('.back-button', '.shepherd-enabled').length, 1, "ensure button appears");   });   click('.back-button', '.shepherd-enabled');   andthen(function() {     assert.equal(find('.back-button', '.shepherd-enabled').length, 0, "ensure button disappears");   });   click('.cancel-button', '.shepherd-enabled');   andthen(function() {     assert.equal(find('[class^=shepherd-button]', '.shepherd-enabled').length, 0, "ensure buttons gone, after exit");   });   }); }); 


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -