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(character-count, field-help): convert enzyme tests to RTL #6941

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

tomdavies73
Copy link
Contributor

@tomdavies73 tomdavies73 commented Sep 9, 2024

Proposed behaviour

  • CharacterCount: Converts current enzyme tests to RTL.
  • FieldHelp: Removes all enzyme tests, due to all tests being styling tests and there being sufficient test alternatives (Chromatic & Playwright)

Current behaviour

Currently, all tests are written in enzyme for both CharacterCount & FieldHelp.

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

@tomdavies73 tomdavies73 changed the title refactor(character-count): convert enzyme tests to RTL refactor(character-count, field-help): convert enzyme tests to RTL Sep 9, 2024
@tomdavies73 tomdavies73 marked this pull request as draft September 9, 2024 13:26
expect(visuallyHiddenHint).toHaveTextContent("5 characters too many");
});

test("visually hidden character counter is visually hidden", () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (non-blocking): both this test and the other one for visually hidden styles could perhaps be removed, as Chromatic should surely catch it if we accidentally make it visible?

@tomdavies73 tomdavies73 marked this pull request as ready for review September 11, 2024 09:26
@tomdavies73 tomdavies73 merged commit 1620297 into master Sep 11, 2024
24 checks passed
@tomdavies73 tomdavies73 deleted the FE-6787 branch September 11, 2024 09:37
@carbonci
Copy link
Collaborator

🎉 This PR is included in version 142.9.1 🎉

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