Commit 8b235e61 authored by Rebecca Blundell's avatar Rebecca Blundell Committed by Robert Lyon

Bug 1742600: update chromedriver for behat tests

I have successfully run tests with the new version of chromedriver
(2.35) and chrome (63). I thought the best way to test further was to
let maharabot run the test suite and see if any issues come up.

failing tests are now fixed.

behatnotneeded

Change-Id: I22e45e8a95669e2109ca70ae782aa2c40546db14
parent 19596d44
......@@ -1099,6 +1099,25 @@ class BehatGeneral extends BehatBase {
$this->i_accept_confirm_popup();
$this->wait_until_the_page_is_ready();
}
/**
* Scroll to top of page
*
* @When I scroll to the top
*
*/
public function i_scroll_to_top() {
$function = <<<JS
(function(){
window.scrollTo(0,0);
})()
JS;
try {
$this->getSession()->executeScript($function);
}
catch(Exception $e) {
throw new \Exception("scrollToTop failed");
}
}
/**
* Scroll element into view and align top of element with the top of the visible area.
......
......@@ -35,6 +35,7 @@ Scenario: Editing admin profile page (Bug: 1426983)
# Verifying the settings saved
And I should see "Profile saved successfully"
# Updating Social media tab
And I scroll to the top
And I follow "Social media"
And I follow "New social media account"
And I fill in the following:
......@@ -42,6 +43,7 @@ Scenario: Editing admin profile page (Bug: 1426983)
| Your URL or username | https://twitter.com/MaharaProject |
And I press "Save"
# Verifying the settings held, navitgating to dashboard page to check
And I scroll to the top
Then I follow "Dashboard"
And I should see "Test Admin"
# Resetting/Editing details
......@@ -56,6 +58,7 @@ Scenario: Editing admin profile page (Bug: 1426983)
# Verifing settings saved
And I should see "Profile saved successfully"
# Editing contact information
And I scroll to the top
And I follow "Contact information"
And I press "Add email address"
And I fill in the following:
......@@ -72,6 +75,7 @@ Scenario: Editing admin profile page (Bug: 1426983)
And I press "Save profile"
And I should see "Profile saved successfully"
# Verifying changes has been made navigating to dashboard page to checked
And I scroll to the top
Then I follow "Dashboard"
And I should see "Admin User"
......
......@@ -27,6 +27,7 @@ Scenario: Creating an Institution assigning users and changing their passwords
| password | mahara1 |
And I select "Institution One" from "Institution"
And I enable the switch "Institution administrator"
And I scroll to the top
And I press "Create user"
# Creating user 2
And I follow "Users"
......@@ -38,6 +39,7 @@ Scenario: Creating an Institution assigning users and changing their passwords
| username | jen |
| password | mahara1 |
And I select "Institution One" from "Institution"
And I scroll to the top
And I press "Create user"
# Log out as user admin
And I follow "Logout"
......
......@@ -20,6 +20,7 @@ Scenario: Creating and deleting external links (Selenium 1426983)
And I should see "Item saved"
And I press "Save changes"
# Verifying the link as been added successfully
And I scroll to the top
And I follow "Return to site"
Then I should see "Test Menu Link"
And I follow "Administration"
......
......@@ -47,8 +47,7 @@ Scenario: Clicking randomly around Mahara (Bug: 1426983)
And I choose "Topics" in "Groups"
# Checking messages
# 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 "mail"
And I follow "Inbox" in the ".arrow-bar" "css_element"
And I follow "Sent"
And I follow "Compose"
......
......@@ -133,6 +133,7 @@ Scenario: Newly created user can get a copy of the journal (Bug 1472467)
| Email * | test01@example.com |
| Username * | userA |
| Password * | KKJHH$$67686 |
And I scroll to the top
And I press "Create user"
# Logging in as new user
And I follow "Log in as this user"
......
......@@ -22,6 +22,7 @@ Scenario: Creating and accessing social media buttons (Bug 1448948)
| Social network * | Facebook URL |
| Your URL or username * | https://www.facebook.com/wellingtonphoenixfc |
And I press "Save"
And I scroll to the top
And I follow "Portfolio"
And I press "Create page"
And I set the following fields to these values:
......
......@@ -23,8 +23,8 @@ Scenario: Open badges block
And I wait "1" seconds
And I follow "Open Badges"
And I press "Add"
And I wait "5" seconds
And I wait "7" seconds
Then I should see "Your email test01@example.com is not found in the service"
And I press "Save"
And I wait "1" seconds
And I wait "7" seconds
Then I should see "No public badge collections / badges found."
......@@ -104,7 +104,7 @@ then
SELENIUM_FILENAME=selenium-server-standalone-$SELENIUM_VERSION_MAJOR.$SELENIUM_VERSION_MINOR.jar
SELENIUM_PATH=./test/behat/$SELENIUM_FILENAME
# @todo make this more flexible, cross-platform?
CHROMEDRIVER_PATH=./test/behat/chromedriver-2.26-linux64
CHROMEDRIVER_PATH=./test/behat/chromedriver-2.35-linux64
# If no Selenium installed, download it
if [ ! -f $SELENIUM_PATH ]; then
......
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