1 |
efrain |
1 |
@javascript @theme_boost
|
|
|
2 |
Feature: Form errors only display after submit or change in Boost theme
|
|
|
3 |
In order to have a more accessible way to display form errors
|
|
|
4 |
As anyone
|
|
|
5 |
I need to see errors only after I submit the form or change a field
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname |
|
|
|
10 |
| Course 1 | C1 |
|
|
|
11 |
|
|
|
12 |
Scenario: Form error appears after submit, but not after just tabbing through
|
|
|
13 |
When I log in as "admin"
|
|
|
14 |
And I navigate to "Courses > Add a new course" in site administration
|
|
|
15 |
And I click on "Course full name" "field"
|
|
|
16 |
And I press the tab key
|
|
|
17 |
Then I should not see "Missing full name"
|
|
|
18 |
And I press "Save and display"
|
|
|
19 |
And I should see "Missing full name"
|
|
|
20 |
And the focused element is "Course full name" "field"
|
|
|
21 |
|
|
|
22 |
Scenario: Form error appears immediately after change
|
|
|
23 |
When I am on the "C1" "course editing" page logged in as "admin"
|
|
|
24 |
And I set the field "Course full name" to ""
|
|
|
25 |
And I press the tab key
|
|
|
26 |
Then I should see "Missing full name"
|
|
|
27 |
And the focused element is "Course full name" "field"
|