From: Adrian Greeve Date: Mon, 14 Sep 2015 06:13:35 +0000 (+0800) Subject: MDL-51108 mod_data: Addition to behat test for Lat. and Long. X-Git-Tag: v3.0.0-beta~233^2 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=453adb1adfa21fba96d7272bb853702f4aea3af1 MDL-51108 mod_data: Addition to behat test for Lat. and Long. --- 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"