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

chore: introduce tests for ManageService component #8039

Merged
merged 13 commits into from Jun 17, 2021

Conversation

benbrown
Copy link
Contributor

@benbrown benbrown commented Jun 9, 2021

Description

Adds a suite of unit test cases for the base ManageService component (which is in turn used to create the ManageLuis, ManageQNA and ManageSpeech components)

Tests so far:

  • Test that the component renders with the correctly customized ui text
  • Test that the "select an existing resource" path works as expected
  • Test that the "Create a new resource" path works as expected
  • Test that the "Create a new resource" path works when a tier selection is provided
  • Test that the cancel button calls the right callback
  • Tests that the data is sent back to the calling component when user has completed session
  • Test that the "createService" prop is called (this is where the other components inject their specific details)

This involved creating simple mocks for a variety of Azure ARM APIs.

Still to come:

  • test ManageLuis directly
  • test ManageSpeech directly
  • test ManageQNA directly (hardest)

Task Item

Fixes #7902

@coveralls
Copy link

coveralls commented Jun 9, 2021

Coverage Status

Coverage increased (+0.7%) to 51.189% when pulling d97e541 on benbrown/manageservicetests into 5d443a4 on main.

@pavolum
Copy link
Contributor

pavolum commented Jun 15, 2021

Component tests are generally in client/__tests__/components and in this PR they are siblings of the tested components dir

@benbrown benbrown merged commit 19f8137 into main Jun 17, 2021
@benbrown benbrown deleted the benbrown/manageservicetests branch June 17, 2021 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test coverage: /Manage*
4 participants