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

Behat step “I set the following administration settings values” random failures

XMLWordPrintable

      I’ve seen a lot of failures with this step and I think it’s because the browser decides that the time to start loading the “Site administration” page means that it is not detected as a navigation change.

      I think that we need to improve this step and there are a few ways that we can do so.

      At the moment the step basically does:

      1. for each setting you specified:
        1. click on “Site administration” in the flat navigation [<== Step that fails]
        2. set the value of the “Search” field to the setting label
        3. hit the search button
        4. find the field on the page
        5. set the value
        6. save changes
        7. repeat

      I think that we can combine the top three steps of the for each by going directly to /admin/search.php?search=$label.

      I think that this will actually make this work much better, fail much less, and really we should not be using this step to test this part of the admin tree - using that box should have it’s own tests.

      At the same time, many of these uses can be converted to use data generators. Changing the value is not the feature being tested, but the effect of the new value is.

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Simey Lameze Simey Lameze
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 19 minutes
                2h 19m

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