Commit Graph

93 Commits

Author SHA1 Message Date
Andrew Nicols df95c479fc MDL-62653 behat: Ensure that tasks run properly from behat 2018-07-13 13:54:42 +08:00
Treu Quan 30e1f5a023 MDL-60207 javascript: close modal when user touch/click outside it 2018-05-29 10:04:37 +08:00
Andrew Nicols 0cc0f72ceb MDL-60078 behat: Convert ErrorException to DriverException 2018-01-22 11:29:29 +08:00
KietLy 26872a8006 MDL-60078 User tours accessibility: Tab should go back into the pop-up 2018-01-16 17:36:25 +07:00
Mark Nielsen b5be387556 MDL-58948 behat: conditionally execute MoodleSelenium2Driver
There is some specific code being executed that only exists
in the MoodleSelenium2Driver.  Conditionally execute this
code to make it compatible with other Mink drivers.
2017-06-28 12:50:44 -07:00
Mark Nielsen f5459099ae MDL-58948 behat: catch ElementNotFoundException
Another valid exception that can be thrown from a Mink driver
is the ElementNotFoundException when an element has gone missing.
2017-06-28 12:50:11 -07:00
Mark Nielsen 3cf0d01a61 MDL-58948 behat: Fix timeouts without a condition
The second parameter of the wait method should be a string
so passing boolean false was wrong.  The default on for the
script is 'false' which works cross Mink drivers.
2017-06-28 12:50:10 -07:00
Rajesh Taneja ade50a118a MDL-58056 behat: Catch webdriver exception if element removed
While checking for element visibility, ensure
that element is there in dom
2017-02-23 14:44:43 +08:00
Jake Dallimore ff4230d88e MDL-54751 behat: Support for adhoc module and section deletion in behat
Introduced new behat step for running all pending adhoc tasks and
modified the relavant behat tests.
2016-11-07 07:41:59 +08:00
Damyon Wiese ba5c5083c5 MDL-55074 theme_boost: Behat fixes for latest theme changes
Fix I edit profile steps
Apply fixed header in css
Remove transitions from menus for behat
Be more specific about some "I follow" steps
Navigation path changes
"Current course" node removed from nav tree
Adapt tests because there are no default blocks
Force some space between action menu items
2016-10-21 16:06:54 +08:00
Rajesh Taneja 99ad3223a5 MDL-54656 behat: Skip test if db family is not mysql or postgres 2016-08-04 08:46:04 +08:00
Eloy Lafuente (stronk7) 0f20bf7507 Merge branch 'wip-mdl-54589-mac' of https://github.com/rajeshtaneja/moodle 2016-06-22 01:42:15 +02:00
Rajesh Taneja fba0ac63b8 MDL-54589 behat: Added hack for some OS/browsers 2016-06-20 16:03:36 +08:00
sam marshall 5a14c4d948 MDL-54920 Behat: Allow viewport size to be set consistently
Provides a new Behat step

And I set viewport size to "800x600"
2016-06-14 12:28:24 +01:00
Marina Glancy df003a85f0 MDL-53443 mod_feedback: templates code clean up and behat tests 2016-04-13 09:21:33 +08:00
Rajesh Taneja 921faad9ad MDL-53571 behat: Use Escaper for escaping
xpathLiteral has been depreacted, use Escaper instead
2016-04-06 15:38:31 +08:00
Rajesh Taneja eb9ca848fa MDL-53381 behat: Replaced chained steps with api.
Behat 3.x doesn't support chained steps and hence
this is first step to get rid of chained steps in core.
2016-04-06 11:32:49 +08:00
Rajesh Taneja e01012e96d MDL-46891 behat: Driver specific fixes.
1. Browserkit doesn't handle [] in name
2. Grades are not visible in viewport and might fail
   with few drivers, increasing size of window to ensure
   grades are visible and can be modified.
