Commit aae69bc6 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1705622 - adding a properties file for some css elements"

parents d213a2e0 bc926b9e
......@@ -15,6 +15,7 @@
*/
require_once(__DIR__ . '/BehatBase.php');
require_once(__DIR__ . '/properties.php');
use Behat\Mink\Exception\ExpectationException as ExpectationException,
Behat\Mink\Exception\ElementNotFoundException as ElementNotFoundException,
......@@ -750,6 +751,69 @@ class BehatGeneral extends BehatBase {
}
}
/**
* Generic function to take any step that needs to look up the properties
* file with the syntax "in the <> property" and gets the css locator
* from the properties.php file.
* 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>(?:[^"]|\\")*)"$/
* @param string $step_funct
* @param string $text
* @param string $property
* @param string $location
*/
public function get_property_call_funct($step_funct, $text, $property, $location = null) {
$css_locator = get_property($property, $location);
// get_property returns null if locator not found
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());
}
else {
// switch covers steps in BehatGeneral that pass a css_locator
switch ($step_funct) {
case "click on":
$funct = "i_click_on_in_the";
break;
case "follow":
$funct = "i_follow_in_the";
break;
case "press":
$funct = "i_press_in_the";
break;
case "should see":
$funct = "assert_element_contains_text";
break;
case "should not see":
$funct = "assert_element_not_contains_text";
break;
}
$this->$funct($text, $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
* @param string $property
* @param string $location
*/
public function should_see_property_in_location($text, $property, $location) {
$css_locator = get_property_in_location($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());
}
else {
$this->assert_element_contains_text($text, $css_locator[0], $css_locator[1]);
}
}
/**
* Checks, that the specified element contains the specified text. When running Javascript tests it also considers that texts may be hidden.
*
......@@ -761,7 +825,6 @@ class BehatGeneral extends BehatBase {
* @param string $selectortype The type of element where we are looking in.
*/
public function assert_element_contains_text($text, $element, $selectortype) {
// Getting the container where the text should be found.
$container = $this->get_selected_node($selectortype, $element);
......
......@@ -191,14 +191,25 @@ 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
*/
public function i_expand_node_in_the($element, $nodeelement, $nodeselectortype) {
public function i_expand_node_in_the($element = null, $nodeelement = null, $nodeselectortype = null, $property = null) {
if (!$this->running_javascript()) {
return true;
}
if ($property) {
$css_locator = get_property($property);
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());
}
$nodeelement = $css_locator[0];
$nodeselectortype = $css_locator[1];
}
$node = $this->get_node_in_container('text', $element, $nodeselectortype, $nodeelement);
// Check if the node is a link.
if (strtolower($node->getTagName()) === 'a') {
......
<?php
//This syntax is a workaround for creating a const array. Array constants
//are allowed from php 5.6 on, so once mahara upgrades, this code can be changed
//to take advantage of this.
//This table can take css and xpath locators, e.g:
//'Groups dropdown' => array("li.managegroups", "css_element"),
//OR
//'Groups dropdown' => array("//li[@class='managegroups']", "xpath_element"),
define ("LOCATOR_CONSTANTS", json_encode(array(
'Admin home sub-menu' => array(".adminhome", "css_element"),
'Arrow-bar nav' => array(".arrow-bar", "css_element"),
'My portfolios' => array(".bt-myviews", "css_element"),
'Latest changes I can view' => array(".bt-newviews", "css_element"),
'Watched pages' => array(".bt-watchlist", "css_element"),
'Comment preview' => array(".commentreplyview", "css_element"),
'Comment text' => array(".comment-text", "css_element"),
'Extensions sub-menu' => array(".configextensions ul", "css_element"),
'Configure site sub-menu' => array(".configsite", "css_element"),
'Users sub-menu' => array(".configusers", "css_element"),
'Content sub-menu' => array(".content", "css_element"),
'Comment feedbacktable' => array(".feedbacktable", "css_element"),
'Filelist table' => array(".filelist", "css_element"),
'Pages and Collections boxes' => array(".grouppageswrap", "css_element"),
'Groups sub-menu' => array(".groups", "css_element"),
'Admin Groups sub-menu' => array(".managegroups ul", "css_element"),
'Institutions sub-menu' => array(".manageinstitutions ul", "css_element"),
'Options dialog' => array(".modal-header", "css_element"),
'Portfolio sub-menu' => array(".myportfolio", "css_element"),
'H1 heading' => array("h1", "css_element"),
'Collections text-box' => array(".select2-selection__rendered", "css_element"),
'Annotation' => array("#activate_blocktype_annotation", "css_element"),
'Smartevidence' => array("#activate_module_framework", "css_element"),
'Make comment public status' => array("#add_feedback_form_ispublic_container", "css_element"),
'Submissions to this group' => array("#allsubmissionlist", "css_element"),
'Blocktype sidebar' => array("#content-editor-foldable", "css_element"),
'Tags section' => array("#edit_tags_container", "css_element"),
'Upload dialog' => array("#editgoalsandskills_filebrowser_upload_browse", "css_element"),
'Filter by first name' => array("#firstnamelist", "css_element"),
'Find people results' => array("#friendslist_pagination", "css_element"),
'My groups box' => array("#groups", "css_element"),
'Group portfolios' => array("#groupviewlist", "css_element"),
'Main menu' => array("#main-nav", "css_element"),
'Administration menu' => array("#main-nav-admin", "css_element"),
'Members without a submission to the group' => array("#nosubmissionslist", "css_element"),
'Collections shared with this group' => array("#sharedcollectionlist", "css_element"),
'Pages shared with this group'=> array("#sharedviewlist", "css_element"),
'Matrix table' => array("#tablematrix", "css_element"),
'Toolbar buttons' => array("#toolbar-buttons", "css_element"),
#xpath_elements
'Secret urls - table row 2' => array("//table/tbody/tr[2]/td[4]/a", "xpath_element"),
'Multirecipientnotification' => array("//li[@id='module.multirecipientnotification']", "xpath_element"),
)));
/**
* @param string $property
*/
function get_property($property, $location = null) {
if (!$location) {
$location = LOCATOR_CONSTANTS;
}
$location = json_decode($location, true);
if (isset($location[ucfirst($property)])) {
return $location[ucfirst($property)];
}
else {
return null;
}
}
?>
......@@ -16,13 +16,13 @@ Scenario: Use content from another note (Bug 1710988)
And I follow "Page 1"
And I follow "Edit this page"
And I expand "General" node
And I follow "Note" in the "div#general" "css_element"
And I follow "Note" in the "blocktype sidebar" property
And I press "Add"
And I set the following fields to these values:
| Block title | Note block 1 |
| Block content | This is a test |
And I press "Save"
And I follow "Note" in the "div#general" "css_element"
And I follow "Note" in the "blocktype sidebar" property
And I press "Add"
And I follow "Use content from another note"
And I select the radio "Note block 1"
......
......@@ -25,7 +25,7 @@ Scenario: Creating an institution (selenium test)
And I press "Submit"
# Moving authentication option
And I press "Edit" in the "table#adminstitutionslist" "css_element"
And I click on "Edit" in "Institution One" row
And I scroll to the base of id "dummySelect"
And I follow "Move up"
......@@ -37,6 +37,6 @@ Scenario: Creating an institution (selenium test)
And I press "Submit"
# Delete the institution
And I press "Delete" in the "table#adminstitutionslist" "css_element"
And I click on "Delete" in "Institution One" row
And I press "Yes"
Then I should see "Institution deleted successfully"
......@@ -28,7 +28,7 @@ Background:
And I press "General account options"
And I set the following fields to these values:
| Multiple journals | 1 |
And I press "×" in the "div.modal-header" "css_element"
And I press "×" in the "Options dialog" property
And I press "Create user"
Then I should see "New user account created successfully"
And I expand "Institution settings - Institution One" node
......@@ -44,8 +44,8 @@ Background:
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 "#main-nav-admin" "css_element"
And I should not see "Extensions" in the "#main-nav-admin" "css_element"
And I should see "Groups" in the "Administration menu" property
And I should not see "Extensions" in the "Administration menu" property
#Checking multiple journals
And I choose "Journals" in "Content" from main menu
And I should see "Create journal"
......@@ -53,8 +53,8 @@ Background:
#login as staff user
Given I log in as "StaffA" with password "Kupuhipa1"
And I click on "Show administration menu"
And I should see "Reports" in the "#main-nav-admin" "css_element"
And I should not see "Groups" in the "#main-nav-admin" "css_element"
And I should see "Reports" in the "Administration menu" property
And I should not see "Groups" in the "Administration menu" property
#Site admin role already tested in menu_navigation.feature file
Scenario: Create users by csv (Bug 1426983)
......
......@@ -27,11 +27,11 @@ Scenario: Testing that views & collections are collated properly
And I choose "Pages and collections" in "Portfolio" from main menu
And I follow "Page UserA_01"
And I follow "Edit this page"
And I follow "Settings" in the "#toolbar-buttons" "css_element"
And I follow "Settings" in the "Toolbar buttons" property
And I set the following fields to these values:
| Anonymise | 1 |
And I press "Save"
And I follow "Share" in the "#toolbar-buttons" "css_element"
And I follow "Share" in the "Toolbar buttons" property
And I select "Registered users" from "accesslist[0][searchtype]"
And I press "Save"
And I log out
......
......@@ -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 "//li[@id='module.multirecipientnotification']" "xpath_element"
And I should not see "Show" in the "//li[@id='module.multirecipientnotification']" "xpath_element"
Then I should not see "Hide" in the "multirecipientnotification" property
And I should not see "Show" in the "multirecipientnotification" property
......@@ -13,7 +13,7 @@ Scenario: Testing functions for user search page (Bug 1431569)
Given I log in as "admin" with password "Kupuhipa1"
And I choose "User search" in "Users" from administration menu
And I follow "Advanced options"
And I follow "A" in the "div#firstnamelist" "css_element"
And I follow "A" in the "Filter by first name" property
And I follow "UserA"
And I should see "Account settings | Angela User (UserA)"
# Flicking the switches to new settings
......
......@@ -95,16 +95,16 @@ These list must take into account the sort option chosen in the block config (Bu
# Share pages and collections to the "GroupA"
# Edit access for Page UserA_01
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages" in the "div#main-column-container" "css_element"
And I follow "Pages"
And I click on "Edit access" in "Page UserA_01" row
And I set the select2 value "Page UserA_01, Page UserA_02, Page UserA_03, Page UserA_04, Page UserA_05" for "editaccess_views"
And I select "GroupA" from "accesslist[0][searchtype]"
And I press "Save"
# Edit access for Collection UserA_01
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Collections" in the "div#main-column-container" "css_element"
And I follow "Collections"
And I click on "Edit access" in "Collection UserA_01" row
And I should not see "Collection UserA_02" in the "ul.select2-selection__rendered" "css_element"
And I should not see "Collection UserA_02" in the "Collections text-box" property
And I set the select2 value "Collection UserA_01, Collection UserA_02, Collection UserA_03, Collection UserA_04, Collection UserA_05, Collection UserA_06" for "editaccess_collections"
And I select "GroupA" from "accesslist[0][searchtype]"
And I press "Save"
......@@ -128,40 +128,40 @@ These list must take into account the sort option chosen in the block config (Bu
And I should see "Cecilia"
And I should see "GroupA"
And I scroll to the base of id "groups"
And I follow "GroupA" in the "div#groups" "css_element"
And I follow "GroupA" in the "My groups box" property
# Group portfolios
And I should see "Page GroupA_01" in the "ul#groupviewlist" "css_element"
And I should see "Page GroupA_05" in the "ul#groupviewlist" "css_element"
And I should not see "Page GroupA_06" in the "ul#groupviewlist" "css_element"
And I should see "Page GroupA_01" in the "Group portfolios" property
And I should see "Page GroupA_05" in the "Group portfolios" property
And I should not see "Page GroupA_06" in the "Group portfolios" property
#And I follow "Next page" in the "div#groupviews_pagination" "css_element"
And I jump to next page of the list "groupviews_pagination"
And I should see "Page GroupA_06" in the "ul#groupviewlist" "css_element"
And I should see "Page GroupA_08" in the "ul#groupviewlist" "css_element"
And I should not see "Page GroupA_05" in the "ul#groupviewlist" "css_element"
And I should see "Page GroupA_06" in the "Group portfolios" property
And I should see "Page GroupA_08" in the "Group portfolios" property
And I should not see "Page GroupA_05" in the "Group portfolios" property
# Shared pages
And I should see "Page UserA_01" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserA_05" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserB_01" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserA_01" in the "Pages shared with this group" property
And I should see "Page UserA_05" in the "Pages shared with this group" property
And I should not see "Page UserB_01" in the "Pages shared with this group" property
#And I follow "2" in the "div#sharedviews_pagination" "css_element"
And I jump to page "2" of the list "sharedviews_pagination"
And I should see "Page UserB_01" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserB_05" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserA_05" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserB_06" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserB_01" in the "Pages shared with this group" property
And I should see "Page UserB_05" in the "Pages shared with this group" property
And I should not see "Page UserA_05" in the "Pages shared with this group" property
And I should not see "Page UserB_06" in the "Pages shared with this group" property
#And I follow "3" in the "div#sharedviews_pagination" "css_element"
And I jump to page "3" of the list "sharedviews_pagination"
And I should see "Page UserB_06" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserB_07" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserA_01" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserB_01" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserB_06" in the "Pages shared with this group" property
And I should see "Page UserB_07" in the "Pages shared with this group" property
And I should not see "Page UserA_01" in the "Pages shared with this group" property
And I should not see "Page UserB_01" in the "Pages shared with this group" property
# Shared collections
And I should see "Collection UserA_01" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserA_05" in the "ul#sharedcollectionlist" "css_element"
And I should not see "Collection UserA_06" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserA_01" in the "Collections shared with this group" property
And I should see "Collection UserA_05" in the "Collections shared with this group" property
And I should not see "Collection UserA_06" in the "Collections shared with this group" property
#And I follow "2" in the "div#sharedcollections_pagination" "css_element"
And I jump to page "2" of the list "sharedcollections_pagination"
And I should see "Collection UserA_06" in the "ul#sharedcollectionlist" "css_element"
And I should not see "Collection UserA_05" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserA_06" in the "Collections shared with this group" property
And I should not see "Collection UserA_05" in the "Collections shared with this group" property
And I log out
# Check that we can see submitted pages before editing/saving the configuration for group pages block
Given I log in as "UserB" with password "Kupuhipa1"
......@@ -197,7 +197,7 @@ These list must take into account the sort option chosen in the block config (Bu
And I follow "Pages and collections (tab)"
And I click on "Page GroupA_06" panel menu
And I click on "Edit" in "Page GroupA_06" panel menu
And I follow "Settings" in the "#toolbar-buttons" "css_element"
And I follow "Settings" in the "Toolbar buttons" property
And I set the field "Page description" to "<p>Group page 06 (updated)</p>"
And I scroll to the id "settings_submit"
And I press "Save"
......@@ -206,15 +206,15 @@ These list must take into account the sort option chosen in the block config (Bu
And I choose "Groups" from main menu
And I scroll to the base of id "mygroups"
And I follow "GroupA"
And I should see "Page GroupA_06" in the "ul#groupviewlist" "css_element"
And I should see "Page GroupA_06" in the "Group portfolios" property
#And I follow "Next" in the "div#groupviews_pagination" "css_element"
And I jump to next page of the list "groupviews_pagination"
And I should not see "Page GroupA_06" in the "ul#groupviewlist" "css_element"
And I should not see "Page GroupA_06" in the "Group portfolios" property
# Update the shared page "Page UserA_01"
And I choose "Portfolio" from main menu
And I click on "Page UserA_01" panel menu
And I click on "Edit" in "Page UserA_01" panel menu
And I follow "Settings" in the "#toolbar-buttons" "css_element"
And I follow "Settings" in the "Toolbar buttons" property
And I set the field "Page description" to "<p>Page 01 (updated)</p>"
And I scroll to the id "settings_submit"
And I press "Save"
......@@ -223,10 +223,10 @@ These list must take into account the sort option chosen in the block config (Bu
And I choose "Groups" from main menu
And I scroll to the base of id "mygroups"
And I follow "GroupA"
And I should see "Page UserA_01" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserA_01" in the "Pages shared with this group" property
#And I follow "2" in the "div#sharedviews_pagination" "css_element"
And I jump to page "2" of the list "sharedviews_pagination"
And I should not see "Page UserA_01" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserA_01" in the "Pages shared with this group" property
# Update the shared collection "Collection UserA_06"
And I choose "Pages and collections" in "Portfolio" from main menu
And I click on "Collection UserA_06" panel menu
......@@ -238,10 +238,10 @@ These list must take into account the sort option chosen in the block config (Bu
And I choose "Groups" from main menu
And I scroll to the base of id "mygroups"
And I follow "GroupA"
And I should see "Collection UserA_06" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserA_06" in the "Collections shared with this group" property
#And I follow "2" in the "div#sharedcollections_pagination" "css_element"
And I jump to page "2" of the list "sharedcollections_pagination"
And I should not see "Collection UserA_06" in the "ul#sharedcollectionlist" "css_element"
And I should not see "Collection UserA_06" in the "Collections shared with this group" property
# Submit some pages and collections to the group "GroupA"
And I select "Page UserA_01" from "group_view_submission_form_1_options"
And I press "Submit"
......@@ -262,15 +262,15 @@ These list must take into account the sort option chosen in the block config (Bu
And I press "Submit"
And I press "Yes"
# Check the list of submitted pages/collections
And I should see "Page UserA_03" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserA_02" in the "ul#allsubmissionlist" "css_element"
And I should see "Collection UserA_03" in the "ul#allsubmissionlist" "css_element"
And I should not see "Page UserB_01" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserA_03" in the "Submissions to this group" property
And I should see "Page UserA_02" in the "Submissions to this group" property
And I should see "Collection UserA_03" in the "Submissions to this group" property
And I should not see "Page UserB_01" in the "Submissions to this group" property
#And I follow "2" in the "div#allsubmitted_pagination" "css_element"
And I jump to page "2" of the list "allsubmitted_pagination"
And I should see "Page UserA_01" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserB_01" in the "ul#allsubmissionlist" "css_element"
And I should not see "Page UserA_02" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserA_01" in the "Submissions to this group" property
And I should see "Page UserB_01" in the "Submissions to this group" property
And I should not see "Page UserA_02" in the "Submissions to this group" property
And I log out
# Check pages and collections are shown in correct section
# Share and submit pages and collections
......@@ -282,14 +282,14 @@ These list must take into account the sort option chosen in the block config (Bu
# Share pages and collections to the standard "GroupD"
# Edit access for Page UserC_01, Page UserC_03, Page UserC_04
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages" in the "div#main-column-container" "css_element"
And I follow "Pages"
And I click on "Edit access" in "Page UserC_01" row
And I set the select2 value "Page UserC_01, Page UserC_03, Page UserC_04" for "editaccess_views"
And I select "GroupD" from "accesslist[0][searchtype]"
And I press "Save"
# Edit access for Collection UserC_01, Collection UserC_03, Collection UserC_04
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Collections" in the "div#main-column-container" "css_element"
And I follow "Collections"
And I click on "Edit access" in "Collection UserC_01" row
And I set the select2 value "Collection UserC_01, Collection UserC_03, Collection UserC_04" for "editaccess_collections"
And I select "GroupD" from "accesslist[0][searchtype]"
......@@ -325,30 +325,30 @@ These list must take into account the sort option chosen in the block config (Bu
And I should see "Angela"
And I should see "GroupD"
And I follow "GroupD"
And I should see "Page UserC_01" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserC_03" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserC_04" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserC_02" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserC_03" in the "ul#allsubmissionlist" "css_element"
And I should see "Collection UserC_01" in the "ul#sharedcollectionlist" "css_element"
And I should not see "Collection UserC_03" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserC_04" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserC_02" in the "ul#allsubmissionlist" "css_element"
And I should see "Collection UserC_03" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserC_01" in the "Pages shared with this group" property
And I should not see "Page UserC_03" in the "Pages shared with this group" property
And I should see "Page UserC_04" in the "Pages shared with this group" property
And I should see "Page UserC_02" in the "Submissions to this group" property
And I should see "Page UserC_03" in the "Submissions to this group" property
And I should see "Collection UserC_01" in the "Collections shared with this group" property
And I should not see "Collection UserC_03" in the "Collections shared with this group" property
And I should see "Collection UserC_04" in the "Collections shared with this group" property
And I should see "Collection UserC_02" in the "Submissions to this group" property
And I should see "Collection UserC_03" in the "Submissions to this group" property
And I log out
Given I log in as "UserB" with password "Kupuhipa1"
# Verifying log in was successful
And I should see "Bob"
And I should see "GroupD"
And I follow "GroupD"
And I should see "Page UserC_01" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserC_02" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserC_03" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserC_04" in the "ul#sharedviewlist" "css_element"
And I should see "Collection UserC_01" in the "ul#sharedcollectionlist" "css_element"
And I should not see "Collection UserC_02" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserC_03" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserC_04" in the "ul#sharedcollectionlist" "css_element"
And I should see "Page UserC_01" in the "Pages shared with this group" property
And I should not see "Page UserC_02" in the "Pages shared with this group" property
And I should see "Page UserC_03" in the "Pages shared with this group" property
And I should see "Page UserC_04" in the "Pages shared with this group" property
And I should see "Collection UserC_01" in the "Collections shared with this group" property
And I should not see "Collection UserC_02" in the "Collections shared with this group" property
And I should see "Collection UserC_03" in the "Collections shared with this group" property
And I should see "Collection UserC_04" in the "Collections shared with this group" property
And I log out
# Share and submit pages and collections - for course group "GroupC"
# Log in as a normal user
......@@ -359,14 +359,14 @@ These list must take into account the sort option chosen in the block config (Bu
# Share pages and collections to the "GroupC"
# Edit access for Page UserC_09, Page UserC_11, Page UserC_12
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages" in the "div#main-column-container" "css_element"
And I follow "Pages"
And I click on "Edit access" in "Page UserC_09" row
And I set the select2 value "Page UserC_09, Page UserC_11, Page UserC_12" for "editaccess_views"
And I select "GroupC" from "accesslist[0][searchtype]"
And I press "Save"
# Edit access for Collection UserC_05, Collection UserC_07, Collection UserC_08
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Collections" in the "div#main-column-container" "css_element"
And I follow "Collections"
And I click on "Edit access" in "Collection UserC_05" row
And I set the select2 value "Collection UserC_05, Collection UserC_07, Collection UserC_08" for "editaccess_collections"
And I select "GroupC" from "accesslist[0][searchtype]"
......@@ -402,15 +402,15 @@ These list must take into account the sort option chosen in the block config (Bu
And I should see "Bob"
And I should see "GroupC"
And I follow "GroupC"
And I should see "Page UserC_09" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserC_10" in the "ul#sharedviewlist" "css_element"
And I should not see "Page UserC_11" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserC_12" in the "ul#sharedviewlist" "css_element"
And I should see "Page UserC_10" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserC_11" in the "ul#allsubmissionlist" "css_element"
And I should see "Collection UserC_05" in the "ul#sharedcollectionlist" "css_element"
And I should not see "Collection UserC_06" in the "ul#sharedcollectionlist" "css_element"
And I should not see "Collection UserC_07" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserC_08" in the "ul#sharedcollectionlist" "css_element"
And I should see "Collection UserC_06" in the "ul#allsubmissionlist" "css_element"
And I should see "Collection UserC_07" in the "ul#allsubmissionlist" "css_element"
And I should see "Page UserC_09" in the "Pages shared with this group" property
And I should not see "Page UserC_10" in the "Pages shared with this group" property
And I should not see "Page UserC_11" in the "Pages shared with this group" property
And I should see "Page UserC_12" in the "Pages shared with this group" property
And I should see "Page UserC_10" in the "Submissions to this group" property
And I should see "Page UserC_11" in the "Submissions to this group" property
And I should see "Collection UserC_05" in the "Collections shared with this group" property
And I should not see "Collection UserC_06" in the "Collections shared with this group" property
And I should not see "Collection UserC_07" in the "Collections shared with this group" property
And I should see "Collection UserC_08" in the "Collections shared with this group" property
And I should see "Collection UserC_06" in the "Submissions to this group" property
And I should see "Collection UserC_07" in the "Submissions to this group" property
......@@ -32,7 +32,7 @@ Scenario: Showing contextual help for pages under menu "Portfolio" (Bug 809297).
And I click on "Help"
Then I should see "Designing your page layout enables you to personalise the way in which your resources and information can be displayed."
And I follow "Close help"
Given I click on "Settings" in the "div#main-column-container" "css_element"
Given I click on "Settings" in the "Toolbar buttons" property
And I click on "Help"
# Tags
Then I should see "You can add tags to artefacts, pages and collections you create."
......@@ -41,9 +41,9 @@ Scenario: Showing contextual help for pages under menu "Portfolio" (Bug 809297).
And I click on "Add"
And I click on "Collection"
# Edit collection settings
And I click on "Help" in the "h1.page-header" "css_element"
And I click on "Help" in the "h1 heading" property