355 Commits

Author SHA1 Message Date
Angelia Dela Cruz
09d654b3fe MDL-78158 behat: Behat cleanup and optimisation 2023-07-04 07:01:27 +08:00
Angelia Dela Cruz
9f101a30b2 MDL-78158 Behat: Use data generators to add blocks 2023-07-03 17:41:21 +08:00
Meirza
00bea84ed6 MDL-77350 calendar: Added class properties that are not declared
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-05-16 00:33:20 +07:00
Ilya Tregubov
1c25a0cc2f Merge branch 'MDL-77577-master' of https://github.com/andelacruz/moodle 2023-04-20 12:33:23 +08:00
Marina Glancy
4d765cd699 MDL-77164 privacy: typehint test content writer 2023-04-13 09:43:15 +01:00
Andrew Nicols
faa68960ad MDL-76866 calendar: Make test more specific 2023-03-29 20:33:47 +08:00
Stephan Robotta
06872a4ebd MDL-77392 calendar: calendar items are hidden because of settings 2023-03-23 12:39:15 +01:00
Angelia Dela Cruz
374b6d8e0e MDL-77577 Behat: Replaced the use of "Install selected language pack(s)
Evaluated usage of "Install selected language pack(s)" in Behat and
replaced the steps to use generator to install language packs as part
of test setup.
2023-03-21 11:58:30 +08:00
Mathew May
e5ca7766e7 MDL-52805 core: Remove legacy log calls 2023-03-07 13:08:46 +08:00
Jun Pataleta
317af68140 Merge branch 'MDL-76537' of https://github.com/stronk7/moodle 2023-01-19 11:24:04 +08:00
Jun Pataleta
fad05d7929 Merge branch 'MDL-76583-master-withoutrename' of https://github.com/andrewnicols/moodle 2023-01-19 09:44:48 +08:00
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Paul Holden
af8da7c737 MDL-70070 phpunit: correct data provider method names.
They should not be prefixed `test_` because that's how actual
test methods containing assertions are identified by PHPUnit.
2023-01-16 08:28:37 +00:00
Eloy Lafuente (stronk7)
357f784091 MDL-76537 behat: Month and day names are lang-dependent correct utf-8
Just verify that calendars are always displayed with correct UTF-8
and in the language the user is currently using.
2023-01-13 09:57:28 +01:00
Philipp Memmel
b84005ef9f MDL-76061 core_calendar: Fix changing event type from 'user' 2023-01-09 14:49:50 +01:00
Simey Lameze
1531541451 MDL-76507 behat: change step to use 'Recent and next 60 days' option
It was detected that 'This month' option may cause failures in builds in between months
so using the 'Recent and next 60 days' still fixes the weekend scenario and also the
in between months issue.
2022-12-01 08:50:58 +01:00
Simey Lameze
4be0e3541e MDL-76507 behat: use 'This month' option when exporting
This is necessary because 'This week' option is conditionally
hidden on weekends making behat builds to fail on those days.

Also, the last two steps had to be split because Bennu library
adds days with leading zero and moodle removes it by default.
2022-11-30 19:57:35 +08:00
Marina Glancy
7bbb5434bf MDL-75100 core: replace function strftime deprecated in PHP 8.1 2022-11-21 11:41:12 +01:00
Marina Glancy
55b9fa4b32 MDL-76333 calendar: add test for calendar export 2022-11-16 16:51:19 +01:00
Simey Lameze
a512ba0b3c MDL-75282 behat: Use more precise step definitions
Note: This should possibly be broken out into its own issue and applied
to stables.

