Skip to content

All test cases #4385

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 10 commits into from
Jun 17, 2025
Merged

All test cases #4385

merged 10 commits into from
Jun 17, 2025

Conversation

Saveli0S
Copy link
Contributor

@Saveli0S Saveli0S commented Jun 5, 2025

PR Checklist

  • Have you verified that the PR is pointing to the correct target branch? (develop for features/bugfixes, other if mentioned in the task)
  • Have you verified that your branch is consistent with the target branch and has no conflicts? (if not, make a rebase under the target branch)
  • Have you checked that everything works within the branch according to the task description and tested it locally?
  • Have you run the linter (npm run lint) prior to submission? Enable the git hook on commit in your IDE to run it and format the code automatically.
  • Have you run the tests locally and added/updated them if needed?
  • Have you checked that app can be built (npm run build)?
  • Have you checked that no new circular dependencies appreared with your changes? (the webpack plugin reports circular dependencies within the dev npm script)
  • Have you made sure that all the necessary pipelines has been successfully completed?
  • If the task requires translations to be updated, have you done this by running the manage:translations script?
  • Have you added the link to the PR in the Jira ticket comments?

Visuals

image

Summary by CodeRabbit

  • New Features
    • Introduced a comprehensive Test Case List with sorting, filtering, search, and pagination capabilities.
    • Added visual priority indicators and contextual menus for test case actions.
    • Implemented a dedicated page for viewing and managing all test cases.
    • Enhanced tag management with clear messages when no tags are present.
  • Improvements
    • Expanded internationalization support with new localized messages.
    • Improved dropdown styling options for better UI flexibility.
  • Bug Fixes
    • Ensured tag lists display a message when empty, improving clarity.
  • Chores
    • Updated dependencies and asset type declarations for better compatibility.
    • Adjusted .gitignore to exclude additional files.

@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.73%. Comparing base (82b574c) to head (0435262).

Additional details and impacted files
@@                  Coverage Diff                  @@
##           feature/test-library    #4385   +/-   ##
=====================================================
  Coverage                 66.73%   66.73%           
=====================================================
  Files                        85       85           
  Lines                       995      995           
  Branches                    142      142           
=====================================================
  Hits                        664      664           
  Misses                      300      300           
  Partials                     31       31           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@Saveli0S Saveli0S requested review from OleksandrDragun and Guria June 6, 2025 08:11
Copy link
Contributor

@Guria Guria left a comment

Choose a reason for hiding this comment

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

Important changes about how derived data should be used required.

Copy link
Contributor

@Guria Guria left a comment

Choose a reason for hiding this comment

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

Great. Now only minor nitpicks and questions left

Copy link

coderabbitai bot commented Jun 9, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

A comprehensive test case list feature was introduced, including new React components, TypeScript types, SCSS styles, constants, and mock data for test case management. Enhancements include improved dropdown styling, tag list empty state handling, asset type declarations, and updated internationalization messages. Pagination, filtering, and search functionalities are integrated, with supporting hooks and UI logic.

Changes

