44 Commits

Author SHA1 Message Date
Shamim Rezaie
e240a0000a MDL-53140 forms: Added the float form element to the form API 2019-05-01 12:10:23 +10:00
Marina Glancy
e66acce81a MDL-64151 form: autocomplete element remove last choice
This is the same situation as was in MDL-56864 but now in 'course', 'autocomplete' and 'select' elements
- if the element allows multiple selection it is impossible to remove the last element
2019-04-11 10:00:22 +02:00
Ryan Wyllie
858179b024 MDL-64820 forum: fix behat tests 2019-03-22 09:31:21 +08:00
Víctor Déniz Falcón
02fda279ed MDL-57281 behat: deprecated step definition I navigate to node in
Definition step deprecated and affected tests modified.
2018-08-20 12:53:26 +01:00
David Mudrák
fa7297aff0 MDL-62315 form: Implement the privacy API for core_form subsystem
Forms subsystem has no own database table. The only personal data is the
user preference 'filemanager_recentviewmode' that stores the view mode
of the file picker element.

It was discussed whether handling of this preference should be added
here into core_form, or rather into core_repository subsystem. The final
decision was to consider the preference as owned by the core_form
because it is affecting the display of a form element, not the
repository backend (even though the strings describing it had been put
into core_repository strings).
2018-05-03 19:05:39 +02:00
Eloy Lafuente (stronk7)
b3f41c084d MDL-60485 modgrade: Change string expectation in related test 2017-10-20 18:57:31 +02:00
Jake Dallimore
b8c31dfe6d MDL-59507 forms: unit tests confirming that .xxx is an invalid extension
Modified:
- test_data_for_browser()
- test_unknow_file_types()
2017-09-18 09:03:00 +08:00
Davo Smith
527459a4c7 MDL-53848 mod_assign, formslib: add hideIf to real form and adapt behat tests to use this 2017-08-17 14:52:11 +01:00
Davo Smith
8dff6c78bd MDL-53848 formslib: peer review fixes 2017-08-17 14:52:11 +01:00
Ankit Agarwal
988879655b MDL-53848 formslib: make conditional hidden elements properly accessible 2017-08-17 14:52:10 +01:00
Marina Glancy
f3da329da4 MDL-53848 forms: additions to the behat test 2017-08-17 14:52:10 +01:00
Davo Smith
d20498625c MDL-53848 form: add hideIf functionality 2017-08-17 14:52:10 +01:00
Damyon Wiese
63f4aa20b2 MDL-59698 behat: Remove bad tests
These tests are an abuse and should not have been accepted. Behat tests should use real pages.
Adding testing only entry points to Moodle is a bad security practice and is not the purpose of behat.
2017-08-03 10:26:05 +08:00
David Mudrák
1661204a6c MDL-59544 forms: Implicit validation of the filemanager and filepicker
The patch adds an extra validation step against accepted file types.
Even if the repository checks are bypassed (as illustrated in the
Behat), the invalid file is still caught by the element's validation
rules.

It turns out there is no way to test the filepicker element easily via
Behat. Additionally, it provides the renaming features only with
disabled javascript. So the Behat tests are provided for the filemanager
only.

AMOS BEGIN
 CPY [err_wrongfileextension,mod_workshop],[err_wrongfileextension,core_form]
AMOS END
2017-07-14 20:38:54 +02:00
David Mudrák
ee7e8fdf8e MDL-59443 forms: Add behat tests for the field validation 2017-07-06 09:29:04 +02:00
David Mudrák
a100469875 MDL-59443 forms: Consider '*' as a known file type
While working on the filetypes element validation, I realized we did not
cover the case of selecting 'Any file type'. So the value '*' was
falsely reported as unknown file type.
2017-07-06 09:29:04 +02:00
David Mudrák
6b59e4aafb MDL-59452 forms: Add Behat test for the filetypes form element
This is a very basic test for now to illustrate that it is possible now
to specify filetypes fields by the label.
2017-07-06 09:22:14 +02:00
David Mudrák
8cf36e9c81 MDL-53240 filetypes: Introduce admin_setting_filetypes class
This new type of admin settings makes use of the filetypes browser but
for the admin settings.
2017-06-01 09:48:45 +02:00
David Mudrák
8b493eb09d MDL-53240 filetypes: Enhance the filetypes element with a types browser 2017-06-01 09:20:07 +02:00
John Okely
86bb4f5bf2 MDL-53240 filetypes: Add functions to be used for input validation 2017-06-01 09:18:38 +02:00
David Mudrák
e3ad9db6b6 MDL-53240 filetypes: Add methods for generating the browser tree content
These new methods will be used to render the tree of file types groups
and extensions in the browser widget.

