Commit graph

27906 commits

Author SHA1 Message Date
Andrew Nicols
9cb46e24f2 MDL-66979 behat: Add a step to set a timeout factor for a test 2021-01-29 14:18:54 +08:00
Eloy Lafuente (stronk7)
0db430c5a7 MDL-66979 behat: Goutte driver doesn't implement setTimeouts()
Also, change:

get_real_timeout(30000)

to:

get_real_timeout(30) * 1000

because the original functions are defined to use seconds, and
having the 1000 around will help us detecting cases in the case
of a hypothetical review of uses.
2021-01-29 14:18:46 +08:00
Andrew Nicols
3a0d042395 MDL-66979 behat: Set script timeout with timeout factor 2021-01-28 15:27:49 +08:00
Andrew Nicols
ebd36d2ac2 MDL-66979 behat: Handle driver stop failure properly
An case was found where the webdriver stop() call could fail in an
AfterScenario hook, leading to a complete rerun if no other errors were
experienced.
2021-01-28 15:07:52 +08:00
Andrew Nicols
058394a412 MDL-66979 behat: Warn about old behat.yml file location 2021-01-23 20:44:53 +08:00
Andrew Nicols
ef4a652abe MDL-66979 behat: Rename and warn on old config 2021-01-22 14:52:14 +08:00
Andrew Nicols
ce30baea59 MDL-66979 behat: availability field extends textarea
The availability behat field extends the textarea type, and therefore
needs to include this type.
2021-01-22 14:52:13 +08:00
Andrew Nicols
c56395fba6 MDL-66979 behat: Improve chromeOptions configuration
Simplify the chromeOptions configuration to improve readability.
2021-01-22 14:52:13 +08:00
Andrew Nicols
767c5f4512 MDL-66979 behat: Remove unused var 2021-01-22 14:52:13 +08:00
Andrew Nicols
73e428979d MDL-66979 behat: Whitespace fix 2021-01-22 14:52:13 +08:00
Andrew Nicols
cbb2547c32 MDL-66979 behat: Remove manually triggered events
Behat should not trigger Synthetic browser events. It is incorrect to do
so as the UI should be used to trigger events correctly.

The W3C WebDriver specification explicitly states when and where these
events will be triggered from (the browser) and therefore there is no
ambiguity and no need to synthetically trigger them from Behat.
2021-01-22 14:52:13 +08:00
Andrew Nicols
035d4eb72a MDL-66979 behat: Scroll nodes into view before hover
The W3C Specification does not require that a NodeElement be in the
current viewport before triggering a mouseOver. As a result the
mouseOver will generate an Exception because the element is not in the
viewport, and the X/Y co-ordinates are invalid.

To handle this the node is scrolled into view.
2021-01-22 14:52:13 +08:00
Andrew Nicols
eec766f375 MDL-66979 behat: Fix window switching
Normalise switching of window contexts by setting the main window name
to a null.

Where the window has no name (null/empty), then the root context is
selected.
2021-01-22 14:52:13 +08:00
Andrew Nicols
d1e52f7086 MDL-66979 behat: Update passwordunmask form field control
Update the passwordunmask form field type for behat to interact with the
form element as a human would rather than via synthetic event triggers.
2021-01-22 14:52:13 +08:00
Andrew Nicols
330b665f82 MDL-66979 behat: iFrames must have a name for switchTo
The W3C WebDriver protocol supports switching of contexts using a named
context, and not the class asscoiated with that context.
2021-01-22 14:52:13 +08:00
Andrew Nicols
ca2acd10c9 MDL-66979 behat: Handle JS on elements better
This change introduces a new function to execute Javascript directly on
a node.

This should not, ordinarily, be used directly by steps, but may be
required in other parts of the Behat interaction.
2021-01-22 14:52:13 +08:00
Andrew Nicols
863d68a344 MDL-66979 behat: Rename selenium config to webdriver
The PHP WebDriver Mink Driver does not necessarily require Selenium. It
supports Selenium 3 upwards, and can be used directly with ChromeDriver,
EdgeDriver, SafariDriver, GeckoDriver, and others.

It therefore uses a slightly different configuraitno path.
2021-01-22 14:52:13 +08:00
Andrew Nicols
c816ca79fa MDL-66979 behat: Core updates for W3C WebDriver
This commit updates core Behat features to make use of the
php-webdriver/webdriver library instead of the legacy Instaclick
library.

Most of these changes relate to use of features of WebDriver which we
are required to use directly rather than through the Mink Driver.
2021-01-22 14:52:13 +08:00
Sujith Haridasan
cbc2b593e7 MDL-57020 scales: Allow deletion of unused scales in forum
Allow deletion of unused scales used in a
forum for the course.

