Commit Graph

217 Commits

Author SHA1 Message Date
Andrew Nicols 86d20a95c8 Revert "Merge branch 'MDL-49154_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE"
This reverts commit e0312ddb49, reversing
changes made to 636eb3726c.
2015-02-19 09:18:40 +08:00
Eloy Lafuente (stronk7) e0312ddb49 Merge branch 'MDL-49154_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-02-17 23:47:13 +01:00
Tim Hunt 2a7241b3a1 MDL-49205 behat: fix I set the field with xpath fail message. 2015-02-13 16:16:27 +00:00
Tim Hunt 3d3b2669c9 MDL-49154 behat: step to type with focus on a given element 2015-02-12 20:15:52 +00:00
Rajesh Taneja b6fcba4636 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:55:54 +08:00
Andrew Nicols d02eaee727 Revert "Merge branch 'wip-mdl-48624-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE"
This reverts commit 85ea64f5ee, reversing
changes made to 1db2e142a2.
2015-01-22 12:17:17 +08:00
Andrew Nicols e47d85fadb Merge branch 'wip-mdl-48761-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2015-01-21 10:22:35 +08:00
Rajesh Taneja 68e1853422 MDL-48761 behat: Added new step for debugging scenarios 2015-01-21 10:18:25 +08:00
Eloy Lafuente (stronk7) 41be0b4e02 Merge branch 'MDL-48859_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2015-01-20 18:09:20 +01:00
Rajesh Taneja 5f5c2b846d 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:19:27 +08:00
Rajesh Taneja c8410c245c MDL-43835 behat: Added new step to set field with xpath defined 2015-01-15 11:35:19 +00:00
Dan Poltawski 6a2cd3d21d MDL-48653 behat: fix incorrect phpdoc 2014-12-22 13:13:55 +00:00
Dan Poltawski a163de2fa8 Merge branch 'MDL-48653_27' of git://github.com/timhunt/moodle into MOODLE_27_STABLE 2014-12-22 13:10:48 +00:00
Tim Hunt 0cb5521993 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:31:17 +00:00
David Monllao d70814b233 Merge branch 'MDL-48318-27' of git://github.com/lameze/moodle into MOODLE_27_STABLE 2014-12-16 16:42:19 +08:00
Sam Hemelryk 5e9b48a351 Merge branch 'wip-mdl-48426-m27' of https://github.com/rajeshtaneja/moodle into MOODLE_27_STABLE 2014-12-09 12:13:32 +13:00
Tim Hunt b60fb27879 MDL-48373 behat: generators for questions and categories 2014-12-05 12:19:17 +00:00
Tim Hunt af33173512 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:19:17 +00:00
Rajesh Taneja a9326881bf MDL-48318 behat: Fixed JS Exception
M is not created on all pages, like cron and
Steps which check for exported data. So we need
to ensure M is defined, before using it in
behat_hooks::wait_for_pending_js()
2014-12-05 11:49:50 +08:00
Eloy Lafuente (stronk7) 71b1aefcf6 MDL-48374 behat: Added missing $session 2014-12-04 13:26:58 +01:00
Rajesh Taneja d17de5db94 MDL-48374 behat: Check flag before searching for span on page 2014-12-04 13:26:58 +01:00
Andrew Nicols 4ef9c95b97 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 13:26:58 +01:00
Sam Hemelryk fd6dab3d50 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:44:06 +13:00
Tim Hunt 8fbf748b27 MDL-48374 behat: new steps for detecting page loads. 2014-12-02 08:58:19 +13:00
Rajesh Taneja 1c6e42379e MDL-48426 behat: soft-reset mink session before scenario 2014-12-01 12:40:38 +08:00
Sam Hemelryk 70554009a3 Merge branch 'MDL-23839-27' of git://github.com/andrewnicols/moodle into MOODLE_27_STABLE 2014-11-25 14:07:16 +13:00
Rajesh Taneja b04d715851 MDL-48302 behat: Reset all data, before starting behat suite 2014-11-21 10:44:07 +08:00
Rajesh Taneja b525a13b9e MDL-48302 behat: Reset cache before scenario 2014-11-21 10:43:54 +08:00
Andrew Nicols c2787a78d0 MDL-23839 navigation: Check for assignable course category roles 2014-11-19 08:56:13 +08:00
Tim Hunt 2be10633d8 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-24 17:48:38 +01:00
Tim Hunt d313ad40e6 MDL-47711 behat: make it easier to copy the init.php command. 2014-10-20 12:05:50 +01:00
Tim Hunt 74d0792515 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:54:07 +08:00
Damyon Wiese 3a77bc290a Merge branch 'wip-MDL-47492-m27' of git://github.com/marinaglancy/moodle into MOODLE_27_STABLE 2014-10-08 16:55:48 +08:00
Sam Hemelryk a4534af8b7 Merge branch 'MDL-47470-27' of git://github.com/danpoltawski/moodle into MOODLE_27_STABLE 2014-10-08 12:21:41 +13:00
Marina Glancy f4df7d7961 MDL-47492 behat: refer to table column indexes instead of names 2014-10-02 15:59:48 +08:00
Dan Poltawski 622c15ca7c MDL-47470 behat: fix 'I navigate to' exception
When a child page is not found
2014-09-30 15:30:11 +01:00
Marina Glancy fe38ae10d3 MDL-47154 behat: escape user supplied strings in xpath 2014-09-22 13:24:21 +08:00
Rajesh Taneja 7a7546eb64 MDL-47154 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-09-22 13:24:13 +08:00
Damyon Wiese b5415ecd9d MDL-46997 Grades: Improve the behat tests for grade aggregation
The tests now cover hidden grades in sub categories for all aggregation types. This change
includes a data generator for grade categories, with unit tests and behat tests for
the generator.