3. Click edit first to see grade link
4. Expand fields before setting value
5. Updated xpath, as crawler update it.
6. Hover fails to show icon
2016-03-11 10:51:16 +08:00
Rajesh Taneja 42ad096fdb MDL-46891 Behat: Added support for behat 3 2016-03-11 10:51:15 +08:00
sam marshall a4ce565f20 MDL-53012 Behat: Add step to run scheduled task 2016-02-15 17:24:15 +00:00
Ryan Wyllie 77b0811021 MDL-51983 actionmenu: behat tests 2015-11-04 06:36:32 +00:00
Damyon Wiese 031152cc83 MDL-47494 qtype: Fix the behat tests for OU dd question types 2015-09-18 07:56:27 +01:00
rajesh Taneja cd3a6a78b6 MDL-50516 behat: Back/next button reloads page
When next/back button is pressed in phantomjs/browserkit
it reload page, so adding a bug_phantomjs, so that we can
test the lesson re-attempt scenario
2015-09-10 14:30:28 +08:00
Mark Nelson 051b45f864 MDL-50516 core_behat: added ability to go back, forward and reload the browser 2015-09-09 15:27:23 +08:00
Andrew Nicols d245f6757d MDL-51102 behat: Add a non-JS version of wait 2015-08-13 15:56:22 +08:00
Rajesh Taneja d31e69f976 MDL-50116 behat: Fixed xpath for selecting table row 2015-05-19 13:32:32 +08:00
Ankit Agarwal 7a437e3661 MDL-49412 behat: I am on site homepage behat step
Part of MDL-45774.
2015-04-10 17:18:22 +08:00
Tim Hunt ca0ceacd27 MDL-49446 behat: should_not_be_visible steps were not working
I fixed all similar problems in this class, even ones where it did
actually work becuase the two exceptions were of different types.
This pattern seems to have been copied and pasted a lot in this class,
and I am sure that will happen again, so I did not want to leave any
dangerous potential examples around.
2015-03-13 14:28:47 +00:00
David Monllao 1a970e5ca0 MDL-49376 behat: Fixing resize step regex 2015-03-06 10:59:03 +08:00
Andrew Nicols 4ec9e2a613 Revert "Merge branch 'MDL-49154' of git://github.com/timhunt/moodle"
This reverts commit 7a5d394e3c, reversing
changes made to 58d5cc5360.
2015-02-19 08:55:22 +08:00
Tim Hunt 2116de5f80 MDL-49154 behat: step to type with focus on a given element 2015-02-12 20:14:50 +00:00
Rajesh Taneja c3b72e586a MDL-48624 behat: Added extended timeout to ensure step pass
following_should_download_between_and_bytes step sometimes
fails because of server speed. Added extended timout
ensuring they wait enough before failing.
Also, not calling force download while running behat site
2015-01-30 08:54:12 +08:00
Andrew Nicols 1cb5f61213 Revert "Merge branch 'wip-mdl-48624-m' of https://github.com/rajeshtaneja/moodle"
This reverts commit e08f58288a, reversing
changes made to 782ea98c59.
2015-01-22 12:13:35 +08:00
Andrew Nicols 81a9b9cee3 Merge branch 'wip-mdl-48761' of https://github.com/rajeshtaneja/moodle 2015-01-21 10:21:24 +08:00
Rajesh Taneja d58b0ad6f1 MDL-48761 behat: Added new step for debugging scenarios 2015-01-21 10:16:22 +08:00
Rajesh Taneja e41aa29bca MDL-48624 behat: Added extended timeout to ensure step pass
following_should_download_between_and_bytes step sometimes
fails because of server speed. Added extended timout
ensuring they wait enough before failing.
Also, not calling force download while running behat site
2015-01-19 10:15:47 +08:00
Dan Poltawski e04cf8d83f MDL-48653 behat: fix incorrect phpdoc 2014-12-22 13:12:48 +00:00
Tim Hunt 20dd5a7a7a MDL-48653 behat: Steps to click and dismiss a dialogue.
We already had the corresponding
    I click on "Home" "link" confirming the dialogue
but I needed the opposite
    I click on "Home" "link" dismissing the dialogue
2014-12-18 19:29:29 +00:00
Tim Hunt dd2e1c222a MDL-48373 behat: find table columns better.
It was not possible to select the question bank 'Created by'
or 'Modified by' columns without this change.
2014-12-05 12:22:26 +00:00
Eloy Lafuente (stronk7) a610c9abac MDL-48374 behat: Added missing $session 2014-12-04 12:14:30 +00:00
Rajesh Taneja 9f3a68fe61 MDL-48374 behat: Check flag before searching for span on page 2014-12-04 12:04:37 +00:00
Andrew Nicols 1b2c35af34 MDL-48374 behat: improved page load detection
Check that page load detection was correctly started before testing that a
new page was loaded.

Without this, it is possible to have mutliple subsequent cases of:
    And a new page should have loaded since I started watching

Without first starting the page load detection.
2014-12-04 12:04:36 +00:00
Sam Hemelryk a33fed2161 MDL-48374 behat: improved page load exceptions
The following improvements have been made to the page load watching:
* Improved the exceptions when a page load expectation fails.
* Added an exception if start watching happens twice without a page load.
* Improved the page load span and xpath to make it faster and less likely
  to interfer in the future.
2014-12-02 11:43:58 +13:00
Tim Hunt a109a3ca35 MDL-48374 behat: new steps for detecting page loads. 2014-12-02 08:57:28 +13:00
Tim Hunt a92105fd3f MDL-47588 behat: fix switching back to the main window in Chrome
This fix is mostly based on what Colin Chambers found out. This commit
is a simplification of his work.

The problem is that the Chrome / Selenium 2 integration cannot swich to
a window with a blank name. The work-around applied here is, when we
switch away from an unnamed window, we set a name on it. Then we can use
that name to switch back.
2014-10-20 12:10:14 +01:00
Tim Hunt cb7db63b5d MDL-47497 behat: steps for basic download testing.
These steps were created by sam marshall and Jes Ackland-Snow at the Open
University. I just altered them to make them a bit more generic, and
submitted them to Moodle core, at the point when I wanted to reuse them
in another plugin.

This commit introduces two new steps:

Then following "XXX" should download "YY" bytes
Then following "XXX" should download between "YY" and "ZZ" bytes

At the moment, this only works for links with href attributes.
2014-10-08 19:43:09 +08:00
Marina Glancy 97329f1bc1 MDL-47492 behat: refer to table column indexes instead of names 2014-10-03 13:55:25 +08:00
Marina Glancy bd855fd572 MDL-35468 behat: escape user supplied strings in xpath 2014-09-12 10:23:55 +08:00
Rajesh Taneja 3c7bfae29c MDL-46572 behat: extended table head look up to check if header is link
Header can be a link, this step will now look if
header has a text or header link has the text

Part of MDL-46191
2014-08-28 13:06:45 -07:00
Mark Nelson 08678f6f45 MDL-46923 core_behat: fixed typos in function names 2014-08-20 22:09:29 -07:00