3273 Commits

Author SHA1 Message Date
Andrew Nicols
433109e2ac
MDL-82373 contentbank: Pause in Behat before interacting with h5p
It seems that the loading of the h5p content upsets other interactions
with the page in Firefox as it loads. Unfortunately I haven't found a
reliable way to handle this with pendingJS yet.

This is the poor man's fix and we should find a better solution.
2024-07-17 14:45:23 +08:00
Andrew Nicols
b2320ccd71
MDL-82373 behat: Wait for alerts before accepting/dismissing them 2024-07-17 14:45:22 +08:00
Andrew Nicols
dd8595035f
MDL-82373 behat: Stop calling ensure_node_is_visible before click
W3C WebDriver Element::Click, Element::Clear, and Element::SendKeys all
state that the WebDriver implementation (chromedriver, geckodriver,
edgedriver) should scroll the element into view if it is not already
visible.

It is wrong for us to check if the element is visible or not before
calling these as it may not be but will during the click/clear/type
event.
2024-07-17 14:45:21 +08:00
Huong Nguyen
e817dd70db
Merge branch 'MDL-80907-401' of https://github.com/marinaglancy/moodle into MOODLE_401_STABLE 2024-07-04 11:14:56 +07:00
Ilya Tregubov
058b11e57b Merge branch 'MDL-77685-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-05-31 09:06:09 +08:00
Mihail Geshoski
a7d476c35f
MDL-77685 core_grades: Fix row_column_of_table_should_contain()
Backport from MDL-77632.
2024-05-30 09:42:26 +01:00
Marina Glancy
508d462fa7 MDL-80907 behat: be more precise in selecting table rows 2024-05-07 19:33:35 +01:00
Sara Arjona
3f392e934e
Merge branch 'MDL-81209-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-04-23 15:32:42 +02:00
Andrew Nicols
58acb96ee6
MDL-81209 core: Unit test should not care about plugin details 2024-04-08 20:54:25 +08:00
Juan Leyva
179bfdf5c5 MDL-81405 tool_mobile: Set Partitioned cookie when required 2024-04-06 12:31:50 +02:00
Juan Leyva
eb975467bd MDL-81405 session: New core cookie helper utility class 2024-04-06 12:31:50 +02:00
Huong Nguyen
0e8d4d8e2a MDL-80167 core: Skip Oracle for Oracle environment in unit tests 2024-03-15 08:46:44 +07:00
Huong Nguyen
f0ae7c4343 MDL-80167 admin: Add environment check for Oracle database 2024-03-14 17:42:51 +07:00
Marina Glancy
edf1a1ac8c MDL-81036 behat: fix the action menu clickable area selector 2024-02-23 11:23:21 +00:00
Sara Arjona
36aa09726b
Merge branch 'MDL-79674-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-02-19 10:20:59 +01:00
Jun Pataleta
e5b9510af2
Merge branch 'MDL-75081-401' of https://github.com/junpataleta/moodle into MOODLE_401_STABLE 2024-02-07 10:38:03 +08:00
Paul Holden
3a8a8c8463
MDL-75081 behat: correct tests of table contents asserting one column.
Prior to this change, assertions of "should exist" and "should not
exist" in table content, where the step provided only a single column,
could give false positives and pass (when they shouldn't).
2024-02-07 09:05:07 +08:00
Huong Nguyen
cb075f6257 MDL-80713 Unit Tests: Message sink improvement
- Added a new method called get_messages_by_component()
  This method will help to retreive the redirected messages
  of specific component only
- Added a new method called get_messages_by_component_and_type()
  This method will help to retreive the redirected messages
  of specific component and type only
2024-02-05 13:27:07 +07:00
Jun Pataleta
b3867e7422
MDL-79674 behat: Use proper tags for testing WCAG 2.1 criteria
`wcag2a` and `wcag2aa` refer to WCAG 2.0 standards. We should be using
`wcag21a` and `wcag21aa` to test against WCAG 2.1 standards.

See:
https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#axe-core-tags
2024-01-30 16:19:50 +08:00
Jun Pataleta
8c298f14bb
MDL-79674 behat: axe-core version fixes
* Update \behat_accessibility::run_axe_validation_for_tags()'s
  PHPDoc block to reflect the current version.
* Fix incorrect copyright tag for the library
2024-01-30 16:19:48 +08:00
Huong Nguyen
6a610605f6 Merge branch 'MDL-80229-401' of https://github.com/davewoloszyn/moodle into MOODLE_401_STABLE 2024-01-11 10:36:56 +07:00
sam marshall
607a452a74 MDL-79938 Behat: Add steps to support multiple tabs 2023-12-13 11:45:51 +00:00
Jun Pataleta
3e4c1c959f
Merge branch 'MDL-80079-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2023-12-06 21:57:54 +08:00
Sara Arjona
9acc242e13
Merge branch 'MDL-55640-m401' of https://github.com/sammarshallou/moodle into MOODLE_401_STABLE 2023-12-05 16:02:06 +01:00
Sara Arjona
52818283fe
Merge branch 'MDL-80185-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-12-04 11:00:56 +01:00
sam marshall
f02437f915 MDL-55640 setuplib: test_localcachedir fails sporadically 2023-11-30 13:59:08 +00:00
David Woloszyn
3fe8dbd027 MDL-80229 core: Add tolerance to min_get_minimum_revision 2023-11-24 15:58:43 +11:00
Paul Holden
ecf396842f
MDL-80185 lang: use iso6391 language code for HTML lang attributes.
This resolves accessibility issues where Moodle language pack codes
didn't always map to correspondingly named iso6391 codes.

Where this value is defined in the language configuration, it will
now be used.
2023-11-21 22:55:33 +00:00
sam marshall
47a38fd827 MDL-79966 core_task: Scheduled task timing (crontab fields) is wrong 2023-11-20 17:08:55 +00:00
Andrew Nicols
ca345f8853
MDL-80079 core: Correct incorrect arg to format_text::$options 2023-11-15 09:59:55 +08:00
Andrew Nicols
61b5850a8c
MDL-80079 core: Correct incorrect arg to format_string::$options 2023-11-14 22:50:36 +08:00
Ilya Tregubov
e0d1d8e469
Merge branch 'MDL-79615_401_STABLE' of https://github.com/marxjohnson/moodle into MOODLE_401_STABLE 2023-11-08 10:44:27 +08:00
Laurent David
d20f1024d8 MDL-77274 core_renderer: Respect full name format in letter avatars
* Make sure that we respect the fullnamedisplay and alternativefullnameformat
parameters to decide on the initials for a given user
* Add further tests

Co-authored-by: Tatsunori Uchino <tats.u@live.jp>
2023-10-30 06:18:48 +01:00
Mark Johnson
ef964137ce MDL-79615 course: Improve efficency of cache rebuilds
When bulk-updating course module visibility, set_coursemodule_visibily
was triggering a partial cache purge and rebuild for each course module.
This potentially led to 2 cache sets each requiring a lock to be
acquired and released per course module, plus any other cache updates
for other changes to the course in the same request.

This adds a new $rebuildcache paramter to the
set_coursemodule_visibilty, which is true by default to retain the
existing behaviour. If set false, it will skip doing the partial purge
and rebuild for that course module, and it is up to the calling code to
ensure the cache is updated as requried.

To assist with this, there is a new
course_modinfo::purge_course_module_cache_multiple() method, which
allows multiple course modules to be purged from the cache in a single
cache set.
2023-10-27 10:52:09 +01:00
Andrew Nicols
d6fdd2f5f9
MDL-79698 core: Correct duplicate array key in test provider 2023-10-13 15:44:33 +08:00
David Woloszyn
6f2fa6011e MDL-77846 core: Make endpoint revision number checks stricter
In some places we prevented cache poisoning, in others we did not. We
also did not place any restriction on the minimum value for a revision.

This change introduces a new set of functions for configonly endpoints
which validates the revision numbers passed in. If the revision is
either too old, or too new, it is rejected and the file content is not
cached. The content is still served, but caching headers are not sent,
and any local storage caching is prevented.

The current time is used as the maximum version, with 60 seconds added
to allow for any clock skew between cluster nodes. Previously some
locations used one hour, but there should never be such a large clock
skew on a correctly configured system.

Co-authored-by: Andrew Nicols <andrew@nicols.co.uk>
2023-10-04 02:10:16 +02:00
Ilya Tregubov
109879a2a1
Merge branch 'MDL-79428-401' of https://github.com/srobotta/moodle into MOODLE_401_STABLE 2023-10-03 09:41:21 +08:00
Stephan Robotta
f9432283a9 MDL-79428 license: upgrading cc core licenses to version 4.0
The short name of the cc licenses are trailed with a suffix containing
the version number (current 3.0 and 4.0). The old cc* licenses become
the new cc-*-3.0 licenses and are disables, because the new cc*-4.0
licenses are the current ones.

This is a backport of MDL-43195.
2023-09-29 09:39:18 +02:00
Ilya Tregubov
8e5eda32fe
Merge branch 'MDL-79285_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2023-09-28 10:21:09 +08:00
Ilya Tregubov
20e40c3882
Merge branch 'MDL-79360/401' of https://github.com/skodak/moodle into MOODLE_401_STABLE 2023-09-28 09:38:20 +08:00
Eloy Lafuente (stronk7)
c841064432
MDL-79285 xhprof: Cover the new functions with unit tests
This covers the 2 new functions with unit tests:
- xhprof_topo_sort()
- reduce_run_data()

Note that the example graph used in the provider is the
one shown in the issue to explain the reduction procedure.
2023-09-26 19:40:06 +02:00
Sara Arjona
54d446ce43
MDL-77708 docs: Update references from docs.moodle.org/dev 2023-09-26 10:57:33 +02:00
Ilya Tregubov
0717d4ea0e
Merge branch 'MDL-79341-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-21 14:51:12 +08:00
Jake Dallimore
2a2edcde93
Merge branch 'MDL-79186-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-19 11:12:51 +08:00
Petr Skoda
e42eeb62b0 MDL-79360 filter: fix nolink tag regression from MDL-77525 2023-09-15 12:45:02 +02:00
Huong Nguyen
c2e501e144
Merge branch 'MDL-78728-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2023-09-15 17:32:44 +08:00
Paul Holden
a3ddbca835
MDL-79341 core: more robust testing of user-agent curl response.
The external test file URL concerns itself only with HTTP_USER_AGENT
matching, not sending response headers, which can differ according to
HTTP protocol in use by the endpoint (1.1 vs 2).

Given the returned response code itself is irrelevant to the testcase,
there's not much benefit to asserting it and risking random failures.
2023-09-13 13:36:28 +01:00
Paul Holden
721b02a270
MDL-79186 task: fix evaluation of 'X/Y' cron field format.
The above syntax is defined as supported by the class, for example the
format '5/10' means:

"At every 10th <unit> from 5 through <max>."

It is analogous to '5-<max>/10'.
2023-09-11 09:22:26 +01:00
Jun Pataleta
9b6ed477f8
MDL-78806 behat: Create a step that for checking the page title
Create a Behat step "the page title should contain ':title'" to check
the page title.
2023-09-10 10:54:18 +08:00
Jun Pataleta
94efef85bb
MDL-78806 behat: More lenient checking of page title
Instead of doing an exact checking of the page title in
\behat_hooks::before_step(), do a more lenient check by checking that
the page title contains the acceptance test's site name.
2023-09-09 21:28:53 +08:00