Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Add support to search by emoji #1164

Merged
merged 3 commits into from
Oct 27, 2022

Conversation

me-manikanta
Copy link
Contributor

@me-manikanta me-manikanta commented Oct 26, 2022

Fixes Issue: #1163

Description

Compare searchinput with emojis in the data. Showing the emoji that match.

Examples:
Success
Failure

Tests

  • All tests passed.

@vercel
Copy link

vercel bot commented Oct 26, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
gitmoji ✅ Ready (Inspect) Visit Preview Oct 27, 2022 at 8:45PM (UTC)

Copy link
Owner

@carloscuesta carloscuesta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Can we add a test scenario here to cover this new behaviour?

describe('when user search the fire gitmoji', () => {
beforeAll(() => {
Router.useRouter.mockReturnValue(stubs.routerMock())
})
it('should find the fire gitmoji by code', () => {
const wrapper = renderer.create(<GitmojiList {...stubs.props} />)
const instance = wrapper.root
const query = 'Fire'
renderer.act(() => {
instance
.findByType('input')
.props.onChange({ target: { value: query } })
})
expect(instance.findAllByType('article').length).toEqual(1)
})
it('should find the fire gitmoji by description', () => {
const wrapper = renderer.create(<GitmojiList {...stubs.props} />)
const instance = wrapper.root
const query = 'remove'
renderer.act(() => {
instance
.findByType('input')
.props.onChange({ target: { value: query } })
})
expect(instance.findAllByType('article').length).toEqual(1)
})
})

Thanks! 🙏🏼

Copy link
Owner

@carloscuesta carloscuesta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks 🚀

@carloscuesta carloscuesta enabled auto-merge (squash) October 27, 2022 20:45
@carloscuesta carloscuesta merged commit 4acf6d4 into carloscuesta:master Oct 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants