From 26385f6e343d8608653ca3d6e97ea73202c3541e Mon Sep 17 00:00:00 2001 From: Adrian Greeve Date: Mon, 14 Sep 2015 14:13:35 +0800 Subject: [PATCH] MDL-51108 mod_data: Addition to behat test for Lat. and Long. --- mod/data/tests/behat/required_entries.feature | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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"