Signed-off-by: Sujith Haridasan <sujith@moodle.com>
2021-01-15 15:06:19 +05:30
Jun Pataleta
90c450839d Merge branch 'MDL-70580-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-13 10:19:51 +08:00
Paul Holden
33427c7c5d MDL-70580 core: retrieve closest tree node in click handler. 2021-01-12 20:17:32 +00:00
Jun Pataleta
be36ead8b0 Merge branch 'MDL-70580-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2021-01-12 13:15:43 +08:00
Andrew Nicols
357909b23b MDL-70580 core: Tree nodes should check if they were clicked directly 2021-01-11 23:43:28 +00:00
Michael Hawkins
2c45443ad7 MDL-70571 lib: Added additional escaping to search_input template 2021-01-11 16:20:32 +01:00
Sara Arjona
e22723680d Merge branch 'MDL-70352-MOODLE_310_STABLE' of https://github.com/dmitriim/moodle into MOODLE_310_STABLE 2021-01-11 12:24:05 +01:00
Jun Pataleta
ceab4136aa Merge branch 'MDL-70310-310' of git://github.com/ilyatregubov/moodle into MOODLE_310_STABLE 2021-01-08 14:47:14 +08:00
Eloy Lafuente (stronk7)
af4b97f57a Merge branch 'MDL-70245-MOODLE_310_STABLE' of https://github.com/TomoTsuyuki/moodle into MOODLE_310_STABLE 2021-01-07 23:49:47 +01:00
Ilya Tregubov
4e1786f27f MDL-70310 user: Remove yahoo icon since domain no longer exists. 2021-01-07 09:15:28 +02:00
Eloy Lafuente (stronk7)
8d306e640f Merge branch 'MDL-70476_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2021-01-07 00:28:08 +01:00
Eloy Lafuente (stronk7)
17d296f1ea Merge branch 'MOODLE_310_MDL-70520' of https://github.com/golenkovm/moodle into MOODLE_310_STABLE 2021-01-07 00:19:12 +01:00
Dmitrii Metelkin
34153bcc77 MDL-70352 core: attach modal to a specific element 2021-01-06 11:19:57 +11:00
Sébastien Mehr
9ee975f3a9 MDL-70482 template: add missing closing bracket 2020-12-24 14:04:54 +01:00
Eloy Lafuente (stronk7)
62b9a44045 Merge branch 'MDL-70279-310' of git://github.com/paulholden/moodle into MOODLE_310_STABLE 2020-12-23 00:47:00 +01:00
Jake Dallimore
9480706466 Merge branch 'MDL-69422-310-2' of git://github.com/junpataleta/moodle into MOODLE_310_STABLE 2020-12-22 16:03:17 +08:00
Mikhail Golenkov
6ba4712549 MDL-70520 tasks: Keep lastruntime when a scheduled task is reset 2020-12-22 15:30:45 +11:00
Eloy Lafuente (stronk7)
639f6143e7 Merge branch 'MDL-70430-310-oauth2refreshtoken' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-12-22 00:07:00 +01:00
Sara Arjona
79b89c2d42 Merge branch 'MDL-69107-310-2' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-18 15:22:24 +01:00
Tim Hunt
ccfc9f7bc9 MDL-70476 permission overrides: role names double-escaped in tool tip 2020-12-18 13:04:16 +00:00
Sara Arjona
e00b006d51 Merge branch 'MDL-70322-310' of git://github.com/roland04/moodle into MOODLE_310_STABLE 2020-12-16 12:04:22 +01:00
Jun Pataleta
7ce3918e83 Merge branch 'MDL-54907_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-16 10:26:58 +08:00
Andrew Nicols
aa1c7e0a64 MDL-69107 user: Fix autocomplete usages 2020-12-16 07:50:56 +08:00
Sara Arjona
bc103afb53 Merge branch 'MDL-70357-310-cronlibthrowables' of git://github.com/mudrd8mz/moodle into MOODLE_310_STABLE 2020-12-15 14:56:04 +01:00
Jake Dallimore
5c899c722c Merge branch 'MDL-67623-310_blocks_myoverview_pagination_regression' of https://github.com/tomdickman/moodle into MOODLE_310_STABLE 2020-12-15 18:22:11 +08:00
Andrew Nicols
22a5445346 MDL-69107 form_autocomplete: Rewrite item selection
The form_autocomplete is essentially a custom element. Unfortunately the
`setValue()` function in Mink has undesired actions so it is necessary
to write our own handling for it.

The standard Mink `setValue()` function focuses the element, sets a
value, and then blurs the element. In the case of the autocomplete this
can cause the autocomplete suggestions list to be closed in some
situations. Instead of using the setValue we click, and type the value,
but do not immediately blur.
2020-12-15 09:08:05 +08:00
Sara Arjona
7697ac6538 Merge branch 'MDL-70397-310' of git://github.com/andrewnicols/moodle into MOODLE_310_STABLE 2020-12-14 17:12:05 +01:00
Tom Dickman
66b3c79275 MDL-67623 block overview: fix pagination regression
Fixed a regression caused by MDL-64194 resulting in Dashboard - Course
overview pagination not working from second page of courses onwards.

Course overview block should now do the following:
- Display no pagination controls when user has no courses
- Display no pagination controls when less than 12 courses to display
- Only display pagination controls up to the number of courses user is
enrolled in
- Work correctly when on a page greater than the second page.
2020-12-14 13:28:11 +11:00
Mikel Martín
fa31950c6a MDL-70322 core_search: consistent search icon 2020-12-11 15:40:45 +01:00
Tomo Tsuyuki
6998cbfad4 MDL-70245 core_grade: Fix grade_get_setting unit test failures
To fix the phpunit issue, change from static variable to use cache
2020-12-10 16:47:51 +11:00
Andrew Nicols
5c0a5a531d Merge branch 'MDL-70320_310' of https://github.com/timhunt/moodle into MOODLE_310_STABLE 2020-12-09 12:06:22 +08:00
David Mudrák
0e7dc879de MDL-70430 oauth2: Fix storing of the new refresh token
There was a typo - missing underscore. As a result, the new refresh
token was never updated in the database. Depending on the issuer and
whether or when theyu invalidate issued refresh tokens, this might or
might not make the token refresh stop working.
2020-12-08 11:24:27 +01:00