X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=mod%2Fdata%2Ftests%2Fbehat%2Frequired_entries.feature;h=d5ef8e548a5c2e262c4165417fb83f69daed9754;hp=0ddad876b0550e1498adb4fc6d97ec0e4b2c209f;hb=453adb1adfa21fba96d7272bb853702f4aea3af1;hpb=d25043270cf5e7654cd74d564e22d6fda495f5e4 diff --git a/mod/data/tests/behat/required_entries.feature b/mod/data/tests/behat/required_entries.feature index 0ddad876b05..d5ef8e548a5 100644 --- a/mod/data/tests/behat/required_entries.feature +++ b/mod/data/tests/behat/required_entries.feature @@ -204,3 +204,24 @@ Feature: Users can be required to specify certain fields when adding entries to | Required URL | http://example.com/ | | Required Multimenu | Option 1 | | Required Two-Option Multimenu | Option 1 | + + Scenario: A student fills in Latitude but not Longitude will see an error + Given I log in as "student1" + And I follow "Course 1" + When I add an entry to "Test database name" database with: + | Base Text input | Some input to allow us to submit the otherwise empty form | + | Required Checkbox Option 1 | 1 | + | RTOC Option 1 | 1 | + | Latitude | 24 | + | Required Menu | 1 | + | Required Number | 1 | + | Required Radio Option 1 | 1 | + | Required Text input | New entry text | + | Required Text area | More text | + | Required URL | http://example.com/ | + | Required Multimenu | 1 | + | Required Two-Option Multimenu | 1 | + And I set the field with xpath "//div[@title='Not required Latlong']//tr[td/label[normalize-space(.)='Latitude']]/td/input" to "20" + And I press "Save and view" + Then ".alert.alert-error" "css_element" should exist in the "Required Latlong" "table_row" + And ".alert.alert-error" "css_element" should exist in the "Not required Latlong" "table_row"