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
......
......@@ -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
Then I should see "Here you may give your collection a title and description to give people an idea of what your collection is about."
And I follow "Help" in the "div#edit_tags_container" "css_element"
And I follow "Help" in the "Tags section" property
Then I should see "You can add tags to artefacts, pages and collections you create. Tags are descriptive labels that allow you to find your content later on more easily."
And I set the field "Collection name" to "Collection 01"
And I press "Next: Edit collection pages"
......
......@@ -7,13 +7,13 @@ The big homepage buttons should navigate to their correct places
Scenario: Checking navigation of the big homepage buttons
Given I log in as "admin" with password "Kupuhipa1"
And I click on "Develop your portfolio"
Then I should see "Pages and collections" in the "h1" "css_element"
Then I should see "Pages and collections" in the "h1 heading" property
And I am on homepage
And I click on "Control your privacy"
Then I should see "Share" in the "h1" "css_element"
Then I should see "Share" in the "h1 heading" property
And I am on homepage
And I click on "Find people and join groups"
Then I should see "Find groups" in the "h1" "css_element"
Then I should see "Find groups" in the "h1 heading" property
And I am on homepage
And I click on "Hide information box"
Then I should see "You have hidden the information box."
......
......@@ -50,7 +50,7 @@ Scenario: Clicking randomly around Mahara (Bug: 1426983)
# And I click on "Show user menu" # problem with chrome driver clicking on user icon instead
# And I follow "mail"
And I choose "mail" from user menu by id
And I follow "Inbox" in the ".arrow-bar" "css_element"
And I follow "Inbox" in the "Arrow-bar nav" property
And I follow "Sent"
And I follow "Compose"
# Checking Homepage
......
......@@ -40,37 +40,31 @@ The list of shared pages must take into account of access date (Bug 1374163)
Given I log in as "UserA" with password "Kupuhipa1"
# Edit access for Page 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 select "GroupA" from "accesslist[0][searchtype]"
And I fill in "accesslist[0][startdate]" with "2015/06/15 03:00"
And I press "Save"
# Edit access for Page UserA_02
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages"
And I should see "GroupA"
# Edit access for Page 02
And I follow "Pages" in the "div#main-column-container" "css_element"
And I click on "Edit access" in "Page UserA_02" row
And I select "GroupA" from "accesslist[0][searchtype]"
And I fill in "accesslist[0][stopdate]" with "2015/04/15 02:50"
And I press "Save"
And I should see "The end date for 'group' access cannot be in the past."
And I press "Cancel"
# Edit access for Page 02
#And I follow "Pages" in the "div#main-column-container" "css_element"
#And I click on "Edit access" in "Page UserA_02" row
#And I select "GroupA" from "accesslist[0][searchtype]"
#And I fill in "accesslist[0][startdate]" with "2015/06/15 03:00"
#And I fill in "accesslist[0][stopdate]" with "+2 days" date in the format "Y/m/d"
#And I press "Save"
# Edit access for Page 03
And I follow "Pages" in the "div#main-column-container" "css_element"
# Edit access for Page UserA_03
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages"
And I click on "Edit access" in "Page UserA_03" row
And I follow "Advanced options"
And I fill in the following:
| Access start date/time | 2015/06/15 00:00 |
And I press "Save"
# Edit access for Page 05
And I follow "Pages" in the "div#main-column-container" "css_element"
# Edit access for Page UserA_05
And I choose "Shared by me" in "Portfolio" from main menu
And I follow "Pages"
And I click on "Edit access" in "Page UserA_05" row
And I select "GroupA" from "accesslist[0][searchtype]"
And I press "Save"
......
......@@ -21,7 +21,7 @@ Scenario: Accessing annotation block
# Navigating to admin block to turn it on
And I choose "Plugin administration" in "Extensions" from administration menu
And I press "activate_blocktype_annotation_submit"
And I should see "Hide" in the "form#activate_module_framework" "css_element"
And I should see "Hide" in the "smartevidence" property
And I choose "Settings" in "Institutions" from administration menu
And I press "Edit"
And I enable the switch "Allow SmartEvidence"
......
......@@ -34,9 +34,9 @@ Scenario: Installing framework module and activating for an institution
Given I log in as "admin" with password "Kupuhipa1"
And I choose "Plugin administration" in "Extensions" from administration menu
Then I should see "smartevidence"
And I should see "Hide" in the "form#activate_module_framework" "css_element"
And I should see "Hide" in the "smartevidence" property
# Also make sure the annotation blocktype plugin is active
And I press "Show" in the "form#activate_blocktype_annotation" "css_element"
And I press "Show" in the "annotation" property
# Make sure we have a matrix config form
And I choose "SmartEvidence" in "Extensions" from administration menu
......@@ -67,9 +67,9 @@ Scenario: Installing framework module and activating for an institution
And I click the panel "Collection admin_01"
And I should see "You are on page 1/9"
And I should see "by Admin User (admin)"
And I press "Next" in the "table#tablematrix" "css_element"
And I press "Next" in the "matrix table" property
Then I should see "Page admin_06"
And I press "Prev" in the "table#tablematrix" "css_element"
And I press "Prev" in the "matrix table" property
Then I should not see "Page admin_06"
# Click on a matrix point to add an annotation
......
......@@ -31,4 +31,4 @@ Scenario: Viewing a list of pages I watch from the dashboard (Bug 1444784)
# Check we can see watched page and not an un-watched page
And I am on homepage
Then I should not see "Page UserA_02"
And I should see "Page UserA_01" in the "ul#watchlistblock" "css_element"
And I should see "Page UserA_01" in the "Watched pages" property
......@@ -70,7 +70,7 @@ Scenario: Add comments block to page
# Add a comments block so that comments will now be at the top of the page
And I expand "General" node
And I wait "1" seconds
And I follow "Comments" in the "div#general" "css_element"
And I follow "Comments" in the "blocktype sidebar" property
And I press "Add"
Then I should see "Comments for this page will be displayed here rather than at the bottom of the page."
And I display the page
......
......@@ -16,7 +16,7 @@ Scenario: Creating a group and adding users to it (Selenium)
And I disable the switch "Open"
And I enable the switch "Friend invitations"
And I press "Save group"
And I should see "Journals" in the "div.arrow-bar" "css_element"
And I should see "Journals" in the "Arrow-bar nav" property
# Create Request only group
And I choose "Groups" from main menu
And I follow "Create group"
......@@ -45,5 +45,5 @@ Scenario: Creating a group and adding users to it (Selenium)
And I should see "Public discussion"
# Check if the group report page is there
And I follow "Public discussion"
And I follow "Report" in the ".arrow-bar" "css_element"
And I follow "Report" in the "Arrow-bar nav" property
Then I should see "There are no pages shared with this group yet"
......@@ -29,7 +29,7 @@ Scenario: Check modal is working for the "Edit group memebership" on find people
# Log in as "Admin" user
Given I log in as "admin" with password "Kupuhipa1"
And I choose "Find people" in "Groups" from main menu
And I follow "2" in the "div#friendslist_pagination" "css_element"
And I follow "2" in the "Find people results" property
And I follow "Edit group membership"
# allow the modal to open
And I wait "1" seconds
......
......@@ -22,11 +22,11 @@ Scenario: As a user leaving a public comment on a group page (Bug 1509129)
Given I log in as "UserA" with password "Kupuhipa1"
And I choose "Groups" from main menu
# Changing the settings of the block to change comment notification
And I click on "Settings" in the "div.groupuserstatus" "css_element"
And I click on "Settings" in "Group A" row
And I set the following fields to these values:
| Comment notifications | None |
And I press "Save group"
When I click on "Pages and collections" in the ".right-text" "css_element"
When I click on "Pages and collections" in the "Arrow-bar nav" property
And I follow "Add"
And I click on "Page" in the dialog
And I set the following fields to these values:
......@@ -47,9 +47,9 @@ Scenario: As a user leaving a public comment on a group page (Bug 1509129)
When I follow "GroupA"
Then I should see "About | GroupA"
When I follow "Pages and collections (tab)"
Then I should see "Group Page 01" in the "h3.panel-heading" "css_element"
Then I should see "Group Page 01" in the "Pages and Collections boxes" property
And I click the panel "Group Page 01"
Then I should see "Adding a comment to this field. Student = Awesome!" in the "div.comment-text" "css_element"
Then I should see "Adding a comment to this field. Student = Awesome!" in the "Comment text" property
# As part of consolidating behat tests, this scenario has been added.
# Original feature title: Sending notification message when someone leaves a comment in a group page
......
......@@ -46,7 +46,7 @@ Scenario: Creating a group and adding members to it (Bug 1426983)
# Going to Groups and setting it to sort by
And I choose "Groups" from main menu
And I follow "Testing Group 1"
And I follow "Members" in the ".arrow-bar" "css_element"
And I follow "Members" in the "Arrow-bar nav" property
# Verifying they are out of order first
And "Angela User (UserA)" "link" should appear before "Bob User (UserB)" "link"
And I select "Name Z to A" from "sorted by:"
......
......@@ -23,7 +23,7 @@ Scenario: Copying a group page retains title (Bug 1519374)
# Make the group page copyable
Given I log in as "UserA" with password "Kupuhipa1"
When I go to group "GroupA"
And I follow "Share" in the "ul.nav-inpage" "css_element"
And I follow "Share" in the "Arrow-bar nav" property
And I click on "Edit access" in "Page GroupA_01" row
And I follow "Advanced options"
And I set the following fields to these values:
......
......@@ -34,7 +34,7 @@ Feature: Mahara user permissions in institutions
And I choose "Pages and collections" in "Institutions" from administration menu
And I follow "Page InstOne_01"
And I follow "Edit this page"
And I follow "Share" in the "#toolbar-buttons" "css_element"
And I follow "Share" in the "Toolbar buttons" property
Then the "accesslist[0][searchtype]" select box should contain "Institution One"
And the "accesslist[0][searchtype]" select box should not contain "Institution Two"
And I choose "User search" in "Users" from administration menu
......@@ -48,7 +48,7 @@ Feature: Mahara user permissions in institutions
And I choose "Pages and collections" in "Institutions" from administration menu
And I follow "Page InstOne_01"
And I follow "Edit this page"
And I follow "Share" in the "#toolbar-buttons" "css_element"
And I follow "Share" in the "Toolbar buttons" property
Then the "accesslist[0][searchtype]" select box should contain "Institution One"
And the "accesslist[0][searchtype]" select box should contain "Institution Two"
And I log out
......
......@@ -27,7 +27,7 @@ Scenario: Moderating a group comment when approve comments is turned on
And I set the field "Comment" to "This is a comment from UserC"
And I enable the switch "Make comment public"
And I press "Comment"
Then I should see "You have requested that this comment be made public." in the ".feedbacktable" "css_element"
Then I should see "You have requested that this comment be made public." in the "Comment feedbacktable" property
And I log out
# Checking that normal group member is not able to moderate comment
......
......@@ -29,7 +29,7 @@ Scenario: Correctly saving access rules for allowing comments (Bug 1201174)
Then I should see "Page saved successfully"
# Sharing Page
When I follow "Share" in the "#toolbar-buttons" "css_element"
When I follow "Share" in the "Toolbar buttons" property
Then I should see "Edit access"
When I set the following fields to these values:
| accesslist[0][searchtype] | Test Group1 |
......@@ -38,10 +38,9 @@ Scenario: Correctly saving access rules for allowing comments (Bug 1201174)
When I choose "Portfolio" from main menu
And I follow "Group page1"
And I follow "Edit this page"
When I follow "Share" in the "#toolbar-buttons" "css_element"
When I follow "Share" in the "Toolbar buttons" property
And I scroll to the base of id "accessurl_more_open"
And I should see "Advanced options" in the "legend" "css_element"
And I follow "Advanced options" in the "legend" "css_element"
And I follow "Advanced options"
And I disable the switch "Allow comments"
And I scroll to the id "accessurl_submit_container"
And I press "Save"
......@@ -49,7 +48,7 @@ Scenario: Correctly saving access rules for allowing comments (Bug 1201174)
When I choose "Portfolio" from main menu
And I follow "Group page1"
And I follow "Edit this page"
When I follow "Share" in the "#toolbar-buttons" "css_element"
When I follow "Share" in the "Toolbar buttons" property
And I scroll to the base of id "accessurl_more_open"
And I check "accesslist[0][allowcomments]"
And I press "Save"
......@@ -59,7 +58,7 @@ Scenario: Correctly saving access rules for allowing comments (Bug 1201174)
When I choose "Portfolio" from main menu
And I follow "Group page1"
And I follow "Edit this page"
When I follow "Share" in the "#toolbar-buttons" "css_element"
When I follow "Share" in the "Toolbar buttons" property
Then I should see "Edit access"
And I expand the section "Advanced options"
And the "accesslist[0][allowcomments]" checkbox should be checked
......@@ -62,4 +62,4 @@ Feature: Mahara users submit pages / colelctions to a group
And I choose "Find groups" in "Groups" from main menu
When I click on "GroupA"
And I scroll to the base of id "groupviewlist"
Then I should see "Cecilia User" in the "ul#nosubmissionslist" "css_element"
Then I should see "Cecilia User" in the "Members without a submission to the group" property
......@@ -34,7 +34,7 @@ Scenario: Public comment by page owner, public reply by third party
And I go to portfolio page "Page AdminA_01"
And I click on "Reply" in "Public comment by AdminA" row
# I should see a preview of the reply-to comment below the feedback form
And I should see "Public comment by AdminA" in the ".commentreplyview" "css_element"
And I should see "Public comment by AdminA" in the "Comment preview" property
And I fill in "Public reply by AdminB" in editor "Comment"
When I press "Comment"
Then I should see "Public comment by AdminA"
......@@ -58,7 +58,7 @@ Scenario: Public comment by non-owner, owner can private reply, another non-owne
And I go to portfolio page "Page AdminA_01"
And I click on "Reply" in "Public comment by AdminB" row
# I should not be able to make a private reply to a comment by someone other than the page owner
And I should see "Public" in the "#add_feedback_form_ispublic_container" "css_element"
And I should see "Public" in the "Make comment public status" property
When I fill in "Public reply by AdminC" in editor "Comment"
And I press "Comment"
Then I should see "Public comment by AdminB"
......@@ -78,7 +78,7 @@ Scenario: Private comment by commenter, private reply by page owner, private cou
And I go to portfolio page "Page AdminA_01"
And I click on "Reply" in "Private comment by AdminB" row
# There should be no option to make a public reply to a private comment
And I should see "Private" in the "#add_feedback_form_ispublic_container" "css_element"
And I should see "Private" in the "Make comment public status" property
And I fill in "Private reply by AdminA" in editor "Comment"
And I press "Comment"
And I log out
......@@ -109,7 +109,7 @@ Scenario: No private replies to anonymous comments
And I go to portfolio page "Page AdminA_01"
And I click on "Reply" in "Public comment by anonymous user" row
# I should not be able to make a private reply to a comment by someone other than the page owner
Then I should see "Public" in the "#add_feedback_form_ispublic_container" "css_element"
Then I should see "Public" in the "Make comment public status" property
And I fill in "Public reply by AdminB" in editor "Comment"
And I press "Comment"
And I should see "Public comment by anonymous user"
......
......@@ -37,7 +37,7 @@ Feature: Mahara users can create their blogs
And I follow "Add"
And I click on "Page" in the dialog
And I press "Save"
And I expand "Journals" node in the "div#content-editor-foldable" "css_element"
And I expand "Journals" node in the "blocktype sidebar" property
And I follow "Tagged journal entries"
And I press "Add"
And I fill in select2 input "instconf_tagselect" with "blogentry" and select "blogentry"
......
......@@ -21,7 +21,7 @@ Scenario:
And I click on "Edit" in "Page UserA_01" panel menu
# Configuring the block
And I expand "Media" node
And I follow "PDF" in the "div#fileimagevideo" "css_element"
And I follow "PDF" in the "blocktype sidebar" property
And I press "Add"
And I fill in the following:
| Block title | Mahara about PDF |
......
......@@ -70,7 +70,7 @@ Background:
And I press "Save"
# Creating a Note with a tag
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 fill in select2 input "instconf_tags" with "black" and select "black"
And I press "Save"
......@@ -93,7 +93,7 @@ Background:
#Check tags can be deleted from a page - Bug 1715491
Given I follow "Testing page 2"
And I follow "Edit this page"
And I click on "Settings" in the "div#toolbar-buttons" "css_element"
And I click on "Settings" in the "Toolbar buttons" property
And I clear value "orange (1)" from select2 field "settings_tags"
And I press "Save"
And I display the page
......
......@@ -8,7 +8,7 @@ Scenario Outline: Uploading videos with a different file type (Bug 1445653)
Given I log in as "admin" with password "Kupuhipa1"
When I choose "Files" in "Content" from main menu
And I attach the file "<videoname>" to "File"
Then I should see "<videolink>" in the ".filelist" "css_element"
Then I should see "<videolink>" in the "Filelist table" property
Examples:
| videoname | videolink |
......
......@@ -105,14 +105,14 @@ Scenario: Newly created user can get a copy of the journal (Bug 1472467)
And I press "Save"
# Adding journal block to the page
# Need to access the adding "Journal" block more directly than normal now that "Journals" is a menu item also
And I expand "Journals" node in the "div#content-editor-foldable" "css_element"
And I follow "Journal" in the "div#blog" "css_element"
And I expand "Journals" node in the "blocktype sidebar" property
And I follow "Journal" in the "blocktype sidebar" property
And I press "Add"
And I select the radio "Site journal 1"
And I select "Others will get their own copy of your journal" from "Block copy permission"
And I press "Save"
And I scroll to the id "main-nav"
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 follow "Advanced options"
And I set the following fields to these values:
......