You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following test which is trying to click a button is inside a modal.
const selector = `button:contains("${buttonText}"), a:contains("${buttonText}")`;
const found = find(selector, Ember.$('body'));
assert.equal(1, found.length, `Should find the button or link with text "${buttonText}"`);
click(selector, Ember.$('body')); <--------- button click
found.click(); <--------------- does not work either
In the modal I have tried the following button types.
// (FAIL) If the button is an async button it does not fire the action at all
{{async-button class="btn btn-primary" type="button" action=(route-action 'save' model) default="Proceed" pending="Saving..."}}
// (SUCCESS) The same test but using a regular button and the action is fired
<button class="btn btn-primary" type="button" onclick={{route-action 'save' model}}>Proceed</button>
The button click fires without any errors in both cases so it is not like the button is not found.
The reason for passing a context to click and find is that without it QUnit was unable to find the control as it is rendered inside the application template.
The text was updated successfully, but these errors were encountered:
I have the following test which is trying to click a button is inside a modal.
In the modal I have tried the following button types.
The button click fires without any errors in both cases so it is not like the button is not found.
The reason for passing a context to
click
andfind
is that without it QUnit was unable to find the control as it is rendered inside the application template.The text was updated successfully, but these errors were encountered: