From f91dd598efed1b1ce00ed32d2416400cc768c298 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Fri, 26 Apr 2024 09:40:51 +0100 Subject: [PATCH] MDL-80597 mod_quiz: simplify filtering by tags Behat assertions. The initial filtering for category was redundant, as it's applied by default. While present it also caused reproducible failures on CI due to timing issues when trying to apply multiple filters. --- mod/quiz/tests/behat/editing_add_random.feature | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mod/quiz/tests/behat/editing_add_random.feature b/mod/quiz/tests/behat/editing_add_random.feature index 856db6e3c4c..76232c4090b 100644 --- a/mod/quiz/tests/behat/editing_add_random.feature +++ b/mod/quiz/tests/behat/editing_add_random.feature @@ -53,19 +53,20 @@ Feature: Adding random questions to a quiz based on category and tags Given I am on the "Quiz 1" "mod_quiz > Edit" page logged in as "teacher1" When I open the "last" add to quiz menu And I follow "a random question" - And I apply question bank filter "Category" with value "Questions Category 1" And I apply question bank filter "Tag" with value "foo" - And I click on "Apply filters" "button" And I wait until the page is ready And I should see "question 1 name" - And I should not see "question 3 name" + And I should see "\"listen\" & \"answer\"" And I should not see "question 2 name" + And I should not see "question 3 name" And I should not see "question 4 name" + # Ensure tagged questions inside subcategories are also matched. And I set the field "Also show questions from subcategories" to "1" And I click on "Apply filters" "button" And I wait until the page is ready And I should see "question 1 name" And I should see "question 3 name" + And I should see "\"listen\" & \"answer\"" And I should not see "question 2 name" And I should not see "question 4 name"