Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test: Adopt jest testing in ui-composer #35932

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

Merged
merged 3 commits into from
May 7, 2025

Conversation

dougfabris
Copy link
Member

@dougfabris dougfabris commented May 6, 2025

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

CORE-1137


This pull request refactors the MessageComposerInput component in the RocketChat/Rocket.Chat repository by using margin instead of padding. It introduces several updates and additions to the ui-composer package:

  1. Storybook Configuration: An accessibility addon is added to the Storybook configuration to enhance component accessibility testing.

  2. Jest Configuration: A new Jest configuration file is added, including preset and module mappings to facilitate testing.

  3. Testing Enhancements:

    • New test cases are introduced for the MessageComposer, MessageComposerHint, and MessageFooterCallout components, focusing on rendering and accessibility checks.
    • Jest snapshot tests are added for MessageComposer, MessageComposerHint, and MessageFooterCallout components to ensure UI consistency and detect unintended rendering changes.
  4. Story Title Updates:

    • The story title path for the MessageComposerHint component is updated.
    • The story title for MessageFooterCallout is changed from 'Components/MessageComposer/Locked' to 'Components/MessageComposerCallout' to better reflect the component's purpose.
  5. Type Definition and Property Adjustment: The MessageComposerInput.tsx file is updated to simplify type definitions and adjust the padding property.

These changes aim to improve the maintainability and accessibility of the ui-composer components while ensuring consistent UI behavior through comprehensive testing.

Copy link
Contributor

dionisio-bot bot commented May 6, 2025

Looks like this PR is ready to merge! πŸŽ‰
If you have any trouble, please check the PR guidelines

Copy link

kodus-ai bot commented May 6, 2025

Code Review Completed! πŸ”₯

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a πŸ‘ for helpful suggestions or a πŸ‘Ž if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security βœ…
Code Style βœ…
Kody Rules βœ…
Refactoring βœ…
Error Handling βœ…
Maintainability βœ…
Potential Issues βœ…
Documentation And Comments βœ…
Performance And Optimization βœ…
Breaking Changes ❌

Access your configuration settings here.

​

Copy link
Contributor

github-actions bot commented May 6, 2025

PR Preview Action v1.6.1

πŸš€ View preview at
https://RocketChat.github.io/Rocket.Chat/pr-preview/pr-35932/

Built to branch gh-pages at 2025-05-07 13:23 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@dougfabris dougfabris changed the title refactor: MessageComposerInput using margin instead of padding refactor: Adopt jest testing in ui-composer pkg May 6, 2025
@dougfabris dougfabris added this to the 7.7.0 milestone May 6, 2025
@dougfabris dougfabris force-pushed the refactor/message-composer-input branch from a85ebb2 to ee06249 Compare May 6, 2025 15:51
Copy link

changeset-bot bot commented May 6, 2025

⚠️ No Changeset found

Latest commit: c133382

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dougfabris dougfabris changed the title refactor: Adopt jest testing in ui-composer pkg refactor: Adopt jest testing in ui-composer May 6, 2025
Copy link

kodus-ai bot commented May 6, 2025

Kody Review Complete

Great news! πŸŽ‰
No issues were found that match your current review configurations.

Keep up the excellent work! πŸš€

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a πŸ‘ for helpful suggestions or a πŸ‘Ž if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security βœ…
Code Style βœ…
Kody Rules βœ…
Refactoring βœ…
Error Handling βœ…
Maintainability βœ…
Potential Issues βœ…
Documentation And Comments βœ…
Performance And Optimization βœ…
Breaking Changes ❌

Access your configuration settings here.

​

Copy link

codecov bot commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 61.34%. Comparing base (9b0d87a) to head (c133382).
Report is 12 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #35932      +/-   ##
===========================================
+ Coverage    61.29%   61.34%   +0.04%     
===========================================
  Files         3164     3184      +20     
  Lines        74796    74930     +134     
  Branches     16693    16698       +5     
