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

Search: Behat mock searching - fix minor bug, use simpledb instead

    XMLWordPrintable

    Details

      Description

      I originally filed the issue because of this minor bug:

      When using the Behat step to set fake search results, the 'total count' data is not set correctly. (It gets the real result count from the engine - which, as it hasn't done anything, always returns zero.) This makes it impossible to create Behat tests which involve multiple pages of search results. None of the core Behat tests do this, but third-party tests might need to.

      However, I also realised that in most cases we no longer need the mock search results, because the 'simpledb' search engine has been implemented. Using this will provide more realistic tests.

      Unfortunately there are some cases where simpledb does not support a feature that we are testing the UI for (user search and groups search). For these, the mock search results are still needed, so we are not able to remove/deprecate this step yet.

      This change therefore includes two parts:

      1. Change all possible search Behat scenarios to use simpledb. This includes adding one new Behat step to reindex search. (You can do this in the UI but it's slow and clumsy, so I made a new step.)
      2. Fix the bug with mock search results not having the correct result count.

      Potentially we could backport all parts of this (the bug obviously, + the other changes because they are Behat change).

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                quen Sam Marshall
                Reporter:
                quen Sam Marshall
                Peer reviewer:
                Mark Johnson
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Sep/19

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 50 minutes
                  50m