Commit 02bdc8d4 authored by Steven Spinelli's avatar Steven Spinelli Committed by Robert Lyon
Browse files

Bug 1785725 Behat: Country is enabled in Mandatory fields

Change-Id: I0bfdd555f8c741b8267fbc076d042249bca840de
parent 05d7f628
......@@ -71,6 +71,7 @@ define ("LOCATOR_CONSTANTS", json_encode(array(
'Secret urls - table row 1' => array("//table/tbody/tr[1]/td[4]/a", "xpath_element"),
'File Size' => array("//table[@id='files_filebrowser_filelist']/tbody/tr[1]/td[4]", "xpath_element"),
'Multirecipientnotification' => array("//li[@id='module.multirecipientnotification']", "xpath_element"),
'Country mandatory field' => array("//div[@id='pluginconfig_mandatory_container']/div[@class='checkboxes-option checkbox']/label[contains(text(),'Country')]", "xpath_element"),
// xpath related to participation report
'Group views report tr1 tc1' => array("//*[@id='groupviewsreport']/tbody/tr[1]/td[1]", "xpath_element"),
'Group views report tr1 tc2' => array("//*[@id='groupviewsreport']/tbody/tr[1]/td[2]", "xpath_element"),
@javascript @core @core_administration @core_settings
Feature: Set country as a required profile field
As an admin
I want to set the country field to be required
As a user
I see New Zealand as default option when required to fill in country for profile
Given the following "users" exist:
| username | password | email | firstname | lastname | institution | authname | role |
| UserA | Kupuh1pa! | | Angela | User | mahara | internal | member |
Scenario: Admin user sets country to be mandatory
Given I log in as "admin" with password "Kupuh1pa!"
And I choose "Site options" in "Configure site" from administration menu
And I expand all fieldsets
# Verify that 'Country' displays the value 'No country selected'.
Then I should see "No country selected"
# Enable country in Mandatory fields and save
When I choose "Plugin administration" in "Extensions" from administration menu
And I click on "Configuration for artefact internal"
# And I check "Country"
And I click on the "Country mandatory field" property
And I press "Save"
And I log out
# click submit and verify user is logged in with no error messages
When I log in as "UserA" with password "Kupuh1pa!"
Then I should see "Fields marked by '*' are required."
And I should see "New Zealand"
When I press "Submit"
Then I should see "Required profile fields set"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment