64 Commits

Author SHA1 Message Date
Juan Leyva
0f398b500d MDL-59160 core_group: Return if the user can access all groups in WS
The core_group_get_activity_allowed_groups WS should be returning not
only the groups but also if the user is allowed to access all the
activity groups.
2017-06-19 15:53:38 +01:00
Simey Lameze
fdeeaff954 MDL-58265 core_test: replace I turn editing on steps
Also remove few more unnecessary steps that redirects behat to
site home page to actually get to the course.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
93be3f730c MDL-58265 core_test: remove unnecessary steps
This commmit removes steps that take behat to site home page
to actually get to a course page.

Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Simey Lameze
c987d1b2ef MDL-58265 core_test: replace all uses of I follow course steps
Part of MDL-55611 epic.
2017-04-03 11:37:07 +08:00
Rajesh Taneja
9bad658aaf
MDL-56614 behat: Fixed steps to use new definition 2016-12-07 07:10:35 +08:00
Marina Glancy
e5287f9b3b MDL-56614 behat: navigate without navigation and admin blocks 2016-12-06 11:49:14 +08:00
Rajesh Taneja
0fa66b5383
MDL-55074 behat: Remove js tag as the feature can run without it 2016-10-27 12:11:45 +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
52f3e060e4
MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +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
afccc03f14 MDL-46891 behat: Phantomjs require explicit change event
It fails with multiple select while selecting group
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
Mark Nelson
3ee812fab4 MDL-53072 group: minor changes to existing code
1) Tidied up conditional check and put additional variable on new line.
2) Prevented change of the default behaviour for 'groups_get_potential_members()'.
3) Added another behat test.
2016-02-26 11:42:14 +08:00
Rex Lorenzo
4cb32a243d MDL-53072 group: added related behat tests 2016-02-26 11:42:14 +08:00
rajesh Taneja
260f133178 MDL-50647 behat: Expanded behat to not use example
Reason for not using scenario example is:
1. Lot of options, hence hard to read and match
2. Example will run whole scenario (created db for each row),
   Which is not needed.
2015-10-16 11:01:39 +08:00
Davo Smith
294c4bb0db MDL-50647 group: add 'not in group' section to groups overview
Also adds 'No group' and 'No grouping' filters to the top of the page
2015-10-16 08:53:44 +08:00
David Monllao
224d819678 Merge branch 'MDL-50964-master' of git://github.com/jleyva/moodle
Conflicts:
	group/tests/externallib_test.php
	lib/db/services.php
2015-09-15 17:09:33 +08:00
Juan Leyva
c0ef63eb38 MDL-50964 core_group: New Web Service core_group_get_activity_groupmode 2015-09-11 11:30:28 +02:00
Juan Leyva
7107c2f066 MDL-50966 core_group: New WS core_group_get_activity_allowed_groups 2015-09-11 11:29:38 +02:00
Marina Glancy
7f0c7f01c0 MDL-51062 behat: permission steps should work without js 2015-08-09 20:33:27 +08:00
David Monllao
ed0fd1f6ec MDL-43949 groups: Add idnumber to web services
Thanks to Vitor Martins for his contribution.
2015-06-25 16:55:14 +08:00
Rajesh Taneja
0fe86bbdbb MDL-49799 behat: replaced asd.com with example.com
asd.com is a valid domain, we should use reserved domain names for testing
2015-04-20 11:21:20 +08:00
Ankit Agarwal
feaa97afac MDL-49412 groups: Fix behat failures 2015-04-10 17:18:23 +08:00
Juan Leyva
5d62e813ab MDL-48730 webservices: New ws core_group_get_course_user_groups 2015-02-24 09:39:05 +01:00
John Okely
248e23c335 MDL-46792 core_group: Add unit tests to ensure that group updates and grouping updates do not require names 2014-08-20 12:02:58 +08:00
Gregory Faller
e4ebf7ef0f MDL-46524: Auto-create groups from existing group or grouping membership 2014-08-06 10:50:14 +09:30
Rajesh Taneja
2ced0cc53e MDL-45991 behat: fixed deprecated behat steps used 2014-07-15 16:10:29 +08:00
Syxton
55c9a15041 MDL-45991 groups: Auto-create ignore grouped users
MDL-45991 groups: Auto-create groups with ungrouped users only

When using auto-create groups, sometimes it is needed to only create
groups with users that are not already inside a course group.  This
patch creates a checkbox that will ignore users that are in already
existing groups.  It alters the groups_get_potential_members function so
that the eligible users are retrieved entirely though sql.
2014-07-10 15:44:21 -04:00
Frederic Massart
9d4762c9b5 MDL-45808 group: Observe the group key policy upon group creation 2014-06-04 15:16:22 +08:00
Frederic Massart
6685e0487f MDL-45579 group: Behat tests to cover group enrolment key rules 2014-06-04 15:11:42 +08:00
Ankit Agarwal
b63f773296 MDL-44717 events: Fix multiple issues in events
Fix various incorrect urls
Fix incorrect phpdocs and other minor code style issues
Fix missing/incorrect strings

AMOS BEGIN
 MOV [eventblogassociationcreated, core_blog],[eventblogassociationadded, core_blog]
AMOS END
2014-04-01 15:08:34 +08:00
David Monllao
759b323e0e MDL-43236 behat: Updating references to deprecated methods 2014-03-07 16:05:21 +08:00
Damyon Wiese
d09cfab660 Merge branch 'wip-MDL-44403-master' of git://github.com/marinaglancy/moodle 2014-03-06 09:21:24 +08:00
Marina Glancy
24c32bdf2f MDL-44403 events: added public method to get eventdata 2014-03-04 15:16:15 +08:00
David Monllao
f083d6145e MDL-43738 behat: Updating features files
The following used steps were replaced by the ones
added in this issue:
- I fill the moodle form with
- I fill in with
- I select from
- I select radio button
- I check
- I uncheck
- the field should match

Also removing test for deprecated steps:
- the ASD checkbox should be checked
- the ASD checkbox should not be checked
2014-02-27 18:22:05 +08:00
David Monllao
561e9bb92e MDL-43480 behat: Switching @_only_local and @_alerts to @_file_upload and @_alert 2014-01-17 10:41:37 +08:00
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