Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59534

Random failures running feedback's course mapping tests

XMLWordPrintable

    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • Hide

      Run this scenario:

      --name='Site feedback is mapped to courses'
      

      with firefox and chrome, with mac and linux, with boost, clean and more.

      No random failures happen.

      Show
      Run this scenario: --name='Site feedback is mapped to courses' with firefox and chrome, with mac and linux, with boost, clean and more. No random failures happen.

      Since some days ago, I've been getting consistent failures when executing this test:

      --name='Site feedback is mapped to courses'
      

      And was able to reproduce it both with firefox and chrome, both with mac and linux. Always. Curiously I asked others to run it and it passed for them (hence the "random" in the title, although for me it was "consistent").

      See: https://devpad.moodle.org/p/failures_to_investigate_20170712 for the error with chrome and also this for firefox:

      )$ vendor/bin/behat --config /Users/stronk7/Sites/moodle_data_gitintegration/master/postgres_behat/behatrun/behat/behat.yml --name='Site feedback is mapped to courses' --suite=default --profile=seleniumfirefox
      Moodle 3.4dev (Build: 20170707), e80e4778c5a0eb8326db4e12931c12a1bce6f6b9
      Php: 7.1.5, pgsql: 9.3.17, OS: Darwin 16.6.0 x86_64
      Server OS "Darwin", Browser: "firefox"
      Started at 13-07-2017, 23:58
      ................................F------------------------------------- 70
      ----------------------------------
       
      --- Pasos fallidos:
       
      001 Scenario: Site feedback is mapped to courses                         # /Users/stronk7/git_moodle/integration/mod/feedback/tests/behat/coursemapping.feature:134
            And I should see "You can only access this feedback from a course" # /Users/stronk7/git_moodle/integration/mod/feedback/tests/behat/coursemapping.feature:147
              "You can only access this feedback from a course" text was not found in the page (Behat\Mink\Exception\ExpectationException)
       
      1 escenario (1 fallaron)
      104 pasos (32 pasaron, 1 fallaron, 71 saltadas)
      1m9.85s (62.36Mb)
      

      In both cases... what is happening is that the "no suggestions box" is hiding the "save changes" button and the configuration is not saved. chrome detects it earlier and firefox later when the expected behavior fails.

      I've tried using the "focus off" step, clicking elsewhere, pressing tab or 13... and none of them was working ok, mainly because the "Courses" label doesn't seem to be enough for behat to be able to find the field.

      At the end, pressing "Escape" seemed to be the only working alternative, so I ended with this patch that is working for me and now I've here firefox, chrome, mac and linux passing.

      So here it's the patch, for your consideration. It's not precious, but kills the random failures. Pity there aren't more fields in the form to switch to any of them.

      Ciao

      PS: Haven't tried in other branches, just detected the failures in master. In any case, it applies clean in both 32 and 33 stables.

            stronk7 Eloy Lafuente (stronk7)
            stronk7 Eloy Lafuente (stronk7)
            Damyon Wiese Damyon Wiese
            Dan Poltawski Dan Poltawski
            David Monllaó David Monllaó
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.