-
Bug
-
Resolution: Fixed
-
Minor
-
3.5.7, 3.6.5, 3.7.1, 3.8
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
-
MDL-66132-master -
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:
- 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.)
- 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).
- Testing discovered
-
MDL-66205 Add some behat tests covering search paging / prev / next ... behaviors
- Open