mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
specs for Search for Hashtags
This commit is contained in:
parent
e7d0e1b61e
commit
7024ea0b30
@ -106,6 +106,16 @@ describe('SearchableInput.vue', () => {
|
|||||||
params: { id: 'u2', slug: 'bob-der-baumeister' },
|
params: { id: 'u2', slug: 'bob-der-baumeister' },
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('pushes hashtag query params', async () => {
|
||||||
|
select.element.value = 'Hash'
|
||||||
|
select.trigger('input')
|
||||||
|
const tags = wrapper.findAll('.hc-hashtag')
|
||||||
|
const tag = tags.filter(item => item.text().match(/#Hashtag/))
|
||||||
|
tag.trigger('click')
|
||||||
|
await Vue.nextTick()
|
||||||
|
expect(mocks.$router.push).toHaveBeenCalledWith('?hashtag=Hashtag')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -106,6 +106,10 @@ export const searchResults = [
|
|||||||
name: 'Tonya Mohr',
|
name: 'Tonya Mohr',
|
||||||
slug: 'tonya-mohr',
|
slug: 'tonya-mohr',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'Hashtag',
|
||||||
|
__typename: 'Tag',
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
storiesOf('Search Field', module)
|
storiesOf('Search Field', module)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user