===========================================
+ Hits         45847    45966     +119     
- Misses       25849    25859      +10     
- Partials      3100     3105       +5     
Flag Coverage Ξ”
e2e 58.07% <ΓΈ> (-0.02%) ⬇️
unit 75.22% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • πŸ“¦ JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dougfabris dougfabris force-pushed the refactor/message-composer-input branch from ee06249 to 95e1fe7 Compare May 6, 2025 16:45
@dougfabris dougfabris changed the title refactor: Adopt jest testing in ui-composer test: Adopt jest testing in ui-composer May 6, 2025
Copy link

kodus-ai bot commented May 6, 2025

Code Review Completed! πŸ”₯

The code review was successfully completed based on your current configurations.

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a πŸ‘ for helpful suggestions or a πŸ‘Ž if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security βœ…
Code Style βœ…
Kody Rules βœ…
Refactoring βœ…
Error Handling βœ…
Maintainability βœ…
Potential Issues βœ…
Documentation And Comments βœ…
Performance And Optimization βœ…
Breaking Changes ❌

Access your configuration settings here.

​

Copy link

kodus-ai bot commented May 6, 2025

Kody Review Complete

Great news! πŸŽ‰
No issues were found that match your current review configurations.

Keep up the excellent work! πŸš€

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a πŸ‘ for helpful suggestions or a πŸ‘Ž if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security βœ…
Code Style βœ…
Kody Rules βœ…
Refactoring βœ…
Error Handling βœ…
Maintainability βœ…
Potential Issues βœ…
Documentation And Comments βœ…
Performance And Optimization βœ…
Breaking Changes ❌

Access your configuration settings here.

​

@dougfabris dougfabris force-pushed the refactor/message-composer-input branch from e06f0e2 to 977dd8a Compare May 6, 2025 18:42
Copy link

kodus-ai bot commented May 6, 2025

Kody Review Complete

Great news! πŸŽ‰
No issues were found that match your current review configurations.

Keep up the excellent work! πŸš€

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a πŸ‘ for helpful suggestions or a πŸ‘Ž if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security βœ…
Code Style βœ…
Kody Rules βœ…
Refactoring βœ…
Error Handling βœ…
Maintainability βœ…
Potential Issues βœ…
Documentation And Comments βœ…
Performance And Optimization βœ…
Breaking Changes ❌

Access your configuration settings here.

​

@dougfabris dougfabris marked this pull request as ready for review May 7, 2025 13:06
Copy link

kodus-ai bot commented May 7, 2025

Kody Review Complete

Great news! πŸŽ‰
No issues were found that match your current review configurations.

Keep up the excellent work! πŸš€

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a πŸ‘ for helpful suggestions or a πŸ‘Ž if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security βœ…
Code Style βœ…
Kody Rules βœ…
Refactoring βœ…
Error Handling βœ…
Maintainability βœ…
Potential Issues βœ…
Documentation And Comments βœ…
Performance And Optimization βœ…
Breaking Changes ❌

Access your configuration settings here.

​

@dougfabris dougfabris force-pushed the refactor/message-composer-input branch from cc789eb to c133382 Compare May 7, 2025 13:18
Copy link

kodus-ai bot commented May 7, 2025

Kody Review Complete

Great news! πŸŽ‰
No issues were found that match your current review configurations.

Keep up the excellent work! πŸš€

Kody Guide: Usage and Configuration
Interacting with Kody
  • Request a Review: Ask Kody to review your PR manually by adding a comment with the @kody start-review command at the root of your PR.

  • Provide Feedback: Help Kody learn and improve by reacting to its comments with a πŸ‘ for helpful suggestions or a πŸ‘Ž if improvements are needed.

Current Kody Configuration
Review Options

The following review options are enabled or disabled:

Options Enabled
Security βœ…
Code Style βœ…
Kody Rules βœ…
Refactoring βœ…
Error Handling βœ…
Maintainability βœ…
Potential Issues βœ…
Documentation And Comments βœ…
Performance And Optimization βœ…
Breaking Changes ❌

Access your configuration settings here.

​

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label May 7, 2025
@ggazzo ggazzo merged commit 6145b89 into develop May 7, 2025
48 checks passed
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label May 7, 2025
@ggazzo ggazzo deleted the refactor/message-composer-input branch May 7, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants