From f0c8aef74267a85e45ee1d58d99c83fd3dcc3b72 Mon Sep 17 00:00:00 2001 From: David Bogner Date: Sun, 12 Jan 2025 15:05:40 +0100 Subject: [PATCH] Improve behat test for customfilter --- tests/behat/customfilter_multiselect.feature | 36 +++++++++----------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/tests/behat/customfilter_multiselect.feature b/tests/behat/customfilter_multiselect.feature index 04fcc388..5ac1b145 100644 --- a/tests/behat/customfilter_multiselect.feature +++ b/tests/behat/customfilter_multiselect.feature @@ -50,37 +50,30 @@ Feature: Create entry, add multiselect and use customfilter Then I add to "id_esection_editor" editor the text ". ##addnewentry## ##customfilter:mycustomfilter## ##entries## ." And I press "Save changes" - # Add me some fields. - When I follow "Browse" - And I follow "Add a new entry" - And I fill in the entry form fields - | type | name | value | - | text | Text | testtext1 | - And I open the autocomplete suggestions list - And I click on "Opt4" item in the autocomplete list - And I click on "Opt5" item in the autocomplete list - And I press "Save changes" - And I wait until the page is ready - And I should see "1 entry(s) updated" - Then I press "Continue" - + # Add entries And I follow "Add a new entry" And I fill in the entry form fields | type | name | value | | text | Text | testtext2 | And I open the autocomplete suggestions list - And I click on "Opt2" item in the autocomplete list + And I click on "Opt1" item in the autocomplete list And I press "Save changes" And I press "Continue" + And I should see "Opt1" And I follow "Add a new entry" And I fill in the entry form fields | type | name | value | | text | Text | testtext3 | And I open the autocomplete suggestions list + And I click on "Opt2" item in the autocomplete list And I click on "Opt3" item in the autocomplete list And I press "Save changes" And I press "Continue" + And I should see "Opt1" + And I should see "Opt2" + And I should see "Opt3" + And I follow "Add a new entry" And I fill in the entry form fields @@ -91,8 +84,11 @@ Feature: Create entry, add multiselect and use customfilter And I press "Save changes" And I press "Continue" Then I should see "testtext3" + And I should see "Opt1" + And I should see "Opt2" And I should see "Opt3" - And I should not see "Opt6" + And I should see "Opt4" + And I should not see "Opt5" @javascript Scenario: Use customfilter. @@ -104,7 +100,9 @@ Feature: Create entry, add multiselect and use customfilter And I press the escape key And I press "id_customsearch" And I should see "Opt2" - And I should not see "Opt3" + And I should see "Opt3" + And I should not see "Opt1" + And I should not see "Opt4" And I should not see "Opt5" # Use customfilter to select Opt1 OR Opt2. @@ -115,8 +113,8 @@ Feature: Create entry, add multiselect and use customfilter And I press "id_customsearch" And I should see "Opt1" And I should see "Opt2" - And I should see "Opt4" - And I should see "Opt5" + And I should see "Opt3" + And I should not see "Opt4" And I should not see "Opt3" # Use customfilter to select Opt1 AND Opt5 after deselecting Opt2.