cypress test data adjusted to new search mechanism

This commit is contained in:
Moriz Wahl 2020-03-10 12:12:51 +01:00 committed by mattwr18
parent 57101b80bf
commit 8f1b3b9f6b
3 changed files with 3 additions and 4 deletions

View File

@ -95,9 +95,8 @@ const createPostQuery = str => {
}
// start globbing ...
escapedString.split(' ').forEach(s => {
if (!s.match(/^(AND|OR|NOT)$/i)) {
if (s.length > 3) {
// at least 4 letters. So AND, OR and NOT are never used unquoted
// but the related cypress test expects a search for just two chars.
result += ' OR ' + s + '*'
}
})

View File

@ -43,7 +43,7 @@ Then("I should see the following users in the select dropdown:", table => {
});
});
When("I type {string} and press Enter", value => {
When("I type {PR} and press Enter", value => {
cy.get(".searchable-input .ds-select input")
.focus()
.type(value)

View File

@ -7,7 +7,7 @@ Feature: Search
Given I have a user account
And we have the following posts in our database:
| id | title | content |
| p1 | 101 Essays that will change the way you think | 101 Essays, of course! |
| p1 | 101 Essays that will change the way you think | 101 Essays, of course (PR)! |
| p2 | No searched for content | will be found in this post, I guarantee |
And we have the following user accounts:
| slug | name | id |