31103 Commits

Author SHA1 Message Date
Andrew Nicols
b2320ccd71
MDL-82373 behat: Wait for alerts before accepting/dismissing them 2024-07-17 14:45:22 +08:00
Andrew Nicols
5e4ba1f036
MDL-82373 core: Make CollapsibleRegion more tolerant to behat 2024-07-17 14:45:22 +08:00
Andrew Nicols
535e970ad3
MDL-82373 behat: Stop killing the entire Behat run on driver error
If there's a driver error, for example from a step taking too long, then
this kills the entire Behat run and we have to start from scratch.

This change instead throws away the original connection and starts a new
one to try and continue the test.
2024-07-17 14:45:21 +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
Andrew Nicols
70bbb44030
MDL-77706 atto_link: Work around Mozilla bug 1906559
This upstream bug prevents creation of an anchor with a hyperlink where
the content has a block-like display.

The workaround is to wrap the content in a span, set the display to
inline, call the `createLink` command on the span, move the content out
of the span, and then remove it.

This is only done for Firefox-based browsers.
2024-07-16 15:38: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
Huong Nguyen
a68fcabc65
MDL-79809 environment: Add missing Moodle 4.4 requirements 2024-06-24 09:37:38 +07:00
Huong Nguyen
2978ffc4a5
MDL-79809 environment: Add recommended custom check
Add support for custom environment checks to have a recommended
option in addition to required an optional.
2024-06-24 09:37:38 +07:00
Cameron Ball
836b2c23a2 MDL-81774 curl: Strip auth headers when redirecting to different host 2024-06-05 02:00:21 +00:00
Huong Nguyen
0068701bc6
Merge branch 'MDL-81751-MOODLE_401_STABLE' of https://github.com/durzo/moodle into MOODLE_401_STABLE 2024-06-05 08:57:27 +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
Jordan Tomkinson
a48f00d940 MDL-81751 ddl: new reserved keywords in Aurora MySQL database engine 2024-05-16 13:41:25 +01:00
info@eWallah.net
c2193308a6 MDL-80972 behat: Behat check_server_status can provide better info. 2024-05-09 11:08:04 +08: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
Pol Torrent i Soler
9254b7e75a
MDL-81622 core: fix str_contains usage in cookie_helper 2024-04-23 12:52:58 +02:00
Jake Dallimore
097a879e1a
Merge branch 'MDL-81060-401-fix' of https://github.com/meirzamoodle/moodle into MOODLE_401_STABLE 2024-04-09 10:14:07 +08:00
Andrew Nicols
58acb96ee6
MDL-81209 core: Unit test should not care about plugin details 2024-04-08 20:54:25 +08:00
Jake Dallimore
2c9a5c009f MDL-81060 core: fix incorrect userquota usage in zip_packer
This change reverts much of MDL-74641, removing the erroneous userquota
checks from zip_packer. Now, during extraction, the zip_packer will exit
with an error status when it encounters a file which is larger than its
advertised size, and NOT when it determines the size of the extracted
files have exceeded the userquota (which only applies to private files
and which was used incorrectly here). It also reverts changes to the
draftfiles_ajax.php file, restoring the original (pre-MDL-74641) error
handling.
2024-04-08 09:11:26 +07: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
Jake Dallimore
0f3d3b2d77
MDL-80835 enrol_lti: add partitioning support for OIDC state cookie
Adds the property that is required by Chrome to opt-in to its 3rd party
cookie partitioning solution, CHIPS. This specific change ensures the
'state' cookie, used in the OIDC handshake, has partitioning support.
This cookie can be partitioned unconditionally, since it's a cookie
controlled by the library and one we don't expect to be set without
partitioning elsewhere.
2024-03-21 15:41:16 +08: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
Jun Pataleta
b704fa7dda
Merge branch 'MDL-80819_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-03-05 11:48:39 +08:00
Marina Glancy
edf1a1ac8c MDL-81036 behat: fix the action menu clickable area selector 2024-02-23 11:23:21 +00:00
Eloy Lafuente (stronk7)
5a2acac1ed
MDL-80819 install: halt any install if php min version is not met
Apart from environmental stuff, the moodle_minimum_php_version_is_met()
function is executed by all installs (web, cli, database, ...)
and halts any installation (early) not meeting the PHP constraints.
2024-02-23 11:08:40 +01:00
Huong Nguyen
26ed48ec40
Merge branch 'MDL-80844_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-02-22 11:24:26 +07:00
Huong Nguyen
58ba1a9448
Merge branch 'MDL-80862-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-02-22 10:38:16 +07:00
Sara Arjona
40d2b4de39
Merge branch 'MDL-76441_401' of https://github.com/stronk7/moodle into MOODLE_401_STABLE 2024-02-21 17:50:08 +01:00
Jun Pataleta
6df3213c9b
Merge branch 'MDL-79003-401' of https://github.com/andrewnicols/moodle into MOODLE_401_STABLE 2024-02-21 10:35:31 +08:00
Andrew Nicols
6dbd0e938f
MDL-80862 testing: Reset task manager between behat tests 2024-02-20 10:55:04 +08: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
Eloy Lafuente (stronk7)
e31db928b5
MDL-80844 phpunit: Only some tests can use the debugging sink
The only tests that have COMPLETE* support for the debugging sink
are the advanced_testcase and the database_driver ones (store and
report). So we must ensure that the rest of tests don't use the
debugging sink at all.

Right now we are using it for storing, but later there is not
reporting, so any debugging happening within non advanced tests
is not detected.

This commit just ensures that we stop making that storing for
non advanced/database_driver tests. Nothing more, nothing less.

* Note that we have had to add a few missing bits to the
database_driver testcase because it was not 100% complete. Now
it behaves 100% the same than the advanced_testcase one regarding
the debugging sink.
2024-02-12 13:03:06 +01:00
Eloy Lafuente (stronk7)
05a41b6e32
MDL-76441 env: Moodle 4.2.x and 4.3.x do not support PHP 8.3 2024-02-10 12:15:11 +01:00
Andrew Nicols
6d7f162df0
Merge branch 'MDL-80667-401' of https://github.com/paulholden/moodle into MOODLE_401_STABLE 2024-02-08 09:42:22 +08:00
Jun Pataleta
97d64fb809
Merge branch 'MDL-80784-401' of https://github.com/noeldemartin/moodle into MOODLE_401_STABLE 2024-02-07 17:19:53 +08: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
e36e40f530
MDL-75081 behat: define new heading named selector.
Co-authored-by: Jun Pataleta <jun@moodle.com>
2024-02-07 09:06:40 +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
meirzamoodle
2f811e6acf MDL-74641 repository: Fix wrong increment of temporary file for small sizes 2024-02-06 16:00:21 +01:00
meirzamoodle
fb7da9c74f MDL-74641 repository: Handles increase bytes while extracting zip files
We should not rely solely on the provided size information.
Therefore the system needs to recalculate the size of each file in the zip file,
whether small or big.

The changes also cover the filemanager.js file if an error appears.
2024-02-06 16:00:21 +01: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
Noel De Martin
bd22abe778 MDL-80784 behat: Disable SSL checks for app initialization 2024-01-31 14:06:17 +01: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
Ruslan Kabalin
80691cf5a3
MDL-79003 eslint: Enable 'reportUnusedDisableDirectives' eslint setting
This commit is a backport of MDL-74301 which should have been backported
at the time.

This will warn on unused /* eslint-disable */ statements.
2024-01-30 14:04:38 +08:00
Ruslan Kabalin
846a8b6568
MDL-79003 eslint: Address issues reported by eslint
This commit is a backport of MDL-74301 which should have been backported
at the time.
2024-01-30 14:03:05 +08:00
Paul Holden
8c7983a43f
MDL-80667 task: preserve environment when running tasks from web.
For sites that rely on environment variables to set configuration,
ensure they are also present when executing task process.

Co-authored-by: Olivier Wenger <olivier.wenger@liip.ch>
2024-01-18 16:54:10 +00:00