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

test(typeahead-select): Add tests #163

Merged
merged 3 commits into from
Mar 11, 2022

Conversation

yasincaliskan
Copy link
Contributor

  • I'm not sure if we can add tests for dropdown-related components. I'm open to your suggestions.

Copy link
Contributor

@edizcelik edizcelik left a comment

Choose a reason for hiding this comment

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

I guess we should have tests that checks the following scenarios:

Scenario 1:

  • Render TypeaheadSelect with 3 dropdown options. Initially there shouldn't be any selected option and TypeaheadSelect should allow selection of only one option.
  • Click/focus on the TypeaheadSelect and see if the dropdown menu is opened.
  • Click/focus on the second item in the dropdown menu. See if the dropdown is closed and the selected option is displayed correctly.

Scenario 2:

  • Render TypeaheadSelect with 3 dropdown options. Initially there shouldn't be any selected option and TypeaheadSelect should allow selection of only one option.
  • Click/focus on the TypeaheadSelect and see if the dropdown menu is opened.
  • Type second-dropdown into the input to filter dropdown options. Check if the dropdown option with title second-dropdown-option is visible on the dropdown menu.
  • Focus on that item, and then select it. See if the dropdown is closed and the selected option is displayed correctly.

Scenario 3:

  • Render TypeaheadSelect with 3 dropdown options. Initially there shouldn't be any selected option and TypeaheadSelect should allow selection of more than one option.
  • Click/focus on the TypeaheadSelect and see if the dropdown menu is opened.
  • Click/focus on the second item in the dropdown menu. See if the dropdown is still open and the selected option is displayed correctly. See if the second item is not displayed in the dropdown menu anymore.
  • Click/focus on another dropdown option. See if the tag for it is added as it should now be selected.

@yasincaliskan yasincaliskan changed the title feat(typeahead-select): Add tests test(typeahead-select): Add tests Jan 13, 2022
@mucahit mucahit added Ready for new release PR is reviewed and ready to be merged and removed ready for review labels Feb 24, 2022
@mucahit mucahit merged commit 3511ff8 into next-release Mar 11, 2022
@mucahit mucahit deleted the feat/add-typeahead-select-tests branch March 11, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for new release PR is reviewed and ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants