Skip to content

Conversation

@krigubir
Copy link
Contributor

Azure DevOps links

User story

  • AB#USER_STORY_ID

Tasks

  • AB#TASK_ID

  • Needs to be tested locally by reviewer

Description

  • This PR fixes/adds ...

Test steps

  1. Navigate to <url>
  2. ...

Copilot AI review requested due to automatic review settings November 25, 2025 13:45
Copy link
Contributor

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 migrates test coverage from standalone .test.tsx files to Storybook stories with play functions, enabling visual testing and interaction testing within Storybook.

Key Changes:

  • Removal of traditional unit test files (.test.tsx)
  • Addition of test-only stories with play functions in .stories.tsx files
  • Migration from @testing-library patterns to Storybook's userEvent and within utilities

Reviewed changes

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

Show a summary per file
File Description
src/molecules/Waves/Waves.stories.tsx Added test stories for SVG rendering, gradient colors, and viewBox
src/molecules/Toast/Toast.stories.tsx Added test story for negative duration validation
src/molecules/TextField/TextField.stories.tsx Added imports but missing test stories despite test file deletion
src/molecules/Tabs/Tabs.stories.tsx Added test stories for tab interactions, icons, and counts
src/molecules/SelectionControls/*/stories.tsx Added test stories for label rendering and checked states
src/molecules/RichTextEditor/RichTextEditor.stories.tsx Added comprehensive test stories for MenuBar feature visibility
src/molecules/ProfileAvatar/ProfileAvatar.stories.tsx Added test stories for fallback icons, images, and initials
src/molecules/InfoElement/*.stories.tsx Added test stories for content rendering and copyable functionality
src/molecules/FileProgress/FileProgress.stories.tsx Added extensive test stories for loading, error, and complete states
src/molecules/DatePicker/DatePicker.stories.tsx Added test stories for format, locale, and loading states
src/molecules/Chip/Chip.stories.tsx Added test stories for interactions, events, and disabled state
src/molecules/Button/Button.stories.tsx Added test stories for loading state preventing clicks
src/molecules/ApplicationIcon/*.stories.tsx Added test stories for icon rendering and fallback behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

warning_filled,
} from '@equinor/eds-icons';
import { Meta, StoryFn } from '@storybook/react-vite';
import { Meta, StoryFn, StoryObj } from '@storybook/react-vite';
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

Unused import StoryObj.

Copilot uses AI. Check for mistakes.
import page from 'src/molecules/TextField/TextField.docs.mdx';
import { Stack } from 'src/storybook';

import { expect, within } from 'storybook/test';
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

Unused imports expect, within.

Copilot uses AI. Check for mistakes.
import { TopBar } from 'src/organisms/TopBar';
import { ThemeProvider } from 'src/providers';

import { expect, within } from 'storybook/test';
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

Unused import within.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Coverage Report

Status Category Percentage Covered / Total
🔴 Lines 98.71% (🎯 100%) 16090 / 16300
🔴 Statements 98.71% (🎯 100%) 16090 / 16300
🔴 Functions 97.77% (🎯 100%) 1142 / 1168
🔴 Branches 99.33% (🎯 100%) 3901 / 3927
File CoverageNo changed files found.
Generated in workflow #1953 for commit 8c3898e by the Vitest Coverage Report Action

Copilot AI review requested due to automatic review settings November 26, 2025 04:58
Copy link
Contributor

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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

import { Meta, StoryFn } from '@storybook/react-vite';
import { Meta, StoryFn, StoryObj } from '@storybook/react-vite';
import { expect, within } from 'storybook/test';
import { vi } from 'vitest';
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

Missing import for vi from vitest. The vi object is used on line 82 (vi.spyOn) and line 535 (vi.fn()), but it's not imported. This will cause a reference error at runtime.

Copilot uses AI. Check for mistakes.
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.

3 participants