70 Commits

Author SHA1 Message Date
Andrew Nicols
5be481d1d0
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Angelia Dela Cruz
084c120c79 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 12:00:53 +08: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)
95c8cb7582 MDL-74512 behat: Skip tests requiring lang install/upgrade
By adding the step:

Given remote langimport tests are enabled

We make the execution of scenarios requiring to install /
upgrade lang packs optional, based in the existence of the constant:

TOOL_LANGIMPORT_REMOTE_TESTS

That way, when we are skipping language upgrades with the CFG var:

$CFG->skiplangupgrade = true

We can decide not not execute those tests.

With other words, putting something like this in the config.php
file we will be controlling when to execute or no the behat tests:

    // Disable lang updates on upgrade.
    $CFG->skiplangupgrade = true;
    if (empty($CFG->skiplangupgrade)) {
        // Define it only if we aren't skipping lang upgrades.
        define('TOOL_LANGIMPORT_REMOTE_TESTS', true);
    }
2022-04-17 20:27:57 +02:00
Jun Pataleta
ae14ff321b MDL-72928 core: Remove Remember username 2022-02-11 12:01:26 +08:00
Mathew May
ecb92c7ed9 MDL-72928 login: Update styling and functionality 2022-02-11 12:01:26 +08: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
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
abgreeve
d236b2ec56 MDL-69371 core_login: simplification of behat steps 2021-10-19 13:47:05 +02:00
Bas Brands
47bbfe0f4f MDL-69371 theme_boost: redesign the moodle login page 2021-10-19 13:47:04 +02:00
Andrew Nicols
11ebfe601c MDL-72173 behat: Respect login page preference 2021-09-16 20:47:18 +08:00
Andrew Nicols
92018f6971 MDL-72173 behat: Fix typo Logout <> Log out 2021-09-16 15:03:07 +08:00
Andrew Nicols
ad8283a80f MDL-72173 behat: Add tests for login/logout steps 2021-09-16 12:20:37 +08:00
Andrew Nicols
41ebf95bbe MDL-72173 behat: Automatically log user out on behat login 2021-09-16 12:13:26 +08:00
Andrew Nicols
93cb87cddb MDL-72173 behat: Add and use behat logout URL 2021-09-16 12:13:26 +08:00
Andrew Nicols
441f313217 MDL-72173 behat: Switch to behat login URL 2021-09-13 11:20:35 +08:00
Andrew Nicols
891d1bfad3 MDL-71055 behat: Update core settings to use generator
These changes have only been applied to settings which were already
using settings names and values, but which were still using the UI.
2021-08-23 12:23:03 +08:00
Eloy Lafuente (stronk7)
f6711bb394 MDL-67673 phpunit: Fix the return type of template methods
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.

At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Andrew Nicols
33f6c33357 MDL-69391 behat: Grammar correction in feature 2020-09-03 11:34:47 +08:00
Jun Pataleta
bca6b83c97 MDL-69391 auth: Colour contrast accessibility test for login page 2020-09-03 11:10:36 +08:00
Jun Pataleta
cc7dd09630 MDL-69389 auth: Add wcag141 test for the login page accessibility test 2020-08-26 11:04:57 +08:00
Andrew Nicols
39a736ef9a MDL-67687 behat: Login page accessibility ensurance 2020-08-05 07:41:45 +08:00
Andrew Nicols
b284293402 MDL-69138 behat: Update session->visit() to use visit step 2020-07-22 16:43:08 +08:00
Tim Hunt
9bcc357107 MDL-66335 behat: new step to log in and go straight to a particular page
I did not think thought through if this new URL parameter would be a
potential security hole. The simple cop-out option is to make it only
work on Behat sites for now.
2019-10-14 11:21:22 +01:00
sam marshall
079eae376c MDL-63977 Behat: Make standard login step work for app as well 2019-02-11 16:20:43 +00:00
Andrew Nicols
1ac8ae517d Merge branch 'MDL-63742-master' of git://github.com/jleyva/moodle 2018-10-30 07:46:00 +08:00
Eloy Lafuente (stronk7)
f3d80b483b Merge branch 'MDL-63730-master-enfix' of git://github.com/mudrd8mz/moodle 2018-10-29 13:23:53 +01:00
Juan Leyva
6f79370531 MDL-63742 auth: New WS core_auth_resend_confirmation_email 2018-10-29 11:04:02 +01:00
David Mudrák
f5d98e6173 MDL-63730 lang: Update Behat scenarios to use the new strings 2018-10-26 13:25:56 +02:00
Jun Pataleta
428a47fcbf MDL-63528 auth: Behat scenario for "Remember username" display 2018-10-04 12:22:35 +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
Andrew Nicols
cc806faf18 MDL-62950 behat: Correct navbar references 2018-07-26 15:29:05 +08:00
Andrew Nicols
d80fbaaca6 MDL-62950 behat: Correct path to P&P 2018-07-26 14:49:04 +08:00
Frédéric Massart
1582d54bb0 MDL-62253 core_auth: Implement privacy API 2018-05-01 09:14:58 +08:00
David Monllao
f5779bb101 MDL-56511 theme_boost: Fixing minor behat failures
Related to MDL-56511 markup changes.
2018-04-18 18:24:20 +02:00
Marina Glancy
1727c939ba MDL-61477 admin: sitepolicy handler API
- Define sitepolicy handler manager class, base class and the core handler
- Allow to set a plugin as sitepolicyhandler that implements the sitepolicy API
- Modify web services to return information from the 3rd party handler instead of core if needed
2018-03-15 11:32:55 +08:00
Juan Leyva
1f7565c121 MDL-61622 auth: New WS is_age_digital_consent_verification_enabled 2018-03-09 17:54:58 +01:00
Mihail Geshoski
25dbbdf90b MDL-61423 authentication: Add digital minor verification upon signup 2018-03-08 15:01:25 +08:00
Jake Dallimore
a545224b9d MDL-57357 auth: add behat coverage for remember username login feature 2016-12-23 11:01:56 +08:00
Jake Dallimore
fa30dd8c6e MDL-57182 navigation: fix login failures display in page footer.
A bug introduced with MDL-45893 meant that the failure count was being
reset, causing the footer code to be skipped. This patch fixes that
bug and adds behat tests covering the displayloginfailures feature.
2016-12-13 07:19:58 +08:00
Rajesh Taneja
b3502be320
MDL-56898 behat: Ensure we have button in viewport and page is stable 2016-11-24 07:27:19 +08:00
Rajesh Taneja
7f24e5e654
MDL-56898 behat: Click on logout link in footer, it's faster 2016-11-21 09:25:35 +08:00
Juan Leyva
83e4dc1796 MDL-56092 core_auth: New WS core_auth_confirm_user 2016-10-04 09:50:32 +01: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
86055d11f9 MDL-46891 behat: Optimised login step and context helper 2016-03-11 10:51:15 +08:00
Rajesh Taneja
42ad096fdb MDL-46891 Behat: Added support for behat 3 2016-03-11 10:51:15 +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
Simey Lameze
f5da794c25 MDL-49412 core_auth: Fix behat failures
Part of MDL-45774.
2015-04-10 17:18:22 +08:00
Jetha Chan
b865a3e2d1 MDL-47559 user_menu: customusermenu setting 2014-10-27 20:04:45 +08:00