Part of MDL-75966.
2022-11-10 19:54:31 +08:00
Marina Glancy
41b93bd7e5 MDL-73424 general: Internal methods must have same type as parent
Otherwise the error is thrown in PHP8.1
2022-10-10 16:46:13 +02:00
Sara Arjona
fdc4576f9f Merge branch 'MDL-74866-master' of https://github.com/HuongNV13/moodle 2022-09-07 13:10:05 +02:00
Huong Nguyen
fd475bf7e8 MDL-74866 bennu: Fix parameter parsing
Some parameter values are wrapped by DQUOTE character.
We need to go through and get the actual value inside the quoted string.
2022-09-07 11:15:01 +07:00
Sara Arjona
d79098e342 Merge branch 'MDL-73097-master' of https://github.com/lameze/moodle 2022-09-06 06:42:44 +02:00
Simey Lameze
2b07a23709 MDL-73097 calendar: add behat coverage for manageentries capability 2022-09-06 11:20:34 +08:00
stevando
73bc430e17 MDL-73097 Calendar: Hide event type if user cannot change it 2022-09-06 09:53:38 +08:00
Sara Arjona
3c04c065c6 Merge branch 'MDL-68717-master' of https://github.com/laurentdavid/moodle 2022-08-30 16:04:59 +02:00
Laurent David
3ae6a87d7a MDL-68717 core_calendar: Hide completed event
* "expectcompletionon" type of event should be hidden if the related
activity is completed
2022-08-08 07:17:54 +02:00
Jun Pataleta
94ea7cd81c Merge branch 'MDL-62959-master' of https://github.com/snake/moodle 2022-08-03 16:52:36 +08:00
Simey Lameze
b5bf5f82be MDL-62959 calendar: add behat to test event type changing 2022-07-27 15:44:37 +08:00
Huong Nguyen
4139046a9a MDL-72430 Calendar: Fix admin cannot edit course event 2022-07-26 11:48:58 +07:00
Paul Holden
1dba7152d0 MDL-74595 calendar: consistent breadcrumbs navigating site calendar.
Take #3, see also 7a529cc8 and 81b0d053.
2022-06-24 10:14:49 +01:00
Paul Holden
432fbbc81a MDL-74327 calendar: format event location property if it's a URL. 2022-06-08 10:44:39 +01:00
Huong Nguyen
4342e774d8 MDL-73654 timeline: Improve search for course name and activity name 2022-05-31 11:05:44 +07:00
Eloy Lafuente (stronk7)
9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Eloy Lafuente (stronk7)
4003e31983 MDL-73785 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
2022-03-03 12:19:30 +01:00
Eloy Lafuente (stronk7)
83497580cb Merge branch 'MDL-73669-master' of https://github.com/marinaglancy/moodle 2022-02-10 16:39:06 +01:00
Marina Glancy
c5c33d8eba MDL-73669 core_calendar: move deprecated behat steps to own file
Steps were initially deprecated in  MDL-72810
2022-02-04 17:17:08 +01:00
Paul Holden
85f2c044c0 MDL-73730 calendar: more precise matching of calendar day partial. 2022-02-02 10:19:26 +00:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Eloy Lafuente (stronk7)
0c53a3dec8 MDL-73476 phpunit: events, external and search tescase names
All events_test, external_test and search_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to lib/external/tests/external_test.php:
- external is not a valid component
- hence, its only valid namespace is "core"
- also, it's testing lib/external/externallib.php
- hence, the file (and class) have been renamed to external_externallib_test.php
  (to avoid conflicts with other external_test that may exist in core)
2022-01-14 16:18:39 +01:00
Dongsheng Cai
2ee27313ce MDL-71239 calendar: disallow manager role users edit user events 2022-01-11 14:34:16 +01:00
Huong Nguyen
db56452269 MDL-73297 Calendar: Display improvement in small screen
- Changed the breakpoint for responsiveness from 1200px to 768px
 - Added "dots" to indicate days with events for the large block and main calendar page
 - Added popovers for the main calendar page
 - Added new Behat scenarios to test the responsiveness
2022-01-07 14:41:32 +07:00
Eloy Lafuente (stronk7)
511801cb46 MDL-73352 phpunit: lib_test and locallib_test testcase names
All lib_test and locallib_test classes:

- Namespaced with component (and API whenever makes sense).
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed or add new uses.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under login/tests:

1) The core_login component doesn't exist.
2) But login/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have login_xxxx as prefix.
2021-12-30 16:21:42 +01:00
Eloy Lafuente (stronk7)
e4a2d9c1d4 MDL-73348 phpunit: normalize all privacy provider tests
As far as now all them have correct privacy level2 namespace:
- Move them to "privacy" subdir.
- Rename the files to "provider_test.php", this includes old
  privacy_test.php and privacy_provider_test.php files
- Rename the testcase to provider_test too (to match file name)

Also, change some relative paths and comments to point to new
locations.
2021-12-17 14:21:02 +01:00
Eloy Lafuente (stronk7)
57e6fb7ad9 MDL-73348 phpunit: privacy and privacy_provider testcase names
All privacy_test and privacy_provider_test classes:

- Namespaced with component\privacy.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Renamed a few files to make all be privacy_test or privacy_provider_test.php
- All them passing individually.
- Complete runs passing too.
2021-12-17 14:21:02 +01:00
Sara Arjona
40818b5212 Merge branch 'MDL-72834-master' of https://github.com/HuongNV13/moodle 2021-12-01 08:59:47 +01:00
Jun Pataleta
a119f8e09c MDL-73066 calendar: Behat test fixes
* Specify which close button is being clicked
* Fill out course field when creating a group event
2021-11-30 17:18:42 +08:00
Huong Nguyen
7de559fa2f MDL-72834 Calendar: Move the calendar into the user menu 2021-11-30 10:22:07 +07:00
Eloy Lafuente (stronk7)
113ced6c0d Merge branch 'MDL-73066-master' of https://github.com/lameze/moodle 2021-11-29 20:11:24 +01:00