Co-Authored-By: John Okely <john@moodle.com>
2017-06-01 09:18:38 +02:00
David Mudrák
6c4a5fdf88 MDL-53240 filetypes: Introduce the filetypes_util helper class 2017-06-01 09:18:38 +02: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
Andrew Nicols
4b2bcd2376 Merge branch 'wip-mdl-56353' of https://github.com/rajeshtaneja/moodle 2016-12-07 11:53:34 +08:00
Rajesh Taneja
451ae0cabc
MDL-56353 behat: Added test for multi select dependency 2016-12-07 11:30:46 +08:00
Marina Glancy
e5287f9b3b MDL-56614 behat: navigate without navigation and admin blocks 2016-12-06 11:49:14 +08:00
Rajesh Taneja
e4c98de168
MDL-56630 behat: Click on link in specificed block/region 2016-11-08 18:06:09 +08:00
Rajesh Taneja
dc90838aaa
MDL-56630 behat: Click on link in specificed block/region 2016-11-08 14:45:43 +08:00
David Monllao
80180e0f92 MDL-55804 forms: Return exported data through _prepareValue 2016-09-27 08:11:56 +08:00
Marina Glancy
64c45a2928 MDL-55123 forms: correctly create elements in unittests 2016-09-12 11:56:04 +08:00
Eloy Lafuente (stronk7)
973641fe13 MDL-54666 tests: Verify that any activity keeps the settings
This was affecting both to rateable (forum...) and not rateable
(assignment...) activities. So tests have been completed to verify
that now saving is performed and the correct scale values stored.
2016-05-20 23:48:25 +02:00
Damyon Wiese
821ab1bf9b MDL-52954 assign: Behat fixes because the assign grading ui has changed 2016-04-15 15:57:56 +08:00
Rajesh Taneja
b73e5047af MDL-46891 core_grade: Steps are not valid as element is disabled 2016-03-11 10:51:16 +08:00
Andrew Nicols
cf633c555e MDL-30811 form: Remove continue from test. 2016-03-01 12:11:10 +08:00
Mark Nelson
1b8bd51c06 MDL-48634 core_form: added behat test for 'modgrade' validation 2016-02-09 17:46:42 +08:00
Damyon Wiese
60a1ea56d9 MDL-51247 forms: All new aria-pimped autocomplete mform element.
Supports static list of options - or options fetched via ajax.
Has options for single,multi and tags support.
2015-10-14 16:22:44 +01:00
Petr Skoda
d6e7a63d9a MDL-49684 timezones: rewrite timezone support
This patch replaces all homegrown timezone
stuff with standard PHP date/time code.

The main change is the introduction of core_date
class that returns normalised user and server
timezones. From now on nobody should be using
$CFG->timezone or $user->timezone directly!

Other new features and fixes:
* admins are prompted for timezone during install
* editing of other users is finally fixed
* timezones are displayed in user profile
* new $this->setTimezone() in phpunit
* time locale is now automatically reset in phpunit
* timezone is now automatically reset in phpunit
* phpunit has Australia/Perth as default timezone
2015-04-06 13:53:51 +12:00
Petr Škoda
1eb135568a MDL-41022 cleanup form tests 2013-08-24 16:18:18 +02:00
Dan Poltawski
957a5fa7a4 MDL-34853 tests - fix broken phpunit test 2012-08-22 10:13:52 +08:00
Frederic Massart
7b05e14659 MDL-28531 Unit Tests: Fixed tests to work with core update 2012-08-17 15:00:10 +08:00
Rajesh Taneja
04de8f35d1 MDL-27562 formslib: Added unit test for dateselector and datetimeselector 2012-05-09 14:23:46 +08:00
Petr Skoda
a3d5830a0a MDL-32149 PHPUnit test support - part 2
Includes:
* constants refactoring
* reworked db table init
* support for $CFG->debug = -1
* functional DB tests
* fixed $DB->get_indexes() to not throw exceptions when table does not exist
* fix handling of user passwords in test db
* add debug info to exception messages
* removed unnecessary PHP debug errors from mathslib
* fixed @error suppression in get_string
* fixed PHPUnit error handler setup
* added timezone info to default install
2012-04-03 22:30:53 +02:00