Skip to content

Conversation

GrabowskiM
Copy link
Contributor

🎫 Issue IBX-10693

Description:

For QA:

Documentation:

@GrabowskiM GrabowskiM requested review from a team and Copilot September 24, 2025 11:29
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds test coverage for AltRadio components by implementing Storybook test stories that verify component behavior and user interactions.

  • Creates comprehensive test coverage for AltRadiosListField and updates tests for AltRadioInput
  • Implements interactive test scenarios using Storybook's play functions with user event simulation
  • Tests radio button selection behavior, event handling, and state changes

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
AltRadiosListField.test.stories.tsx Adds new test story covering radio list selection behavior and change events
AltRadioInput.test.stories.tsx Updates existing test story with improved step descriptions and additional assertions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

await step('Click second item', async () => {
await userEvent.click(input2);

await expect(args.onChange).toHaveBeenCalledTimes(2); // eslint-disable-line no-magic-numbers
Copy link
Preview

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The magic number 2 should be extracted to a descriptive constant like EXPECTED_CALL_COUNT to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.

await step('Click second item once more', async () => {
await userEvent.click(input2);

await expect(args.onChange).toHaveBeenCalledTimes(2); // eslint-disable-line no-magic-numbers
Copy link
Preview

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

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

The magic number 2 should be extracted to a descriptive constant like EXPECTED_CALL_COUNT to improve code readability and maintainability.

Copilot uses AI. Check for mistakes.

@ezrobot ezrobot requested review from tischsoic, dew326, OstafinL, RopRaptor and albozek and removed request for a team September 24, 2025 11:51
@dew326 dew326 merged commit 10aa864 into main Oct 1, 2025
11 of 12 checks passed
@dew326 dew326 deleted the IBX-10693-altradio-tests branch October 1, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants