Commit 68fa314d authored by Robert Lyon's avatar Robert Lyon

Fixing up the last of the @failed tests to pass

Change-Id: I563eb236711677ddc637f9cd8a4296fdaedde009
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent 03de62f8
......@@ -1095,4 +1095,46 @@ class BehatGeneral extends BehatBase {
$this->i_accept_confirm_popup();
}
}
\ No newline at end of file
/**
* Scroll element into view and align top of element with the top of the visible area.
*
* @When I scroll to the id :id
*
*/
public function i_scroll_into_view($id) {
$function = <<<JS
(function(){
var elem = document.getElementById("$id");
elem.scrollIntoView(true);
})()
JS;
try {
$this->getSession()->executeScript($function);
}
catch(Exception $e) {
throw new \Exception("scrollIntoView failed");
}
}
/**
* Scroll element into view and align bottom of element with the bottom of the visible area.
*
* @When I scroll to the base of id :id
*
*/
public function i_scroll_into_view_base($id) {
$function = <<<JS
(function(){
var elem = document.getElementById("$id");
elem.scrollIntoView(false);
})()
JS;
try {
$this->getSession()->executeScript($function);
}
catch(Exception $e) {
throw new \Exception("scrollIntoView failed");
}
}
}
@javascript @failed
@javascript @core
Feature: A user selects contact us from homepage and creates a message
In order to view the message
As user/admin
......@@ -16,6 +16,7 @@ Scenario: Checking that admin user can view messages in their mail sent from Con
# Trigger the cron and make sure all jobs are done
# TODO: run all cron jobs
And I trigger cron
And I wait "2" seconds
And I go to the homepage
And I log in as "admin" with password "Kupuhipa1"
And I click on "mail"
......
@javascript @core_artefact @core_content @artefact_comment @failed
@javascript @core @core_artefact @core_content @artefact_comment
Feature: Threaded comments
In order to see earliest/latest threaded comments to a page
As a mahara user I should see threaded comments in the right order
......@@ -44,40 +44,51 @@ Scenario: Threaded comments should be displayed in correct order
And I fill in "Comment #12" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
# Go to the first page
And I scroll to the base of id "comment-form"
And I follow "1"
And I should see "Comment #1"
And I should see "Comment #10"
And "Comment #2" "text" should appear before "Comment #3" "text"
And I should not see "Comment #11"
# Go to the second page
And I scroll to the base of id "comment-form"
And I follow "2"
And I should see "Comment #11"
And "Comment #11" "text" should appear before "Comment #12" "text"
And I should not see "Comment #10"
# Reply to a comment
And I scroll to the base of id "comment-form"
And I follow "1"
And I scroll to the base of id "main-nav"
And I click on "Reply" in "Comment #1" row
And I fill in "Comment #1/1" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
And "Comment #1/1" "text" should appear before "Comment #2" "text"
And I scroll to the id "feedbacktable"
And I click on "Reply" in "Comment #1/1" row
And I fill in "Comment #1/1/1" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
And I scroll to the id "feedbacktable"
And I click on "Reply" in "Comment #1/1" row
And I fill in "Comment #1/1/2" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
And I scroll to the id "feedbacktable"
And I click on "Reply" in "Comment #1/1/1" row
And I fill in "Comment #1/1/1/1" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
And I scroll to the id "feedbacktable"
And I click on "Reply" in "Comment #1/1/1/1" row
And I fill in "Comment #1/1/1/1/1" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
And I scroll to the id "feedbacktable"
And I click on "Reply" in "Comment #1/1/1/1" row
And I fill in "Comment #1/1/1/1/2" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
And I scroll to the id "feedbacktable"
And I click on "Reply" in "Comment #1/1" row
And I fill in "Comment #1/1/3" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
And I scroll to the base of id "feedbacktable"
And I click on "Reply" in "Comment #1/1/2" row
And I fill in "Comment #1/1/2/1" in WYSIWYG editor "add_feedback_form_message_ifr"
And I press "Comment"
......
@javascript @core_content @failed
@javascript @core @core_content
Feature: Creating a plan and adding a number of tasks to the plan
As a user
In order to test the pagination of the plan
......@@ -91,6 +91,7 @@ Scenario: Creating a plan with 11 tasks
And I press "Create page"
And I press "Save"
And I expand "General" node
And I wait "1" seconds
And I follow "Plans" in the "div#general" "css_element"
And I press "Add"
And I set the following fields to these values:
......@@ -98,6 +99,7 @@ Scenario: Creating a plan with 11 tasks
| Tasks to display | 5 |
And I press "Save"
And I display the page
And I scroll to the base of id "feedback_pagination"
And I follow "Next page"
Then I should see "Build utopia"
And I follow "Next page"
......
@javascript @core_group
@javascript @core @core_group
Feature: Show the block "Group pages" in the group homepage
In order to see group pages, shared and submitted pages/collections to a group
As a group member or group admin
......@@ -141,6 +141,7 @@ These list must take into account the sort option choosen in the block config (B
And I follow "Group Z"
And I follow "Pages" in the "ul.nav-inpage" "css_element"
And I click on "Edit \"Group homepage\""
And I scroll to the id "column-container"
And I configure the block "Group pages"
And I set the following fields to these values:
| Sort group pages by | Most recently updated |
......@@ -164,6 +165,7 @@ These list must take into account the sort option choosen in the block config (B
And I should not see "Page Group Z_06" in the "ul#groupviewlist" "css_element"
# Update the shared page "Page userA_01"
And I choose "Portfolio"
And I scroll to the id "searchresultsheading"
And I click on "Edit \"Page userA_01\""
And I follow "Edit title and description"
And I set the field "Page description" to "<p>This is the page 01 (updated)</p>"
......@@ -213,6 +215,7 @@ These list must take into account the sort option choosen in the block config (B
And I log out
Given I log in as "userB" with password "Kupuhipa1"
And I should see "Group Z"
And I choose "My groups" in "Groups"
And I follow "Group Z"
And I select "Page userB_01" from "group_view_submission_form_2_options"
And I press "Submit"
......@@ -223,6 +226,7 @@ These list must take into account the sort option choosen in the block config (B
And I log out
# Check the list of submitted pages/collections
Given I log in as "userA" with password "Kupuhipa1"
And I choose "My groups" in "Groups"
And I follow "Group Z"
And I should see "Page userB_02" in the "ul#allsubmissionlist" "css_element"
And I should see "Page userB_01" in the "ul#allsubmissionlist" "css_element"
......
@javascript @core_group
@javascript @core @core_group
Feature: Notification when a user is about to reach his quota
In order to verify notification when reaching a quota
As an admin create users
......@@ -17,7 +17,7 @@ Scenario Outline: When quota notification threshold is changed, send notificatio
# Modifying user quota quota to 2MB
And I follow "Administration"
And I follow "Extensions"
And I follow "Configuration for artefact file"
And I go to "admin/extensions/pluginconfig.php?plugintype=artefact&pluginname=file&type=file"
And I follow "Default user quota"
# Clearning the tex box first to enter 2 MB
And I fill in "Default quota" with ""
......
@javascript @core_group
@javascript @core @core_group
Feature: Sending notification message when someone leaves a feedback message in a group page
In order to notify a user of a feedback message in a group page
As an user I place feedback
......@@ -36,6 +36,7 @@ Scenario: Leaving feedback on a group page (Bug 1426983)
# Log in as "Admin" user
When I log in as "admin" with password "Kupuhipa1"
# Checking notification display on the dashboard
And I wait "1" seconds
Then I should see "New feedback on Testing group page 01"
# Checking notifications also appear in my inbox
And I follow "mail"
......
@javascript @core_group
@javascript @core @core_group
Feature: Show created or updated time for shared pages to a group
In order to see shared pages
As as admin
......@@ -26,6 +26,7 @@ Scenario: Displaying shared pages in most recently updated order (Bug 1490569)
And I follow "Groups"
And I follow "testgroup"
And I follow "Edit this page"
And I scroll to the id "column-container"
And I configure the block "Group pages"
When I set the following fields to these values:
| Sort shared pages and collections by | Most recently updated |
......
@javascript @core_institution @core_administration
@javascript @core @core_institution @core_administration
Feature: Changing the configuration when adding an institution.
In order to change the way an institution is configured
As an admin
......
@javascript @core_messages
@javascript @core @core_messages
Feature: Clicking on Inbox
In order to click on the Inbox block's 'More' link
As a student user
......@@ -29,6 +29,7 @@ Scenario: Clicking on the Inbox link on the right menu (Bug 1427019)
# Log in as users
Given I log in as "userA" with password "Kupuhipa1"
# Navigating to the Inbox via the 'more' link in the Inbox block
And I wait "1" seconds
And I follow "More"
# Verifying that you do not see a page full of error messages
And I should not see "Call stack"
......
@javascript @core_messages
@javascript @core @core_messages
Feature: Send messages to other users
In order to send a message to another user
As an admin I need to create an user
......@@ -45,6 +45,7 @@ Scenario: Sending messages between user and admin (Bug 1426983)
Then I log in as "Bob" with password "Kupuhipa1"
# Confirming all messages has been received
And I am on homepage
And I wait "1" seconds
And I should see "Hi there"
And I follow "mail"
And I should see "Hi there"
......
@javascript @core_view
@javascript @core @core_view
Feature: Added ID's for text blocks
In order to change the settings of a block
As an admin
......@@ -19,7 +19,7 @@ Scenario: Clicking ID's (Bug 1428456)
| Block content | <p>Stately, plump Buck Mulligan came from the stairhead, bearing a bowl of lather on which a mirror and a razor lay crossed ...</p> |
And I press "Save"
Then I should see "Buck Mulligan"
And I reload the page
And I follow "Text"
And I press "Add"
And I wait "1" seconds
......
@javascript @core_view @core_portfolio
@javascript @core @core_view @core_portfolio
Feature: Adjusting the max items limit on the Shared with me page.
In order to be able to display a set amount of items on the shared with me page
......@@ -66,6 +66,7 @@ As an admin
| A's Page 50 | UserA's page 02 | user | userA |
| A's Page 51 | UserA's page 01 | user | userA |
When I follow "Portfolio"
And I scroll to the id "searchresultsheading"
And I follow "A's Page 01"
And I follow "Edit this page"
And I follow "Share page"
......
@javascript @share_comments
@javascript @core @share_comments
Feature: Added ID's for text blocks
In order for allow and moderate comments to save correctly
As an admin
......@@ -33,11 +33,14 @@ Scenario: Correctly saving access rules for allowing comments (Bug 1201174)
Then I should see "Edit access"
When I set the following fields to these values:
| accesslist[0][searchtype] | Test Group1 |
And I scroll to the base of id "main-nav"
Then I expand "Advanced options" node
And I set the following fields to these values:
|Allow comments | 0 |
| Allow comments | 0 |
Then I should see "Comments" in the "table#accesslisttable" "css_element"
When I enable the switch "accesslist[0][allowcomments]"
And I scroll to the base of id "accesslisttable"
And I set the following fields to these values:
| accesslist[0][allowcomments] | 1 |
And I press "Save"
Then I should see "Share"
......
@javascript @core_view @core_portfolio
@javascript @core @core_view @core_portfolio
Feature: Adding the contextual help for pages in "Portfolio"/"Skins" menu
In order to see the contextual help for pages in "Portfolio"/"Skins" menu
As a student
......@@ -19,6 +19,7 @@ Scenario: Accessing help icons under Skin tabs (Bug 1411070)
And I choose "Skins" in "Portfolio"
When I click on "Help"
And I should see "Skins help you customise the look of your portfolio pages to give them a personal touch." in the "div#helpstop" element
And I follow "Close help"
And I follow "Create skin"
And I click on "Help"
Then I should see "You can design your own skin" in the "div#helpstop" element
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment