`click()` helper is not reliable
See original GitHub issue// in my new ember acceptance tests
await click('[data-test-username-button]');
assert.equal(currentURL(), '/izelnakri'); // this doesn't pass!
click helper doesnt wait for url transition. It could be either due to fact that ember click selector ignore attribute selectors [data-test-username-button] or its waiter is simply buggy.
Unfortunately I already removed a branch in my project where I was refactoring my application tests one by one to new ember application test/qunit modules. I succeeded with unit + integration tests but failed on application tests.
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
[SOLVED] Cannot run acceptance tests 'click' helper not defined
My issue is very similar to ReferenceError: andThen is not defined in that when trying to follow the emberjs.com tutorial and going through ......
Read more >EmberJS - Click() helper doesn't work as expected
I'm trying to write a simple acceptance test where an element with an id and an href gets clicked and the URL changes,...
Read more >click not working - Data Queries & Synthetic Scripts
I am trying to click on SET APPOINTMENT. Once clicked it should take to next page but that is not happening. Below is...
Read more >WebDriver - click on non-clickable element - Cookbook
So we had to find a workaround and what we found out is good way to click on non-clickable element, so we created...
Read more >jQuery .click(function(e){} not working on lightning component
Just for the record, this issue was happening due to JQuery version. I was using 1.11.3 and according to this post, it has...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will add my two cents here, however, I believe this is more of a problem with
settled()
than it is click.I have a
link-to
component which transitions routes, and theclick
(settled) is returning control to the test between model and afterModel.I tried to create an ember-twiddle to show my problem, however, twiddle is not properly loading the visit function from @ember/test-helpers
templates/my-route.hbs
routes/failing-route/view.js
tests/acceptance/failing-route-test.js
If I change the model hook to return the model directly, or return Promise.resolve(model) the test passes. Otherwise, it fails.
You people still have this issue? @Turbo87 @rwjblue the Ember Twiddle posted by @raphaelns-developer reproduces the issue.