Conflicts:
	admin/tool/behat/tests/behat/data_generators.feature
	grade/tests/behat/grade_aggregation.feature
	lib/tests/behat/behat_data_generators.php
2014-09-09 14:02:06 +08:00
Marina Glancy 55111d2bf4 MDL-45602 behat: add members to cohorts 2014-09-08 13:56:46 +08:00
Mark Nelson f367cfcbef MDL-46923 core_behat: fixed typos in function names 2014-08-20 22:11:31 -07:00
Rajesh Taneja 50eb74065b MDL-46817 behat: Step to check if value exist/not in table column 2014-08-18 10:01:06 +08:00
Marina Glancy aa8ae42d24 MDL-46503 behat: cohort generator allows to create cohort in category 2014-07-24 10:04:12 +08:00
Petr Skoda df9a669791 MDL-46099 session: fix use of references for session globals
This reverses the references used for global $USER and $SESSION,
the reason is that PHP does not allow references to references.
$USER is a reference to $GLOBALS['USER'] which means we cannot
put any references to it. Solution is to store the current user and session
objects in $GLOBALS['USER'] and $GLOBALS['SESSIOn'] are reference
them in $_SESSION.

This patch makes the session code behave the same way in CLI,
phpunit and normal web requests - this allows use to finally
unit test most aspects of the session code in Moodle.
2014-07-01 08:38:10 +12:00
Rajesh Taneja c1ee80fef5 MDL-46061 behat: Fixed blur event problem for atto_image
atto_image look for blur event after changing width/height
Added a new step to get focus off the element, so this can
work.
2014-06-26 10:29:35 +08:00
David Monllao e0cd7e44db MDL-45192 behat: Replacing specific-selector steps by a generic one
Having a I click on we can use all our selectors rather
than having multiple steps for the same purpose. This
step allow us to manage JS native dialogues without
having to fail a scenario.

Credit for Mohamed Alsharaf.
2014-05-26 13:57:23 +12:00
Mohamed Alsharaf 184cdf0d52 MDL-45192 assign: added behat script & new definitions to handle alert dialog
The behat script is to test the batch action to lock and unlock submissions.
The new definitions are to prevent the "unexpected alert open" error in Selenium.
2014-05-26 13:57:18 +12:00
Sam Hemelryk 5ce5bc6bdd MDL-44711 course: fixed navigation expansion in course tests 2014-05-21 20:58:27 +12:00
Sam Hemelryk 137c0261ee MDL-44711 block_navigation: fixed typo in behat tests 2014-05-20 23:39:17 +12:00
Sam Hemelryk 832393cfc9 MDL-44711 navigation: better handling of course expansion exception 2014-05-19 08:41:12 +12:00