27 Commits

Author SHA1 Message Date
David Monllao
50edfdca03 MDL-43584 behat: Updating features to use the new expected arguments 2014-01-10 18:25:44 +08:00
David Monllao
14ebd16390 MDL-43584 behat: Removing DB calls from step definitions as much as possible
Old methods deprecated as the expected arguments
have changed.
2014-01-10 18:25:44 +08:00
David Monllao
d1e55a47be MDL-42625 behat: Step definitions + related changes in features
In general aiming for compatibility with multiple browsers,
firefox, chrome and phantomjs to be more specific.

* Removing hardcoded waits
* Adding @_alert, @_switch_window and @_switch_frame tags,
  to label actions that different drivers have problems with.
* Adding missing @_files_upload and @_only_local tags to features that
  uploads files.
* Fixing a few wait for page ready what specified miliseconds.
* New methods to ensure elements (usual selectors), sections and editors
  are ready to interact with
* Changing the select an option implementation to deal with the different
  drivers implementations when listening to JS events.
2013-12-06 13:10:24 +08:00
David Monllao
333db2e9b9 MDL-42625 behat: Editing .feature files 2013-12-06 12:13:39 +08:00
Marina Glancy
07622451a3 MDL-42174 behat: deprecate upload file to filepicker step in favour of filemanager 2013-12-05 21:00:25 +11:00
David Monllao
e7c71c448b MDL-42627 behat: Moving the deprecated method to behat_deprecate and updating scenarios 2013-12-02 14:13:17 +08:00
Mark Nelson
a2d3e3b6ca MDL-42276 core_group: added behat tests to automate group actions
1. Added new step definitions to check if an element exists or does not exist in another.
2. Added new step definitions to check if an element is readonly or is not readonly.
3. Automated testing for MDLQA-1812 and MDLQA-1813.

Added behat test for deleting groups/groupings with and without the
'moodle/course:changeidnumber' capability.

4. Automated MDLQA-2105.

Added behat test for creating groups/groupings without the
'moodle/course:changeidnumber' capability.

5. Automated MDLQA-2238 and MDLQA-2335.

Added behat test for updating groups/groupings with and without the
'moodle/course:changeidnumber' capability.
2013-11-11 18:06:50 -08:00
Ankit Agarwal
4b3bf7f82b MDL-42273 behat: Automate groups and groupings import QAs
MDLQA-2420 Importing groups with an ID number with permissions
MDLQA-2421 Importing groups with an ID number without permissions
MDLQA-5266 A teacher can import groupings as well as groups into a course
2013-10-31 10:37:33 +08:00
Dan Poltawski
2d2c5f36c4 Merge branch 'MDL-42272-master' of git://github.com/ankitagarwal/moodle 2013-10-24 12:43:52 +08:00
Ankit Agarwal
2bc22e070f MDL-42272 groups: Add automated tests for MDLQA-145 2013-10-17 10:59:36 +08:00
Petr Škoda
2a67e105b6 MDL-41935 attempt to work around random time comparison test failures 2013-10-12 15:53:25 +02:00
Frederic Massart
d7587b3136 MDL-41305 group: Behat test failing due to string change 2013-09-12 16:37:23 +08:00
Frederic Massart
861b0510e5 MDL-39959: Replace Legacy events - Groups
This combines the following changes:

* Event for group member added
* Event for group member removed
* Event for group created
* Event for grouping created
* Event for group updated
* Event for grouping updated
* Event for group deleted
* Event for grouping deleted
* Adding tests for deleting functions
* Bulk remove of members uses low-level API

    The reason for this is that a bulk event has no value from a logging
    perspective as it is not granular. So now, the API is a bit slower,
    but the information the events contain makes sense, beside this is
    not (and should not be) used very often.

    The reason why the events_trigger_legacy() is kept is because we
    cannot create a new event for this, as we don't encourage developers
    to created bulk events, for the reasons mentioned above.

    I removed the call that gets the user record from the function
    groups_remove_member() as it was not required and only appeared
    to check if the user existed. It appears to be safe not to do
    this check as nothing would fail down the line.

* Bulk unassign of groupings uses low-level API

    As the previous commit, we keep the legacy event for now as it would
    be wrong to create a new event to replace it.

    Also, the code has been changed to call the low-level API to unassign
    groups from groupins, even though at the moment there are no
    events for that function.

* Bulk deletion of groups uses low-level API

    Again, we keep the legacy event because replacing it would force
    us to create a new event that does not make sense. See MDL-41312.

* Bulk deleting of groupings uses low-level API
* Asserting legacy event name in unit tests
* Minor SQL query and code improvements
2013-08-26 15:03:17 +08:00
Petr Škoda
8252b7c291 MDL-40901 standardise core test case class and file names
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
David Monllao
3897608152 MDL-39635 behat: XPath cleanups
- Escaping steps arguments redirected to other steps
- Adding normalized-space() in all contains() assertions
- General xpaths review
- Convering provided xpath text strings to xpath literals
  to avoid problems with arguments containing both single
  quotes and double quotes
2013-07-19 10:02:36 +02:00
David Monllao
dedb973878 MDL-39635 behat: Replacing hardcoded language strings
Using get_string() instead.
2013-07-19 10:02:10 +02:00
David Monllao
5d7b6307b1 MDL-39586 behat: Closed list of stackeholders 2013-05-09 18:38:13 +08:00
David Monllao
550d842e3c MDL-39232 behat Normalize feature tags according to component names 2013-04-30 11:54:47 +08:00
Eloy Lafuente (stronk7)
6bb78aedee Merge branch 'MDL-38945_master' of git://github.com/dmonllao/moodle 2013-04-09 20:24:17 +02:00
Eloy Lafuente (stronk7)
d06700cbd6 Merge branch 'MDL-38944_master' of git://github.com/dmonllao/moodle 2013-04-09 20:23:38 +02:00
David Monllao
e613fd905b MDL-38945 behat: New test
According to MDLQA-142, a teacher can
organise students into groups within
a course.
2013-04-08 17:29:20 +08:00
David Monllao
ecd580f310 MDL-38945 behat: Step definition to add users to groups 2013-04-08 17:28:53 +08:00
David Monllao
862fcc8b70 MDL-38943 behat: New test
According to MDLQA-2417, teachers can
specify unique group and grouping ID numbers.
2013-04-08 16:41:40 +08:00
David Monllao
bd197963ef MDL-38944 behat: New test
According to MDLQA-2422; automatic
creation of groups.
2013-04-08 14:40:52 +08:00
Paul Charsley
45c0a7d002 MDL-36541 modify get_groupings to optionally return associated groups 2013-02-15 13:13:06 +13:00
Jerome Mouneyrac
fb695f6e3d MDL-37354 clean return value for each externallib PHPUnit tests 2013-01-09 13:47:01 +08:00
Jerome Mouneyrac
1f867c025b MDL-34970 PHPunit test: group/externallib.php 2012-09-04 12:34:40 +08:00