Skip to content

Commit

Permalink
Improve behat test for customfilter
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed Jan 12, 2025
1 parent 22d2fb6 commit f0c8aef
Showing 1 changed file with 17 additions and 19 deletions.
36 changes: 17 additions & 19 deletions tests/behat/customfilter_multiselect.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit f0c8aef

Please sign in to comment.