mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
cypress test data adjusted to new search mechanism
This commit is contained in:
parent
57101b80bf
commit
8f1b3b9f6b
@ -95,9 +95,8 @@ const createPostQuery = str => {
|
|||||||
}
|
}
|
||||||
// start globbing ...
|
// start globbing ...
|
||||||
escapedString.split(' ').forEach(s => {
|
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
|
// 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 + '*'
|
result += ' OR ' + s + '*'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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")
|
cy.get(".searchable-input .ds-select input")
|
||||||
.focus()
|
.focus()
|
||||||
.type(value)
|
.type(value)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ Feature: Search
|
|||||||
Given I have a user account
|
Given I have a user account
|
||||||
And we have the following posts in our database:
|
And we have the following posts in our database:
|
||||||
| id | title | content |
|
| 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 |
|
| p2 | No searched for content | will be found in this post, I guarantee |
|
||||||
And we have the following user accounts:
|
And we have the following user accounts:
|
||||||
| slug | name | id |
|
| slug | name | id |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user