-
-
Notifications
You must be signed in to change notification settings - Fork 261
Open
Description
The current behavior of the click
helper is to throw an error "Can not click disabled element" when trying to do so.
The problem is that clicking on a disabled element is something that a user is perfectly capable of doing. Simulating this behavior in an acceptance test should not be punished.
When I make my test click a disabled button, I expect the test not to crash. I expect the test to proceed and to assert that nothing has changed.
Instead of clicking a disabled element, @ember/test-helpers
forces me into asserting that the element contains the disabled
attribute. This has two problems:
- It's not the same thing. Asserting for an element's attribute does not guarantee lack of behavior on click.
- The Cucumber BDD framework has a test matrix feature (aka
Examples
akaWhere
) which is intentionally limited: it does not have loops and conditionals for the sake of simplicity and readability. The fact that I need to use a different assertion depending on whether the button is disabled or not — makes it impossible to put it into a Cucumber test matrix.
lifeart, antonbavykin1991, A6Brgeuka, SergeAstapov, 22a and 3 more
Metadata
Metadata
Assignees
Labels
No labels