moodlehq / moodle-docker

A docker environment for moodle developers
GNU General Public License v3.0
376 stars 245 forks source link

Javascript behat tests failing on newer versions of Moodle #191

Closed NeillM closed 2 years ago

NeillM commented 2 years ago

All Javascript based behat tests seem to be failing if running a version of Moodle that contain https://tracker.moodle.org/browse/MDL-65943

Steps to reproduce

  1. Checkout MOODLE_310_STABLE
  2. Start moodle-docker using the default settings (pointing at it)
  3. Initialise behat
  4. Run bin/moodle-docker-compose exec webserver vendor/bin/behat --config /var/www/behatdata/behatrun/behat/behat.yml --tags="@javascript&&@mod_assign"

All the tests will fail

image

with a message similar to:

BeforeStep # behat_hooks::before_step() Javascript code and/or AJAX requests are not ready after 10 seconds. There is a Javascript error or the code is extremely slow (theme_boost/loader:theme_boost/drawer). If you are using a slow machine, consider setting $CFG->behat_increasetimeout. (Exception)

If you checkout commit cede428cc4b9d339d81f35025f00522a2075cce4 which is the one immediately before the merge of MDL-65943 (and conveniently the previous weekly release) the same tests will pass.

It seems to be somewhat environmental since this does not appear to be failing when I run the tests outside of moodle-docker

aspark21 commented 2 years ago

I think this will likely fix it - https://github.com/aspark21/moodle-docker/commit/d4db6f5590aa67b450b0a9395115101d7cf81b7c

I will work on submitting a MR for #154 this week

NeillM commented 2 years ago

Thanks Alistair I'll give that patch a try tomorrow

NeillM commented 2 years ago

The tests do run normally with Alistair's patch applied. I'm guessing Moodle got made incompatible with the version of Firefox that is used by default.

stronk7 commented 2 years ago

Closed by #195, just merged.