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

refactor(popover): rewrite jest tests to use RTL #6946

Merged
merged 2 commits into from
Sep 16, 2024
Merged

Conversation

Parsium
Copy link
Contributor

@Parsium Parsium commented Sep 11, 2024

Proposed behaviour

  • Rewrite tests for Popover using React Testing Library (RTL)

Current behaviour

  • Tests for Popover are currently use Enzyme

Checklist

  • Commits follow our style guide
  • Related issues linked in commit messages if required
  • Screenshots are included in the PR if useful
  • All themes are supported if required
  • Unit tests added or updated if required
  • Playwright automation tests added or updated if required
  • Storybook added or updated if required
  • Translations added or updated (including creating or amending translation keys table in storybook) if required
  • Typescript d.ts file added or updated if required
  • Related docs have been updated if required

QA

  • Tested in provided StackBlitz sandbox/Storybook
  • Add new Playwright test coverage if required
  • Carbon implementation matches Design System/designs
  • UI Tests GitHub check reviewed if required

Additional context

Testing instructions

Copy link
Contributor

@robinzigmond robinzigmond left a comment

Choose a reason for hiding this comment

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

praise: well done for completely rewriting the existing test suite - it's now doing a much better job of testing the component's behaviour rather than implementation details 👏

src/__internal__/popover/popover.style.ts Outdated Show resolved Hide resolved
src/__internal__/popover/popover.component.tsx Outdated Show resolved Hide resolved
src/__internal__/popover/popover.component.tsx Outdated Show resolved Hide resolved
src/__internal__/popover/popover.component.tsx Outdated Show resolved Hide resolved
src/__internal__/popover/popover.component.tsx Outdated Show resolved Hide resolved
src/__internal__/popover/popover.test.tsx Show resolved Hide resolved
src/__internal__/popover/popover.test.tsx Outdated Show resolved Hide resolved
@Parsium Parsium changed the title refactor(popover): rewrite enzyme tests in RTL refactor(popover): rewrite jest tests to use RTL Sep 13, 2024
@Parsium Parsium force-pushed the FE-6789/popover-rtl branch 3 times, most recently from 9fb7a67 to fcbbaf6 Compare September 13, 2024 13:21
robinzigmond
robinzigmond previously approved these changes Sep 16, 2024
@Parsium Parsium marked this pull request as ready for review September 16, 2024 15:13
@Parsium Parsium requested a review from a team as a code owner September 16, 2024 15:13
@Parsium Parsium merged commit 7f70c4e into master Sep 16, 2024
24 checks passed
@Parsium Parsium deleted the FE-6789/popover-rtl branch September 16, 2024 15:24
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 142.11.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants