Commit 3f82f722 authored by Rebecca Blundell's avatar Rebecca Blundell Committed by Robert Lyon
Browse files

Bug 1897190: Improve behat properties file structure

rewrite properties file and functions to make structure
easier to manage:
- add multiple arrays to split up properties by category
- modernise PHP syntax to use array constants
- fix location option to work properly
- remove need for xpath/css to be specified in arrays,
by adding set_selector_type()
- remove unused function and add others as required
- update tests to call properties, not css/xpath
- add check for null return from  get_property() and
throw ExpectationException for property if null

Change-Id: If64a5a1ed1a572b8eadcf91dd9f7a87bcf621d7c
parent 75bd9a91
......@@ -632,7 +632,7 @@ EOD;
$newinstitution->maxuseraccounts = !empty($record['maxuseraccounts']) ? intval($record['maxuseraccounts']) : null;
$newinstitution->expiry = !empty($record['expiry']) ? db_format_timestamp($record['expiry']) : null;
$newinstitution->allowinstitutionpublicviews = (isset($record['allowinstitutionpublicviews']) && $record['allowinstitutionpublicviews']) ? 1 : 0;
$newinstitution->allowinstitutionpublicviews = isset($record['allowinstitutionpublicviews']) ? intval($record['allowinstitutionpublicviews']) : 1;
// Save the changes to the DB
$newinstitution->commit();
......
......@@ -385,25 +385,34 @@ class BehatGeneral extends BehatBase {
public function i_click_on_blocktype($blocktype) {
$show_more_button = "Show more";
$property = "Content types";
$location = "Blocks";
// get the blocktypes container
$css_locator = get_property($property);
$css_locator = get_property($property, $location);
$found = false;
while (!$found) {
try {
//check if the blocktype is there
$node = $this->get_node_in_container('link_or_button', $blocktype, 'css_element', '#placeholderlist');
$this->ensure_node_is_visible($node);
$found = true;
}
catch(Exception $e) {
// do nothing, keep looking
$this->i_click_on($show_more_button);
}
if (!$css_locator) {
throw new ExpectationException(
'"A property called "' . $property . '" was not found in the properties.php file."',
$this->getSession()
);
}
else {
$found = false;
while (!$found) {
try {
//check if the blocktype is there
$node = $this->get_node_in_container('link_or_button', $blocktype, 'css_element', '#placeholderlist');
$this->ensure_node_is_visible($node);
$found = true;
}
catch (Exception $e) {
// do nothing, keep looking
$this->i_click_on($show_more_button);
}
}
$this->i_click_on_in_the($blocktype, $css_locator[0], $css_locator[1]);
$this->wait_until_the_page_is_ready();
$this->i_click_on_in_the($blocktype, $css_locator[0], $css_locator[1]);
$this->wait_until_the_page_is_ready();
}
}
/**
......@@ -984,8 +993,7 @@ EOF;
* Then uses a switch to get the correct function.
*
* @Then /^I (?P<step_funct>.*) "(?P<text_string>(?:[^"]|\\")*)" in the "(?P<property_string>(?:[^"]|\\")*)" property$/
* @Then /^I (?P<step_funct>.*) "(?P<text_string>(?:[^"]|\\")*)" in the
* "(?P<property_string>(?:[^"]|\\")*)" property in "(?P<location_string>(?:[^"]|\\")*)"$/
* @Then /^I (?P<step_funct>.*) "(?P<text_string>(?:[^"]|\\")*)" in the "(?P<property_string>(?:[^"]|\\")*)" "(?P<location_string>(?:[^"]|\\")*)" property$/
* @param string $step_funct
* @param string $text
* @param string $property
......@@ -1008,33 +1016,153 @@ EOF;
/**
* @Given I click on the :property property
* @Given I click on the :property :location property
* @param string $property
* @param string $location
*/
public function click_on_property($property) {
$property = get_property($property);
$this->i_click_on_element($property[0], $property[1]);
public function click_on_property($property, $location=null) {
$css_locator = get_property($property, $location);
if (!$css_locator) {
throw new ExpectationException('"A property called "' . $property . '" was not found in the properties.php file."',
$this->getSession());
}
else {
$this->i_click_on_element($css_locator[0], $css_locator[1]);
}
}
/**
* @Then /^I should see "(?P<text_string>(?:[^"]|\\")*)" in the
* "(?P<property_string>(?:[^"]|\\")*)" property in "(?P<location_string>(?:[^"]|\\")*)"$/
* @param string $text
* Call the Mink WebAssert function elementExists using info from
* properties.php
*
* NOTE: Other than using the properties file, this function
* bypasses Mahara custom behat functions.
*
* @Then a :property property should exist
* @Then a :property :location property should exist
* @param string $property
* @param string $location
*/
public function should_see_property_in_location($text, $property, $location) {
public function property_should_exist($property, $location=null) {
$css_locator = get_property($property, $location);
if (!$css_locator) {
throw new ExpectationException('"A property called "' . $property . '" was not found in the properties.php file."',
$this->getSession());
}
else {
//because behat doesn't use '_element', remove it
$css_locator[1] = str_replace('_element', '', $css_locator[1]);
$this->assertSession()->elementExists($css_locator[1], $css_locator[0]);
}
}
/**
* Call the Mink WebAssert function elementContains using info from
* properties.php
*
* NOTE: Other than using the properties file, this function
* bypasses Mahara custom behat functions.
*
* @Then /^"(?P<text_string>(?:[^"]|\\")*)" should be in the "(?P<property_string>(?:[^"]|\\")*)" property$/
* @Then /^"(?P<text_string>(?:[^"]|\\")*)" should be in the "(?P<property_string>(?:[^"]|\\")*)" "(?P<location_string>(?:[^"]|\\")*)" property$/
* @param string $html - something in the html, e.g. the title attribute
* @param string $property
* @param string $location (optional)
*/
public function property_should_contain($html, $property, $location=null) {
$css_locator = get_property($property, $location);
if (!$css_locator) {
throw new ExpectationException('"A property called "' . $property . '" was not found in the properties.php file."',
$this->getSession());
}
else {
//because behat doesn't use '_element', remove it
$css_locator[1] = str_replace('_element', '', $css_locator[1]);
$this->assertSession()->elementContains($css_locator[1], $css_locator[0], $html);
}
}
/**
* Call the Mink WebAssert function elementContains using info from
* properties.php
*
* NOTE: Other than using the properties file, this function
* bypasses Mahara custom behat functions.
*
* @Then /^"(?P<text_string>(?:[^"]|\\")*)" should not be in the "(?P<property_string>(?:[^"]|\\")*)" property$/
* @Then /^"(?P<text_string>(?:[^"]|\\")*)" should not be in the "(?P<property_string>(?:[^"]|\\")*)" "(?P<location_string>(?:[^"]|\\")*)" property$/
* @param string $html - something in the html, e.g. the title attribute
* @param string $property
* @param string $location (optional)
*/
public function property_should_not_contain($html, $property, $location=null) {
$css_locator = get_property($property, $location);
if (!$css_locator) {
throw new ExpectationException('"A property called "' . $property . '" was not found in the properties.php file."',
$this->getSession());
}
else {
//because behat doesn't use '_element', remove it
$css_locator[1] = str_replace('_element', '', $css_locator[1]);
$this->assertSession()->elementNotContains($css_locator[1], $css_locator[0], $html);
}
}
/**
* Wrapper using properties file, not css, for in_the_should_not_be_visible()
*
* @Then :element :selectortype in the :property :location property should not be visible
*
* @param $element - thing we shouldn't see
* @param $selectortype - mahara selectortype (see BehatSelectors.php)
* @param $property - name of the css/xpath to fetch from properites.php
* @param $location (optional) - array constant to look in for $property
*/
public function element_in_property_should_not_exist($element,$selectortype, $property, $location=null) {
$css_locator = get_property($property, $location);
if (!$css_locator) {
throw new ExpectationException('"A property called "' . $property . '" was not found in the properties.php file."',
$this->getSession());
}
else {
$this->in_the_should_not_be_visible($element, $selectortype, $css_locator[0], $css_locator[1]);
}
}
$css_locator = get_property_in_location($property, $location);
/**
* Wrapper using properties file for should_appear_before_within($preelement, $preselectortype, $postelement, $postselectortype, $containelement, $containselectortype)
*
* @Given :preelement :preselectortype should appear before :postelement :postselectortype within the :property :location property
* @throws ExpectationException
* @param string $preelement The locator of the preceding element
* @param string $preselectortype The locator of the preceding element
* @param string $postelement The locator of the following element
* @param string $postselectortype The selector type of the following element
* @param string $property The name of the property we want
* @param string $location (optional) The array constant of the property
* @throws ExpectationException if property not found
*
*/
public function should_appear_before_within_property($preelement, $preselectortype, $postelement, $postselectortype, $property, $location=null) {
$css_locator = get_property($property, $location);
//@TODO add exception
if (!$css_locator) {
throw new ExpectationException('"A property called $property was not found in the properties.php file. Check that file or try passing a css locator directly"',
throw new ExpectationException('"A property called "' . $property . '" was not found in the properties.php file."',
$this->getSession());
}
else {
$this->assert_element_contains_text($text, $css_locator[0], $css_locator[1]);
$this->should_appear_before_within($preelement, $preselectortype, $postelement, $postselectortype, $css_locator[0], $css_locator[1]);
}
}
/**
* @And "option" in the "#activityprefs_activity_usermessage" "Message from other people" should not be visible
* Checks, that the specified element contains the specified text. When running Javascript tests it also considers that texts may be hidden.
*
* @Then /^I should see "(?P<text_string>(?:[^"]|\\")*)" in the "(?P<element_string>(?:[^"]|\\")*)" "(?P<text_selector_string>[^"]*)"$/
......@@ -2063,6 +2191,29 @@ JS;
$this->assertSession()->elementTextContains('css', $element, $date);
}
/**
* Takes a date in a format strtotime() can take and looks for it
* in the specified css element. You can pass a date format as a string
* defined in langconfig.php or directly as a php date() format.
*
* @Then I should see the date :date in the :property :location property with the format :format
*/
public function should_see_date_in_property($date, $property, $location=null, $format=null) {
if (string_exists($format, 'langconfig')) {
$date = format_date(strtotime($date), $format);
}
else {
$date = date($format, strtotime($date));
}
$css_locator = get_property($property, $location);
if (!$css_locator) {
throw new ExpectationException('"A property called "' . $property . '" was not found in the properties.php file."', $this->getSession());
}
else {
$this->assertSession()->elementTextContains('css', $css_locator[0], $date);
}
}
/**
* Takes a date in a format strtotime() can take and adds it to a field
* in the specified css element. You can pass a date format as a string
......
......@@ -221,19 +221,14 @@ class BehatNavigation extends BehatBase {
/**
* Expands the selected node that matches the text which is located inside the second element.
*
* @Given /^I expand "(?P<element_string>(?:[^"]|\\")*)" node in the "(?P<element_container_string>(?:[^"]|\\")*)" "(?P<text_selector_string>[^"]*)"$/
* @Given I expand :element node in the :property property
* @param string $element we look for
* @param string $nodeelement Element we look in
* @param string $nodeselectortype The type of selector where we look in
* @param string $property we look for
* @Given I expand :element node in the :property :location property
*/
public function i_expand_node_in_the($element = null, $nodeelement = null, $nodeselectortype = null, $property = null) {
public function i_expand_node_in_the($element, $property, $location=null) {
if (!$this->running_javascript()) {
return true;
}
if ($property) {
$css_locator = get_property($property);
$css_locator = get_property($property, $location);
if (!$css_locator) {
throw new ExpectationException('"A property called $property was not found in the properties.php file. Check that file or try passing a css locator directly"',
$this->getSession());
......
......@@ -48,4 +48,4 @@ Scenario: Creating an institution (selenium test)
And I click on "Delete" in "Institution One" row
And I press "Yes"
Then I should see "Institution deleted successfully"
And I should not see "Tags" in the "Institutions sub-menu" property
And I should not see "Tags" in the "Submenu" "Institutions" property
......@@ -29,7 +29,7 @@ Scenario: Admin to add a person (Bug 1703721)
And I press "General account options"
And I set the following fields to these values:
| Multiple journals | 1 |
And I press "×" in the "Options dialog" property
And I press "×" in the "Options dialog" "Modal" property
And I press "Create account"
Then I should see "New account created successfully"
And I expand "Institution settings - Institution One" node
......@@ -45,8 +45,8 @@ Scenario: Admin to add a person (Bug 1703721)
And I wait "1" seconds
And I should see "Administrator of Institution One"
And I click on "Show administration menu"
And I should see "Groups" in the "Administration menu" property
And I should not see "Extensions" in the "Administration menu" property
And I should see "Groups" in the "Administration menu" "Nav" property
And I should not see "Extensions" in the "Administration menu" "Nav" property
# Checking multiple journals
And I choose "Journals" in "Create" from main menu
And I should see "Create journal"
......@@ -56,8 +56,8 @@ Scenario: Admin to add a person (Bug 1703721)
# Login as staff member
Given I log in as "StaffA" with password "Kupuh1pa!"
And I click on "Show administration menu"
And I should see "Reports" in the "Administration menu" property
And I should not see "Groups" in the "Administration menu" property
And I should see "Reports" in the "Administration menu" "Nav" property
And I should not see "Groups" in the "Administration menu" "Nav" property
# Site admin role already tested in menu_navigation.feature file
Scenario: Create people by csv (Bug 1426983)
......
......@@ -27,11 +27,11 @@ Scenario: Testing that views & collections are collated properly
And I choose "Pages and collections" in "Create" from main menu
And I follow "Page UserA_01"
And I follow "Edit"
And I follow "Settings" in the "Toolbar buttons" property
And I follow "Settings" in the "Toolbar buttons" "Nav" property
And I set the following fields to these values:
| Anonymise | 1 |
And I press "Save"
And I follow "Share" in the "Toolbar buttons" property
And I follow "Share" in the "Toolbar buttons" "Nav" property
And I select "Registered people" from "accesslist[0][searchtype]"
And I press "Save"
And I log out
......
......@@ -27,8 +27,8 @@ Feature: Mahara people can change their account settings
And I select "Inbox" from "Group message"
And I select "Email digest" from "Institution message"
And I select "Inbox" from "Message from other people"
And "None" "option" in the "#activityprefs_activity_usermessage" "css_element" should not be visible
And "None" "option" in the "#activityprefs_activity_maharamessage" "css_element" should not be visible
And "None" "option" in the "Message from other people" "Account" property should not be visible
And "None" "option" in the "System message" "Account" property should not be visible
And I select "Email" from "New forum post"
And I select "Email digest" from "Peer assessment"
And I select "Inbox" from "System message"
......@@ -41,21 +41,20 @@ Feature: Mahara people can change their account settings
Scenario: Person changes preference settings
Given I log in as "UserA" with password "Kupuh1pa!"
When I choose "Preferences" in "Settings" from account menu
Then I should see "Preferences" in the ".section-heading" "css_element"
And I should see "New password" in the "#accountprefs h2" "css_element"
Then I should see "Preferences" in the "Page heading" "Common" property
And I should see "New password" in the "Preferences heading 1" "Account" property
When I fill in "Current password" with "Kupuh1pa!"
And I fill in "New password" with "Password123!"
And I fill in "Confirm password" with "Password123!"
And I press "Save"
Then I should see "Preferences saved"
And I should see "Change username" in the "//form[@id='accountprefs']/h2[contains(text(),'Change username')]" "xpath_element"
And I should see "Change username" in the "Preferences heading 2" "Account" property
When I fill in "New username" with "UserAA"
And I press "Save"
Then I should see "There was an error with submitting this form. Please check the marked fields and try again."
And I fill in "Password123!" for "accountprefs_oldpasswordchangeuser"
And I press "Save"
And I should see "Preferences saved"
And I should see an "#accountprefs_friendscontrol_container > div.radio-wrapper > div:first-child > input.radio" element
And a "Friends control radio" "Account" property should exist
And I press "Save"
Then I should see "Preferences saved"
......@@ -20,7 +20,7 @@ Scenario: Admin user sets country to be mandatory
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 click on the "Country mandatory field" "Profile" property
And I press "Save"
And I log out
# click submit and verify user is logged in with no error messages
......
......@@ -13,7 +13,7 @@ Given the following "users" exist:
Scenario: User can see correct headings in footer by default
#log in as a normal user
Given I log in as "UserA" with password "Kupuh1pa!"
And I click on "Legal" in the "Footer" property
And I click on "Legal" in the "Footer" "Footer" property
And I should see "Displayed are the current privacy statements and terms and conditions."
And I am on homepage
And I click on "About"
......
......@@ -25,7 +25,7 @@ Scenario: Admin user can add an image to the "Logged -out home" static page and
And I press "Save changes"
And I choose "Dashboard" from main menu
# check that the image uploaded is the image being seen on the page
And I should see an "img[alt='Image2.png']" element
Then I should see image 'Image2.png' on the page
Scenario: Admin user can add an image to the "Home (Dashboard)" static page and see it displayed
Given I log in as "UserA" with password "Kupuh1pa!"
......@@ -44,4 +44,4 @@ Scenario: Admin user can add an image to the "Home (Dashboard)" static page and
And I log out
And I am on homepage
# check that the image uploaded is the image being seen on the page
And I should see an "img[alt='Image2.png']" element
Then I should see image 'Image2.png' on the page
......@@ -52,11 +52,11 @@ Scenario: Mahara member can use Institution tags in their content
Given I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu
And I follow "Settings" in the "Toolbar buttons" property
And I follow "Settings" in the "Toolbar buttons" "Nav" property
And I fill in select2 input "settings_tags" with "One tag" and select "Institution One: One tag (1)"
And I fill in select2 input "settings_tags" with "Test" and select "Test"
And I press "Save"
When I follow "Drag to add a new block" in the "blocktype sidebar" property
When I follow "Drag to add a new block" in the "blocktype sidebar" "Views" property
And I press "Add"
And I click on blocktype "Tagged journal entries"
And I fill in select2 input "instconf_tagselect" with "One tag" and select "Institution One: One tag"
......@@ -75,10 +75,10 @@ Scenario: Mahara member can use Institution tags in their content
And I press "Save changes"
Given I choose "Pages and collections" in "Create" from main menu
And I follow "Tags" in the "#sb-tags" "css_element"
And I click on "Tags" in the "Tags block" "Blocks" property
And I follow "Edit tags"
Then I should see "Test" in the "My tags list" property
Then I should not see "Institution One: One tag" in the "My tags list" property
Then I should see "Test" in the "My tags list" "Tags" property
Then I should not see "Institution One: One tag" in the "My tags list" "Tags" property
Scenario: Inst admin can use Institution tags when creating Institution pages
Given I log in as "UserB" with password "Kupuh1pa!"
......@@ -92,7 +92,7 @@ Scenario: Inst admin can use Institution tags when creating Institution pages
And I press "Save"
# Inst admin put an institution tag on a text block artefact on an institution page
When I follow "Drag to add a new block" in the "blocktype sidebar" property
When I follow "Drag to add a new block" in the "blocktype sidebar" "Views" property
And I press "Add"
And I click on blocktype "Text"
And I set the field "Block title" to "Text Block 1"
......
......@@ -12,30 +12,30 @@ Scenario: Admin user log in and confirm Legal templates are correct for
# verify Site privacy Statement section contains correct text
And I should see "Add your privacy statement for the site in \"Administration menu\" → \"Configure site\""
# verify first Legal link is displayed and links to correct page
And I click on the "First Legal" property
And I click on the "First Legal" "Legal" property
And I should see "Edit the privacy statement for the entire site. The version you edited last becomes the current privacy statement automatically."
And I move backward one page
# verify Site terms and conditions section contains correct text
And I should see "Add your terms and conditions for the site in \"Administration menu\" → \"Configure site\""
And I move forward one page
# Privacy statements in logged out page should show latest version (Bug 1797812)
And I click on the "Privacy statement Edit icon" property
And I click on the "Privacy statement Edit icon" "Legal" property
And I fill in "Version" with "V2.0"
And I fill in "V 2.0 privacy statement for the site " in first editor
And I press "Save changes"
Then I should see "V2.0" in the "#privacy > tr:nth-child(1)" "css_element"
And I should see "1.0" in the "#privacy > tr:nth-child(2)" "css_element"
Then I should see "V2.0" in the "Admin Account" row
And I should see "1.0" in the "System User" row
And I wait "1" seconds
And I should see "Page saved"
When I click on "Terms and conditions"
# Terms and conditions statements in logged out page should show latest version (Bug 1797812)
And I click on the "Terms and conditions Edit icon" property
And I click on the "Terms and conditions Edit icon" "Legal" property
And I fill in "Version" with "V2.0"
And I fill in "V 2.0 terms and conditions for the site" in first editor
And I press "Save changes"
Then I should see "V2.0" in the "#termsandconditions > tr:nth-child(1)" "css_element"
And I should see "1.0" in the "#termsandconditions > tr:nth-child(2)" "css_element"
Then I should see "V2.0" in the "Admin Account" row
And I should see "1.0" in the "System User" row
And I should see "Page saved"
When I click on "Legal" in the ".footer" "css_element"
When I click on "Legal" in the "Footer" "Footer" property
And I should see "V 2.0 terms and conditions for the site"
Then I should see "V 2.0 privacy statement for the site"
......@@ -88,17 +88,17 @@ Scenario: Admin logs in and checks notification settings (Bug 1388682)
And I choose "Site options" in "Configure site" from administration menu
And I click on "Notification settings"
#see the notification settings in alphabetical order.
And "Comment" "text" should appear before "Contact us" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Contact us" "text" should appear before "Feedback on annotations" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Feedback on annotations" "text" should appear before "Group message" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Group message" "text" should appear before "Institution message" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Institution message" "text" should appear before "Message from other people" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Message from other people" "text" should appear before "New forum post" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "New forum post" "text" should appear before "New page access" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "New page access" "text" should appear before "Objectionable content" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Objectionable content" "text" should appear before "Objectionable content in forum" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Objectionable content in forum" "text" should appear before "Repeat virus upload" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Repeat virus upload" "text" should appear before "System message" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "System message" "text" should appear before "Virus flag release" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Virus flag release" "text" should appear before "Wall post" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Wall post" "text" should appear before "Watchlist" "text" within "#siteoptions_notificationsettings_open" "css_element"
And "Comment" "text" should appear before "Contact us" "text" within the "Notification settings" "Siteoptions" property
And "Contact us" "text" should appear before "Feedback on annotations" "text" within the "Notification settings" "Siteoptions" property
And "Feedback on annotations" "text" should appear before "Group message" "text" within the "Notification settings" "Siteoptions" property
And "Group message" "text" should appear before "Institution message" "text" within the "Notification settings" "Siteoptions" property
And "Institution message" "text" should appear before "Message from other people" "text" within the "Notification settings" "Siteoptions" property
And "Message from other people" "text" should appear before "New forum post" "text" within the "Notification settings" "Siteoptions" property
And "New forum post" "text" should appear before "New page access" "text" within the "Notification settings" "Siteoptions" property
And "New page access" "text" should appear before "Objectionable content" "text" within the "Notification settings" "Siteoptions" property
And "Objectionable content" "text" should appear before "Objectionable content in forum" "text" within the "Notification settings" "Siteoptions" property
And "Objectionable content in forum" "text" should appear before "Repeat virus upload" "text" within the "Notification settings" "Siteoptions" property
And "Repeat virus upload" "text" should appear before "System message" "text" within the "Notification settings" "Siteoptions" property
And "System message" "text" should appear before "Virus flag release" "text" within the "Notification settings" "Siteoptions" property
And "Virus flag release" "text" should appear before "Wall post" "text" within the "Notification settings" "Siteoptions" property
And "Wall post" "text" should appear before "Watchlist" "text" within the "Notification settings" "Siteoptions" property
......@@ -73,9 +73,9 @@ Scenario Outline: 1) Site admin enables the side block 'Profile completion' in A
Then I log out
# No institution user verify that the Profile completion side block is displayed on the Dashboard
Given I log in as "<user>" with password "Kupuh1pa!"
Then I should see "Profile completion" in the "Progressbar block" property
Then I should see "Profile completion" in the "Progressbar block" "Misc" property
And I should see "Profile completion tips"
And I should see "50%" in the "Progressbar" property
And I should see "50%" in the "Progressbar" "Misc" property
When I choose "Profile" from account menu
Then I should see "Profile"
And I follow "About me"
......@@ -83,7 +83,7 @@ Scenario Outline: 1) Site admin enables the side block 'Profile completion' in A
And I press "Save profile"
Then I should see "Profile saved successfully"
# Verify progress bar has gone from 50% to 75%
And I should see "75%" in the "Progressbar" property
And I should see "75%" in the "Progressbar" "Misc" property
And I log out
Examples:
......
......@@ -29,7 +29,7 @@ Scenario: Registering as a new student and checking switch can flick back and fo
And I log in as "admin" with password "Kupuh1pa!"
And I choose "Pending registrations" in "Institutions" from administration menu
Then I should see "EXPIRES "
And I should see the date "+2 weeks" in the "tbody tr td:nth-of-type(3)" element with the format "d F Y"
And I should see the date "+2 weeks" in the "Expires column" "Institutions" property with the format "d F Y"
When I follow "Approve"
And I press "Approve"
Then I should see "Approval sent, waiting for person to complete the registration process."
......@@ -10,5 +10,5 @@ Scenario: Checking that the Multirecipient notifications plugin is active (Bug 1
# Currently only tests for multirecipientnotifications plugin which
# should be active and not be able to be hidden
And I scroll to the base of id "module.multirecipientnotification"
Then I should not see "Hide" in the "multirecipientnotification" property
And I should not see "Show" in the "multirecipientnotification" property
Then I should not see "Hide" in the "multirecipientnotification" "Misc" property
And I should not see "Show" in the "multirecipientnotification" "Misc" property
......@@ -17,7 +17,7 @@ Scenario: Make Text Block Retractable
Given I log in as "UserA" with password "Kupuh1pa!"
And I choose "Pages and collections" in "Create" from main menu
And I click on "Edit" in "Page UserA_01" card menu
When I follow "Drag to add a new block" in the "blocktype sidebar" property
When I follow "Drag to add a new block" in the "blocktype sidebar" "Views" property
And I press "Add"
And I click on blocktype "Text"
And I set the field "Block title" to "Text Block 1"
......
......@@ -13,7 +13,7 @@ Scenario: Testing functions for people search page (Bug 1431569)
Given I log in as "admin" with password "Kupuh1pa!"
And I choose "People search" in "People" from administration menu
And I follow "Advanced options"