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 tests for KModal #320

Merged
merged 3 commits into from
Mar 4, 2022
Merged

Conversation

sairina
Copy link
Contributor

@sairina sairina commented Mar 3, 2022

Description

  1. Adds tests for KModal
  2. Changes the way the error message (for accessibility) is handled by moving that responsibility to the parent
  3. Adds the 4 tests completed to the changelog.md

Issue addressed

Fixes #305

Steps to test

  1. Run yarn run test in the terminal

(optional) Implementation notes

Does this introduce any tech-debt items?

No

Testing checklist

  • Contributor has fully tested the PR manually
  • Critical and brittle code paths are covered by unit tests
  • The change has been added to the changelog

Reviewer guidance

  • Is the code clean and well-commented?
  • Are there tests for this change?
  • Are all UI components LTR and RTL compliant (if applicable)?
  • Add other things to check for here

Post-merge updates and tracking

  • Learning Platform update PR is submitted
  • Learning Platform update PR is merged
  • Studio update PR is submitted
  • Studio update PR is merged
  • Data Portal update PR is submitted
  • Data Portal update PR is merged

Comments

@sairina sairina requested review from nucleogenesis and MisRob March 3, 2022 22:00
Copy link
Member

@nucleogenesis nucleogenesis left a comment

Choose a reason for hiding this comment

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

Tests look good!

},
listeners: { cancel: onClick },
});
expect(wrapper.findComponent({ name: 'KButton' }).props().text).toEqual(cancelText);
Copy link
Member

Choose a reason for hiding this comment

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

Never again will I import the component now that I know I can pass an object with the name property!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

YES! I learned that, I think, from reading someone else's test, and 🤯 .

@rtibbles rtibbles merged commit 2c4a556 into learningequality:main Mar 4, 2022
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.

Write unit tests for KModal
3 participants