Disabled/Not Enabled validation rule doesn't work/exist
icnocop opened this issue · comments
Hi.
The Verifying Steps wiki page indicates the rule "Disabled", "Not Enabled", and "Is Not Enabled", but trying to use that rule always passes validation.
That rule doesn't exist in the code, contrary to the documentation.
I expected the Disabled/Not Enabled/Is Not Enabled rule to exist.
I also expected that if a rule doesn't exist, then SpecBind should fail.
For example,
In .\src\SpecBind.Selenium.IntegrationTests\Features\NavigationTests.feature
, add another validation rule as follows and run the test:
Scenario: Navigate to Google
Given I navigated to the Google Home page
Then I see
| Field | Rule | Value |
| Search Box | Is Enabled | True |
| Search Box | blah | |
Notice that the test doesn't fail.
The Verifying Steps wiki page should also indicate what should be passed in the Value
field for the Enabled and Disabled rules.
For example, passing a value of True
for the Enabled
rule will validate that the field is enabled.
Passing a value of False
for the Enabled
rule will validate that the field is disabled.
Also, when using the Selenium driver, the documentation should indicate that the Enabled/Disabled rules will currently only work for input elements and radio buttons.
See https://stackoverflow.com/a/26212504/90287
Thank you.
OK I'm adding not enabled in, throwing an exception if the rule does not exist and from now SpecBind will ignore values provided to Enabled/Disabled rules similar to Exists. I'll update documentation to reflect exceptions, value changes and make a note about input elements.