File(s) Change Summary
.gitignore Added .cursor to ignored files.
app/package.json Updated @reportportal/ui-kit dependency version.
app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.{jsx,scss} Added hideArrow and boldValue props with corresponding styles.
app/src/components/testCaseList/* (index.ts, messages.ts, mockData.ts, types.ts, constants.ts) Introduced test case list barrel, i18n messages, mock data, types, and constants.
app/src/components/testCaseList/priorityIcon/* Added PriorityIcon component, SCSS, and index export.
app/src/components/testCaseList/testCaseNameCell/* Added TestCaseNameCell component, SCSS, and index export.
app/src/components/testCaseList/testCaseExecutionCell/* Added TestCaseExecutionCell component, SCSS, and index export.
app/src/components/testCaseList/testCaseList.{tsx,scss} Added main TestCaseList component and its styles.
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/messages.js Added noTagsAdded i18n message.
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.{jsx,scss} Added empty state logic and styles for tag list.
app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts Added useTestCases hook for test case state and filtering.
app/src/pages/inside/testCaseLibraryPage/messages.js Added pagination and UI i18n messages.
app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.jsx Removed unused React import.
app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/allTestCasesPage.{tsx,scss}, index.ts Added paginated test case page component, styles, and index export.
app/src/pages/inside/testCaseLibraryPage/expandedOptions/expandedOptions.{tsx,scss} Integrated dynamic test case list and empty state logic; set min-width style.
app/src/types/global.d.ts Added TypeScript declarations for SVG, SCSS, CSS, and image imports.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AllTestCasesPage
    participant useTestCases
    participant TestCaseList
    participant Pagination

    User->>AllTestCasesPage: Interacts (search, paginate)
    AllTestCasesPage->>useTestCases: Get filtered test cases
    useTestCases-->>AllTestCasesPage: Returns filtered data, loading state
    AllTestCasesPage->>TestCaseList: Render test case list with props
    TestCaseList->>TestCaseNameCell: Render test case name, status, tags
    TestCaseList->>TestCaseExecutionCell: Render last execution, actions
    AllTestCasesPage->>Pagination: Render pagination controls
    User->>Pagination: Changes page/size
    Pagination-->>AllTestCasesPage: Triggers page/size update
Loading

Suggested reviewers

  • KrDior
  • AmsterGet
  • maria-hambardzumian
  • BlazarQSO

Poem

In fields of code where test cases grow,
New lists and icons now proudly show.
With tags and priorities, bold and bright,
Pagination hopping left and right.
If no tags are found, don’t feel blue—
The rabbit’s here to guide you through!
🐇✨

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch all-test-cases
  • Post Copyable Unit Tests in Comment

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Guria
Copy link
Contributor

Guria commented Jun 9, 2025

@coderabbitai full review

Copy link

coderabbitai bot commented Jun 9, 2025

✅ Actions performed

Full review triggered.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🔭 Outside diff range comments (1)
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.jsx (1)

53-53: ⚠️ Potential issue

Remove console statement to fix ESLint warning.

The pipeline failure indicates an ESLint warning for the console.error statement. Consider using a proper logging mechanism or removing the console statement entirely.

-      console.error(`Element with ID not found.`);
+      // Element not found - this should not happen in normal operation
🧰 Tools
🪛 GitHub Actions: Build

[warning] 53-53: Unexpected console statement (no-console).

♻️ Duplicate comments (2)
app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.tsx (1)

44-48: LGTM! Props interface addresses previous coupling concerns.

The component now accepts only the specific props it needs (status, name, tags) rather than the full TestCase object, which addresses the previous review feedback about avoiding coupling with the domain type.

app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.tsx (1)

42-49: Consider memoizing the component.

Based on the past review comment about memoization, consider wrapping this component with React.memo to prevent unnecessary re-renders, especially since it receives several callback props.

+import { useState, useCallback, memo } from 'react';

-export const TestCaseDetailsPage = ({
+export const TestCaseDetailsPage = memo(({
   testCases,
   loading,
   searchValue,
   setSearchValue,
   deleteTestCase,
   duplicateTestCase,
-}: TestCaseDetailsPageProps) => {
+}: TestCaseDetailsPageProps) => {
   // ... component implementation
-};
+});
🧹 Nitpick comments (16)
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.scss (1)

90-95: Scope no-tags message under BEM
To avoid global class leakage, nest .no-tags-message inside the .tag-list--no-tags block:

 .tag-list {
   &--no-tags {
     padding-left: 0;
     height: auto;

+    .no-tags-message {
+      font-size: 11px;
+      line-height: 16px;
+      font-weight: 400;
+      color: var(--rp-ui-base-e-400);
+    }
   }
 }
app/.eslintrc (1)

106-116: Verify if rule duplication is necessary.

These TypeScript-specific rules (import/prefer-default-export and import/extensions) duplicate the existing base rules (lines 37 and 68-77). While explicit overrides can be intentional for TypeScript files, consider if this duplication is necessary or if the base rules would suffice.

app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.scss (1)

27-30: Unify theming variables for consistency.

This block mixes an SCSS variable ($COLOR--bg-100) and a CSS custom property (var(--rp-ui-base-e-100)). Confirm that $COLOR--bg-100 is defined in your theme imports or replace it with the corresponding CSS variable to keep theming consistent:

.pagination {
  background: var(--rp-ui-bg-100); // if available
  border-top: 1px solid var(--rp-ui-base-e-100);
  /* ... */
}
app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.scss (1)

40-43: Scope your SVG selector for clarity.

