mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
changes requested by reviewers
This commit is contained in:
parent
a30ae12d65
commit
de2193e75a
@ -928,10 +928,19 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
trollingComment.update({ disabled: true, updatedAt: new Date().toISOString(), closed: true }),
|
||||
])
|
||||
|
||||
await Promise.all([...Array(30).keys()].map(() => Factory.build('user')))
|
||||
const additionalUsers = await Promise.all([...Array(30).keys()].map(() => Factory.build('user')))
|
||||
|
||||
await Promise.all(
|
||||
additionalUsers.map(async (user) => {
|
||||
await jennyRostock.relateTo(user, 'following')
|
||||
await user.relateTo(jennyRostock, 'following')
|
||||
}),
|
||||
)
|
||||
|
||||
await Promise.all(
|
||||
[...Array(30).keys()].map((index) => Factory.build('user', { name: `Jenny${index}` })),
|
||||
)
|
||||
|
||||
await Promise.all(
|
||||
[...Array(30).keys()].map(() =>
|
||||
Factory.build(
|
||||
@ -947,6 +956,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
await Promise.all(
|
||||
[...Array(30).keys()].map(() =>
|
||||
Factory.build(
|
||||
|
||||
@ -28,7 +28,7 @@ const postWhereClause = `WHERE score >= 0.0
|
||||
|
||||
const searchPostsSetup = {
|
||||
fulltextIndex: 'post_fulltext_search',
|
||||
match: 'MATCH (resource)<-[:WROTE]-(author:User)',
|
||||
match: 'MATCH (resource:Post)<-[:WROTE]-(author:User)',
|
||||
whereClause: postWhereClause,
|
||||
withClause: `WITH resource, author,
|
||||
[(resource)<-[:COMMENTS]-(comment:Comment) | comment] AS comments,
|
||||
@ -45,7 +45,7 @@ const searchPostsSetup = {
|
||||
|
||||
const searchUsersSetup = {
|
||||
fulltextIndex: 'user_fulltext_search',
|
||||
match: 'MATCH (resource)',
|
||||
match: 'MATCH (resource:User)',
|
||||
whereClause: simpleWhereClause,
|
||||
withClause: '',
|
||||
returnClause: 'resource {.*, __typename: labels(resource)[0]}',
|
||||
@ -54,7 +54,7 @@ const searchUsersSetup = {
|
||||
|
||||
const searchHashtagsSetup = {
|
||||
fulltextIndex: 'tag_fulltext_search',
|
||||
match: 'MATCH (resource)',
|
||||
match: 'MATCH (resource:Tag)',
|
||||
whereClause: simpleWhereClause,
|
||||
withClause: '',
|
||||
returnClause: 'resource {.*, __typename: labels(resource)[0]}',
|
||||
|
||||
@ -24,7 +24,7 @@ beforeAll(async () => {
|
||||
})
|
||||
|
||||
afterAll(async () => {
|
||||
// await cleanDatabase()
|
||||
await cleanDatabase()
|
||||
})
|
||||
|
||||
const searchQuery = gql`
|
||||
|
||||
@ -3,7 +3,6 @@
|
||||
<base-button
|
||||
v-if="hasPreviousResult"
|
||||
@click="$emit('back')"
|
||||
:disabled="!hasPreviousResult"
|
||||
icon="arrow-left"
|
||||
circle
|
||||
class="previous-button"
|
||||
@ -17,7 +16,6 @@
|
||||
<base-button
|
||||
v-if="hasMoreResults"
|
||||
@click="$emit('next')"
|
||||
:disabled="!hasMoreResults"
|
||||
icon="arrow-right"
|
||||
circle
|
||||
class="next-button"
|
||||
|
||||
@ -111,7 +111,7 @@ describe('SearchableInput.vue', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('searches for the term when enter is pressed', async () => {
|
||||
it('opens the search result page when enter is pressed', async () => {
|
||||
select.element.value = 'ab'
|
||||
select.trigger('input')
|
||||
select.trigger('keyup.enter')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user