The nested svg will compile to .test-case-library-page__breadcrumb svg. To make the intent clearer alongside &-icon, nest like this:

   &__breadcrumb {
-    &-icon,
-    svg {
+    &-icon,
+    & svg {
       height: 16px;
     }
   }
app/localization/translated/zh.json (1)

1332-1339: Consider fullwidth punctuation and ellipsis for Chinese text
To adhere to Chinese typography conventions, replace ASCII parentheses and three-dot ellipsis with fullwidth characters. For example:

- "TestCaseLibraryPage.copySuffix": "(副本)",
+ "TestCaseLibraryPage.copySuffix": "(副本)",

- "TestCaseList.loadingMessage": "正在加载测试用例...",
+ "TestCaseList.loadingMessage": "正在加载测试用例……"
app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts (1)

76-87: Consider removing unnecessary exposure of raw testCases.

The testCases array is exposed but consumers likely only need filteredTestCases. This reduces the API surface and prevents misuse.

return {
- testCases,
  filteredTestCases,
  loading,
  hasTestCases,
  searchValue,
  setSearchValue,
  deleteTestCase,
  duplicateTestCase,
  updateTestCase,
};
app/src/components/testCaseList/types.ts (2)

17-17: Consider renaming TestCaseStatus for clarity.

The values 'low', 'normal', 'high' suggest priority levels rather than execution status. Consider renaming to TestCasePriority or updating values to actual status terms.

-export type TestCaseStatus = 'low' | 'normal' | 'high';
+export type TestCasePriority = 'low' | 'normal' | 'high';

Or if this represents execution status:

-export type TestCaseStatus = 'low' | 'normal' | 'high';
+export type TestCaseStatus = 'passed' | 'failed' | 'skipped' | 'pending';

19-25: Consider type consistency for better maintainability.

The mixed string | number type for id could lead to inconsistencies. Also, lastExecution as string might benefit from more specific typing.

export interface TestCase {
- id: string | number;
+ id: string;
  name: string;
  status: TestCaseStatus;
  tags: string[];
- lastExecution: string;
+ lastExecution: string | Date; // or just Date if always a date
}
app/localization/translated/es.json (2)

1328-1329: Consider unifying “noTagsAdded” phrasing
The message "No se agregaron etiquetas" is accurate, but other “no-results” entries consistently use “No hay…”. For stylistic consistency, you might prefer:

- "LinkedTestCasesTab.noTagsAdded": "No se agregaron etiquetas",
+ "LinkedTestCasesTab.noTagsAdded": "No hay etiquetas agregadas",

1330-1341: Verify casing in copy suffix and TestCaseList entries
All TestCaseList messages read clearly. One minor style tweak: in TestCaseLibraryPage.copySuffix, consider lower-casing the suffix to "(copia)" to align with typical Spanish UI conventions:

- "TestCaseLibraryPage.copySuffix": "(Copia)",
+ "TestCaseLibraryPage.copySuffix": "(copia)",
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.tsx (3)

58-60: Complete the edit handler implementation.

The handleEdit function is currently empty and needs implementation to provide edit functionality for test cases.

Would you like me to help implement the edit handler or create an issue to track this TODO item?


79-81: Complete the move handler implementation.

The handleMove function is currently empty and needs implementation to provide move functionality for test cases.

Would you like me to help implement the move handler or create an issue to track this TODO item?


91-94: Apply consistent useCallback usage.

The changePageSize function should use useCallback for consistency with other event handlers in this component, especially since it's passed as a prop to the Pagination component.

Apply this change for consistency:

-  const changePageSize = (size: number) => {
-    setPageSize(size);
-    setActivePage(DEFAULT_CURRENT_PAGE);
-  };
+  const changePageSize = useCallback((size: number) => {
+    setPageSize(size);
+    setActivePage(DEFAULT_CURRENT_PAGE);
+  }, []);
app/src/components/testCaseList/testCaseList.tsx (1)

32-43: Consider making itemsPerPage optional with a default value.

The itemsPerPage prop is required but could be optional with a default value for better component usability.

interface TestCaseListProps {
  testCases?: TestCase[];
  loading?: boolean;
  currentPage?: number;
-  itemsPerPage: number;
+  itemsPerPage?: number;
  searchValue?: string;
  onSearchChange?: (value: string) => void;
  onEdit?: (testCase: TestCase) => void;
  onDelete?: (testCase: TestCase) => void;
  onDuplicate?: (testCase: TestCase) => void;
  onMove?: (testCase: TestCase) => void;
}

And add a default value in the component:

export const TestCaseList = memo(
  ({
    testCases = mockTestCases,
    loading = false,
    currentPage = DEFAULT_CURRENT_PAGE,
-    itemsPerPage,
+    itemsPerPage = DEFAULT_ITEMS_PER_PAGE,
    searchValue = '',
app/src/components/testCaseList/mockData.ts (2)

24-33: Fix truncated tag names in mock data.

Several tag names appear to be truncated or incomplete, which could affect UI testing and development experience.

Apply these fixes for more realistic mock data:

    tags: [
      'sso system',
      'user interface improvements',
-      'battery usage analysis for a',
-      'cross-platform app speed t',
+      'battery usage analysis',
+      'cross-platform app speed test',
      'ui',
      'performance test',
      'security check',
      'user flow',
    ],

19-308: Consider reducing mock data size for better performance.

The mock array contains 35 items which might be excessive for development and testing. Consider reducing to 10-15 representative items for better performance during development.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d50dfe7 and e2ecbf5.

⛔ Files ignored due to path filters (2)
  • app/package-lock.json is excluded by !**/package-lock.json
  • app/src/common/img/newIcons/priority-inline.svg is excluded by !**/*.svg
📒 Files selected for processing (33)
  • .gitignore (1 hunks)
  • app/.eslintrc (1 hunks)
  • app/localization/translated/be.json (1 hunks)
  • app/localization/translated/es.json (1 hunks)
  • app/localization/translated/ru.json (1 hunks)
  • app/localization/translated/uk.json (1 hunks)
  • app/localization/translated/zh.json (1 hunks)
  • app/package.json (1 hunks)
  • app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.jsx (4 hunks)
  • app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.scss (2 hunks)
  • app/src/components/testCaseList/index.ts (1 hunks)
  • app/src/components/testCaseList/messages.ts (1 hunks)
  • app/src/components/testCaseList/mockData.ts (1 hunks)
  • app/src/components/testCaseList/testCaseCell.scss (1 hunks)
  • app/src/components/testCaseList/testCaseExecutionCell/index.ts (1 hunks)
  • app/src/components/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx (1 hunks)
  • app/src/components/testCaseList/testCaseList.constants.ts (1 hunks)
  • app/src/components/testCaseList/testCaseList.scss (1 hunks)
  • app/src/components/testCaseList/testCaseList.tsx (1 hunks)
  • app/src/components/testCaseList/testCaseNameCell/index.ts (1 hunks)
  • app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.tsx (1 hunks)
  • app/src/components/testCaseList/types.ts (1 hunks)
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/messages.js (1 hunks)
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.jsx (1 hunks)
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.scss (2 hunks)
  • app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/messages.js (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.jsx (3 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.scss (1 hunks)
  • app/src/types/global.d.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.jsx (2)
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/mockData.jsx (2)
  • tags (27-38)
  • cx (25-25)
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/messages.js (2)
  • messages (19-28)
  • messages (19-28)
app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts (2)
app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.jsx (1)
  • useTestCases (36-44)
app/src/components/testCaseList/types.ts (1)
  • TestCase (19-25)
app/src/components/testCaseList/mockData.ts (2)
app/src/components/testCaseList/index.ts (4)
  • mockTestCases (18-18)
  • STATUS_TYPES (18-18)
  • ITEMS_PER_PAGE_OPTIONS (18-18)
  • FILTER_OPTIONS (18-18)
app/src/components/testCaseList/types.ts (2)
  • TestCase (19-25)
  • FilterOption (27-30)
app/src/components/testCaseList/testCaseList.tsx (7)
app/src/components/fields/searchField/searchField.jsx (3)
  • cx (24-24)
  • SearchField (26-90)
  • SearchField (26-90)
app/src/components/testCaseList/types.ts (1)
  • TestCase (19-25)
app/src/components/testCaseList/mockData.ts (1)
  • mockTestCases (19-308)
app/src/components/testCaseList/testCaseList.constants.ts (1)
  • DEFAULT_CURRENT_PAGE (19-19)
app/src/components/testCaseList/messages.ts (1)
  • messages (19-64)
app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.tsx (1)
  • TestCaseNameCell (50-64)
app/src/components/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx (1)
  • TestCaseExecutionCell (40-87)
🪛 GitHub Actions: Build
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.jsx

[warning] 53-53: Unexpected console statement (no-console).

app/src/types/global.d.ts

[warning] 63-63: Unexpected any. Specify a different type (@typescript-eslint/no-explicit-any).

app/src/components/testCaseList/testCaseCell.scss

[error] 59-59: Unexpected hex color '#4d70ed' (color-no-hex).


[error] 66-66: Unexpected hex color '#fdc63a' (color-no-hex).


[error] 72-72: Unexpected hex color '#dc5959' (color-no-hex).

🔇 Additional comments (53)
.gitignore (1)

11-11: Approve .cursor ignore entry.
Adding .cursor to the ignore list will prevent accidental commits of cursor-related temporary files.

app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.scss (2)

61-63: LGTM! Clean CSS implementation for hiding the arrow.

The .hide-arrow modifier class properly removes the right padding when the arrow is hidden, ensuring consistent visual spacing.


77-79: LGTM! Appropriate font-weight for bold styling.

The .bold-value modifier class uses a sensible font-weight of 600 for semi-bold text, which provides good readability without being too heavy.

app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.jsx (6)

41-42: LGTM! Props are properly typed.

The new boolean props hideArrow and boldValue are correctly defined in PropTypes.


58-59: LGTM! Sensible default values.

Both props default to false, ensuring backwards compatibility and maintaining existing behavior.


138-139: LGTM! Props properly destructured.

The new props are correctly included in the destructuring assignment for use in the render method.


152-152: LGTM! Conditional CSS class application.

The hide-arrow class is properly applied conditionally based on the hideArrow prop value.


156-156: LGTM! Conditional bold styling.

The bold-value class is correctly applied to the value span when the boldValue prop is true.


157-159: LGTM! Clean conditional rendering.

The arrow icon is properly hidden when hideArrow is true, using standard React conditional rendering patterns.

app/src/types/global.d.ts (5)

17-21: SVG module declaration is correct.
The ambient declaration for .svg imports correctly types them as strings (URLs), matching common webpack/CRA setups.


23-27: SCSS module declaration is correct.
Typing SCSS modules as a { [key: string]: string } map aligns with CSS-modules conventions.


29-33: CSS module declaration is correct.
This declaration ensures .css module imports yield a map of class names to strings.


35-39: Image asset module declarations are consistent.
PNG, JPG, JPEG, GIF, and WEBP imports are all correctly typed as string URLs.

Also applies to: 41-44, 46-49, 51-54, 56-59


1-66: Verify ambient declaration inclusion.
Confirm that app/src/types/global.d.ts is included in your tsconfig.json (via include or typeRoots) so these module declarations are recognized by the compiler.

🧰 Tools
🪛 GitHub Actions: Build

[warning] 63-63: Unexpected any. Specify a different type (@typescript-eslint/no-explicit-any).

app/package.json (1)

30-30:

❓ Verification inconclusive

Verify UI Kit upgrade
Ensure the ^0.0.1-alpha.59 tag is published on NPM and confirm no breaking changes affect the new Test Case List components.

Also run the full test suite locally to catch regressions.


🏁 Script executed:

npm view @reportportal/ui-kit versions --json

Length of output: 1240


UI Kit version availability confirmed
The ^0.0.1-alpha.59 release is published on npm. Please take the following steps before merging:

  • Review the @reportportal/ui-kit changelog or release notes for any breaking changes affecting the Test Case List components.
  • Run the full test suite locally to catch any regressions.
app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.scss (1)

35-38: Confirm modifier application
The &--no-tags BEM modifier correctly removes padding and allows auto height. Please verify that the React component applies tag-list--no-tags when tags is empty.

app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/messages.js (1)

24-27:

✅ Verification successful

Verify translation entries
Ensure the new LinkedTestCasesTab.noTagsAdded ID is present in all locale JSON files:


🏁 Script executed:

rg -L '"LinkedTestCasesTab.noTagsAdded"' -n app/localization/translated

Length of output: 556


Translation entries verified
The key LinkedTestCasesTab.noTagsAdded is present in all locale JSON files (zh, uk, es, ru, be).

app/src/components/testCaseList/testCaseNameCell/index.ts (1)

17-18: Barrel export is correct
The index.ts re-export of TestCaseNameCell follows the project's barrel pattern. No issues found.

app/localization/translated/uk.json (1)

1326-1339:

✅ Verification successful

Verify translation consistency and grouping for new test case keys
Ensure these new entries for LinkedTestCasesTab, TestCaseList, and TestCaseLibraryPage are correctly translated and referenced in the code, and exist in all other locale files (e.g., be.json, es.json, ru.json, zh.json). Consider grouping TestCaseLibraryPage.copySuffix with other TestCaseLibraryPage keys for logical cohesion.

Run this script to confirm presence across locales:


🏁 Script executed:

#!/bin/bash
# Verify test case translation keys across all locale files
rg -Hn '"\(LinkedTestCasesTab\|TestCaseList\|TestCaseLibraryPage\)\.' app/localization/translated/*.json

Length of output: 481


Let's re-run the verification with a corrected regex to properly match those keys across all locale files:


🏁 Script executed:

#!/bin/bash
# Verify test case translation keys across all locale files with corrected regex
rg -Hn '"(LinkedTestCasesTab|TestCaseList|TestCaseLibraryPage)\.' app/localization/translated/*.json

Length of output: 7399


All test case translation keys are present in every locale
I confirmed that LinkedTestCasesTab.*, TestCaseList.*, and TestCaseLibraryPage.copySuffix appear in be.json, es.json, ru.json, uk.json, and zh.json. No missing entries were found. Since copySuffix is currently the only TestCaseLibraryPage key, there’s no additional grouping needed—future page‐level strings can be organized together as they’re added.

app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/index.ts (1)

17-17: LGTM!

Clean barrel module implementation following standard patterns.

app/src/components/testCaseList/testCaseExecutionCell/index.ts (1)

17-17: LGTM!

Consistent barrel module implementation that aligns with the project's modular structure.

app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.jsx (1)

71-79: LGTM!

The empty state implementation is well-designed with proper internationalization support and consistent styling patterns. The early return prevents unnecessary processing when no tags are present.

app/src/components/testCaseList/index.ts (1)

17-18: Barrel export is concise and clear.

This re-export setup centralizes TestCaseList and its related constants/mock data, simplifying imports across the codebase. Looks good.

app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.scss (1)

46-50: Validate layout changes after removing spacing rules.

You’ve dropped justify-content, align-items, padding, and gap from &__content. Please verify against the design spec and update any snapshots or tests as needed to ensure the new layout matches expectations.

app/localization/translated/zh.json (2)

1326-1327: Approve new LinkedTestCasesTab localization entries
The keys LinkedTestCasesTab.noTagsAdded and LinkedTestCasesTab.showLess match the code and are correctly formatted as JSON.


1328-1331: Approve TestCaseList localization entries
Entries for TestCaseList.deleteTestCase, .duplicate, .editTestCase, and .moveTestCaseTo align with component props and maintain proper JSON syntax.

app/localization/translated/ru.json (1)

1327-1341: Add Russian translations for TestCase management UI
New entries cover the LinkedTestCasesTab and TestCaseList components, matching the message IDs introduced in the PR. Keys follow the existing naming conventions, there are no duplicates, and the JSON remains syntactically valid.

app/src/components/testCaseList/messages.ts (1)

19-64: LGTM! Well-structured internationalization messages.

The message definitions follow React Intl best practices with consistent naming conventions and clear, descriptive default messages. The structure is clean and properly organized for the test case list UI components.

app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.jsx (3)

36-44: LGTM! Clean hook integration and state management.

The destructuring of the useTestCases hook is well-organized and the extracted values cover all necessary aspects of test case management including filtering, loading states, and action handlers.


60-71: LGTM! Effective conditional rendering pattern.

The conditional rendering based on hasTestCases provides a clean user experience, showing either the test case details or an empty state. The props passed to TestCaseDetailsPage are comprehensive and well-structured.


27-27:

✅ Verification successful

Verify the useTestCases hook import.

Ensure that the useTestCases hook exists and is properly exported from the specified path.


🏁 Script executed:

#!/bin/bash
# Description: Verify useTestCases hook exists and is properly exported

# Check if useTestCases hook file exists
fd -t f "useTestCases" app/src/pages/inside/testCaseLibraryPage/hooks/ --exec echo "Found: {}"

# Search for useTestCases hook definition
ast-grep --pattern 'export $_ useTestCases'

Length of output: 210


🏁 Script executed:

#!/bin/bash
# Inspect export statements in useTestCases.ts
grep -R "export" -n app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts || echo "No export statements found"

Length of output: 121


useTestCases hook import is correct.

The useTestCases hook is defined and exported from app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts, so the import path is valid.

app/src/components/testCaseList/testCaseList.scss (6)

17-25: LGTM! Well-structured main container styles.

The flexbox layout with proper overflow handling creates a solid foundation for the test case list component.


31-38: LGTM! Effective hover states for table rows.

The hover effect with border and border-radius provides good visual feedback. The use of CSS custom properties ensures consistent theming.


40-66: LGTM! Clean loading and no-results states.

The loading and no-results sections are well-designed with appropriate spacing and typography. The centered layout and consistent color usage enhance the user experience.


68-125: LGTM! Comprehensive controls section styling.

The controls layout effectively uses flexbox for responsive alignment and spacing. The filter icon styles provide appropriate interactive feedback.


127-179: LGTM! Thorough responsive design implementation.

The media queries cover key breakpoints and appropriately adjust layout, typography, and spacing for different screen sizes. The progressive enhancement approach ensures good usability across devices.


35-35:

❓ Verification inconclusive

Verify CSS custom properties are defined.

The stylesheet uses several CSS custom properties for colors. Ensure these are properly defined in the design system or CSS root.

Also applies to: 113-113, 118-118


🏁 Script executed:

#!/bin/bash
# Description: Verify CSS custom properties are defined in the codebase

# Search for CSS custom property definitions
rg -A 2 -B 2 "--rp-ui-base-topaz-focused|--rp-ui-base-e-400|--rp-ui-base-e-100|--rp-ui-base-almost-black|--rp-ui-base-topaz"

Length of output: 638


Let's correct the ripgrep invocation and search again for those CSS variables:


🏁 Script executed:

#!/bin/bash
# Description: Verify CSS custom property definitions in the codebase

# Search for CSS custom property definitions with correct regex syntax
rg -E "(--rp-ui-base-topaz-focused|--rp-ui-base-e-400|--rp-ui-base-e-100|--rp-ui-base-almost-black|--rp-ui-base-topaz)" -C 2

Length of output: 523


Let’s try a broader grep search (falling back from ripgrep) to find any “--rp-ui-base…” declarations:


🏁 Script executed:

#!/bin/bash
# Description: Fallback grep search for CSS custom property definitions
grep -R --include '*.scss' --include '*.css' -- '--rp-ui-base' -n .

Length of output: 11628


Let’s check for actual CSS variable definitions (lines like --rp-ui-base-...: value;):


🏁 Script executed:

#!/bin/bash
# Description: Search for CSS custom property definitions in .scss/.css files

grep -R --include '*.scss' --include '*.css' -n '^\s*--rp-ui-base-[a-z0-9-]\+:' .

Length of output: 83


Verify CSS custom properties are defined globally

I searched all .scss/.css files and did not find any local declarations for these variables:

  • --rp-ui-base-topaz-focused
  • --rp-ui-base-e-400
  • --rp-ui-base-e-100
  • --rp-ui-base-almost-black
  • --rp-ui-base-topaz

They are used in:

  • app/src/components/testCaseList/testCaseList.scss (line 35: border; lines 113, 118: color)

Please confirm that these custom properties are declared in your design system or a global stylesheet (e.g. under :root) and that it’s imported before this component. If they’re missing, add the definitions or import the correct theme file.

app/src/components/testCaseList/testCaseList.constants.ts (1)

17-20: LGTM! Sensible default constants.

The constants provide reasonable default values for pagination and filtering. The naming is clear and the values are appropriate for a test case list interface.

app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts (5)

17-19: LGTM: Clean imports with proper type safety.

The imports are well-organized and follow TypeScript best practices.


21-24: LGTM: State initialization follows React patterns.

The state setup is correct with proper TypeScript typing.


42-53: LGTM: Efficient filtering with proper memoization.

The search logic is well-implemented with case-insensitive matching across name and tags. The memoization dependencies are correct.


55-57: LGTM: Simple and effective delete operation.

The delete function correctly filters out the target test case by ID.


68-70: LGTM: Clean update implementation with immutable patterns.

The update function correctly uses object spread for immutable updates.

app/src/components/testCaseList/types.ts (1)

27-30: LGTM: Simple and effective filter option interface.

The FilterOption interface is well-designed for dropdown and filter components.

app/localization/translated/be.json (1)

1327-1340:

✅ Verification successful

New Test Case localization keys look correct

These keys for LinkedTestCasesTab and TestCaseList align with the newly added UI components and messages.


🏁 Script executed:

#!/bin/bash
# Verify new localization keys in all translated JSON files
keys=(
  "LinkedTestCasesTab.noTagsAdded"
  "LinkedTestCasesTab.showLess"
  "TestCaseList.deleteTestCase"
  "TestCaseList.duplicate"
  "TestCaseList.editTestCase"
  "TestCaseList.moveTestCaseTo"
  "TestCaseLibraryPage.copySuffix"
  "TestCaseList.allTestCasesTitle"
  "TestCaseList.executionHeader"
  "TestCaseList.loadingMessage"
  "TestCaseList.nameHeader"
  "TestCaseList.noResultsEmptyMessage"
  "TestCaseList.noResultsFilteredMessage"
  "TestCaseList.searchPlaceholder"
)
for file in app/localization/translated/*.json; do
  for key in "${keys[@]}"; do
    jq -e --arg k "$key" 'has($k)' "$file" > /dev/null \
      || echo "Missing $key in $file"
  done
done

Length of output: 38347


Localization coverage verified

  • Confirmed all new LinkedTestCasesTab.* and TestCaseList.* keys exist in the main translation files (be.json, es.json, ru.json, uk.json, zh.json).
  • The whitelist_*.json files use an array format for override keys and aren’t expected to mirror the full key set, so their “missing key” errors can be ignored.

All primary locales include the new entries—no further changes required.

app/src/components/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx (2)

32-38: LGTM! Props interface properly addresses previous feedback.

The component now accepts only the specific props it needs (lastExecution, onEdit, onDelete, onDuplicate, onMove) instead of the entire test case object, and all handlers are required rather than optional. This addresses the coupling and optional handler concerns raised in previous reviews.


40-87: Clean implementation with proper state management and internationalization.

The component correctly:

  • Manages popover state internally
  • Uses react-intl for localized menu labels
  • Provides a consistent menu structure with proper event handling
  • Implements accessible focus states via PopoverControl
app/src/components/testCaseList/testCaseCell.scss (1)

17-145: Well-structured CSS with good use of flexbox and CSS variables.

The overall styling structure is clean and follows good practices:

  • Proper use of flexbox for layouts
  • Consistent spacing and sizing
  • Good hover and focus states for interactive elements
  • Appropriate use of CSS variables throughout most of the file
🧰 Tools
🪛 GitHub Actions: Build

[error] 59-59: Unexpected hex color '#4d70ed' (color-no-hex).


[error] 66-66: Unexpected hex color '#fdc63a' (color-no-hex).


[error] 72-72: Unexpected hex color '#dc5959' (color-no-hex).

app/src/pages/inside/testCaseLibraryPage/messages.js (1)

24-51: Well-structured internationalization messages for pagination UI.

The new message definitions follow the established naming conventions and provide clear, descriptive text for pagination controls and test case operations. The IDs are properly namespaced with TestCaseLibraryPage. prefix.

app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.tsx (1)

50-64: Clean component structure with proper accessibility.

The component implementation is well-structured with:

  • Proper use of CSS modules and class binding
  • Accessibility considerations (title attribute for name tooltip)
  • Clean separation of concerns between status icon, name, and tags
app/src/components/testCaseList/testCaseList.tsx (2)

45-57: Well-implemented memoized component with good default values.

The component is properly memoized and provides sensible default values for optional props. The use of mock data as a default helps with development and testing.


116-122: Good implementation following past review feedback.

The SearchField props are correctly implemented without redundant duplication, addressing the previous review comment effectively.

app/src/components/testCaseList/mockData.ts (1)

310-314: Good use of const assertion for type safety.

The STATUS_TYPES object with as const assertion provides good type safety and prevents accidental mutations.

@reportportal reportportal deleted a comment from coderabbitai bot Jun 9, 2025
@Guria
Copy link
Contributor

Guria commented Jun 16, 2025

@coderabbitai review

Copy link

coderabbitai bot commented Jun 16, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
app/src/components/testCaseList/testCaseList.tsx (1)

102-108: Duplicate props were re-introduced after prior feedback
Both setSearchValue and onFilterChange receive the same callback. A previous review asked to expose only one prop to avoid redundancy. Please drop one of them unless the API divergence is really expected.

🧹 Nitpick comments (3)
app/src/pages/inside/testCaseLibraryPage/expandedOptions/expandedOptions.tsx (1)

30-32: Import path smells like relative-hell – consider alias
Imports such as '../hooks/useTestCases' become brittle as the folder depth changes. The project already uses path aliases elsewhere (components/...). Expose useTestCases through an alias (e.g., pages/testCaseLibrary/hooks) to keep imports stable.

app/src/components/testCaseList/testCaseList.tsx (1)

94-95: isEmptyList is overly verbose
!value.length already covers the empty array case; the second condition is redundant.

-const isEmptyList = (value: TestCase[]) => !value.length || value.length === 0;
+const isEmptyList = (value: TestCase[]) => value.length === 0;
app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/allTestCasesPage.tsx (1)

59-62: Persist pageSize change in callback to keep memoization cheap
changePageSize recreates each render and is passed to Pagination. Wrap it in useCallback to prevent unnecessary re-renders of the pagination component.

-const changePageSize = (size: number) => {
+const changePageSize = useCallback((size: number) => {
   setPageSize(size);
   setActivePage(DEFAULT_CURRENT_PAGE);
-};
+}, []);
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e2ecbf5 and a2d0c0e.

⛔ Files ignored due to path filters (2)
  • app/package-lock.json is excluded by !**/package-lock.json
  • app/src/common/img/newIcons/priority-inline.svg is excluded by !**/*.svg
📒 Files selected for processing (32)
  • .gitignore (1 hunks)
  • app/package.json (1 hunks)
  • app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.jsx (4 hunks)
  • app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.scss (2 hunks)
  • app/src/components/testCaseList/constants.ts (1 hunks)
  • app/src/components/testCaseList/index.ts (1 hunks)
  • app/src/components/testCaseList/messages.ts (1 hunks)
  • app/src/components/testCaseList/mockData.ts (1 hunks)
  • app/src/components/testCaseList/priorityIcon/index.ts (1 hunks)
  • app/src/components/testCaseList/priorityIcon/priorityIcon.scss (1 hunks)
  • app/src/components/testCaseList/priorityIcon/priorityIcon.tsx (1 hunks)
  • app/src/components/testCaseList/testCaseExecutionCell/index.ts (1 hunks)
  • app/src/components/testCaseList/testCaseExecutionCell/testCaseExecutionCell.scss (1 hunks)
  • app/src/components/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx (1 hunks)
  • app/src/components/testCaseList/testCaseList.scss (1 hunks)
  • app/src/components/testCaseList/testCaseList.tsx (1 hunks)
  • app/src/components/testCaseList/testCaseNameCell/index.ts (1 hunks)
  • app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.scss (1 hunks)
  • app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.tsx (1 hunks)
  • app/src/components/testCaseList/types.ts (1 hunks)
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/messages.js (1 hunks)
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.jsx (1 hunks)
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.scss (2 hunks)
  • app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/allTestCasesPage.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/allTestCasesPage.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/expandedOptions/expandedOptions.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/expandedOptions/expandedOptions.tsx (3 hunks)
  • app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/messages.js (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.jsx (0 hunks)
  • app/src/types/global.d.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.jsx
✅ Files skipped from review due to trivial changes (12)
  • app/src/pages/inside/testCaseLibraryPage/expandedOptions/expandedOptions.scss
  • app/src/components/testCaseList/priorityIcon/index.ts
  • app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/index.ts
  • app/src/components/testCaseList/testCaseExecutionCell/index.ts
  • app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.scss
  • app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/allTestCasesPage.scss
  • app/src/components/testCaseList/constants.ts
  • app/src/components/testCaseList/testCaseExecutionCell/testCaseExecutionCell.scss
  • app/src/components/testCaseList/priorityIcon/priorityIcon.scss
  • app/src/components/testCaseList/testCaseNameCell/index.ts
  • app/src/components/testCaseList/types.ts
  • app/src/components/testCaseList/mockData.ts
🚧 Files skipped from review as they are similar to previous changes (15)
  • .gitignore
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.scss
  • app/package.json
  • app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.scss
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/messages.js
  • app/src/pages/inside/productVersionPage/linkedTestCasesTab/tagList/tagList.jsx
  • app/src/components/testCaseList/testCaseList.scss
  • app/src/components/testCaseList/index.ts
  • app/src/components/testCaseList/messages.ts
  • app/src/types/global.d.ts
  • app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.tsx
  • app/src/pages/inside/testCaseLibraryPage/hooks/useTestCases.ts
  • app/src/components/inputs/inputDropdownSorting/inputDropdownSorting.jsx
  • app/src/components/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx
  • app/src/pages/inside/testCaseLibraryPage/messages.js
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/src/components/testCaseList/priorityIcon/priorityIcon.tsx (2)
app/src/components/testCaseList/types.ts (1)
  • TestCaseStatus (17-17)
app/src/components/testCaseList/priorityIcon/index.ts (1)
  • PriorityIcon (17-17)
🔇 Additional comments (3)
app/src/components/testCaseList/priorityIcon/priorityIcon.tsx (1)

41-47: Gracefully handle unexpected status values
status is a union type, but runtime callers may still send an invalid string (e.g., from JSON). Accessing iconMap[status] with an unknown key will render undefined and break layout. Provide a fallback:

-      {iconMap[status]}
+      {iconMap[status] ?? iconMap.normal}
app/src/components/testCaseList/testCaseList.tsx (1)

32-39: itemsPerPage lacks a default – guard against 0 | undefined
itemsPerPage is required but nothing prevents callers from passing 0 or omitting it in the future. Provide a sane default (e.g., DEFAULT_ITEMS_PER_PAGE) to avoid division-by-zero downstream.

-interface TestCaseListProps {
+interface TestCaseListProps {-  itemsPerPage: number;
+  itemsPerPage?: number;
   …
 }

…and update the destructuring with a default.

app/src/pages/inside/testCaseLibraryPage/allTestCasesPage/allTestCasesPage.tsx (1)

47-50: Guard against division by zero when calculating totalPages
If pageSize ever becomes 0 (e.g., mis-configured option), Math.ceil will yield Infinity, breaking Pagination.

-const totalPages = Math.ceil(totalItems / pageSize);
+const totalPages = pageSize ? Math.ceil(totalItems / pageSize) : 1;

@Guria
Copy link
Contributor

Guria commented Jun 16, 2025

@ViktorSoroka07 It is ready to merge I believe

@ViktorSoroka07
Copy link

@Guria, waiting for @AmsterGet final approve

Copy link

@Saveli0S Saveli0S merged commit f255cfb into feature/test-library Jun 17, 2025
12 checks passed
@Saveli0S Saveli0S deleted the all-test-cases branch June 17, 2025 12:01
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.

9 participants