Skip to content

implement test plans table #4477

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

Open
wants to merge 1 commit into
base: feature/test-library
Choose a base branch
from

Conversation

OleksandrDragun
Copy link

@OleksandrDragun OleksandrDragun commented Jul 19, 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 Test Plans page displaying a table of test plans with dynamic data, including coverage statistics and progress bars.
    • Added options menu for each test plan with actions: Edit, Duplicate, and Delete.
    • Implemented conditional rendering for empty and populated states of the Test Plans page.
    • Added localized UI messages for improved internationalization.
  • Style

    • Added new styles for the Test Plans page, table, progress bar, and options menu for enhanced UI consistency.
  • Chores

    • Updated UI kit dependency for improved component support.

Copy link

coderabbitai bot commented Jul 19, 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

This update introduces a feature-rich Test Plans page. It adds a data-driven table for displaying test plans, complete with coverage statistics, progress bars, and contextual options. The update includes new React components, SCSS styles, TypeScript types, and localization messages. The page now conditionally renders content based on available test plans and integrates mock data via a custom hook.

Changes

File(s) Change Summary
app/package.json Updated @reportportal/ui-kit dependency version.
.../testPlansPage/commonMessages.ts Added new localized messages for the Test Plans page.
.../testPlansPage/emptyTestPlans/emptyTestPlans.tsx Switched button label to use new commonMessages.
.../testPlansPage/emptyTestPlans/messages.ts Removed createTestPlansLabel message entry.
.../testPlansPage/testPlansPage.scss Updated header styling; added styles for actions section.
.../testPlansPage/testPlansPage.tsx Enhanced page to load and display test plans, added action buttons, and conditional rendering.
.../testPlansPage/testPlansTable/index.ts Removed message exports; now re-exports TestPlansTable component.
.../testPlansPage/testPlansTable/messages.ts Added localized messages for the Test Plans Table.
.../testPlansPage/testPlansTable/mockData.ts Added mock data for test plans.
.../testPlansPage/testPlansTable/options/index.ts New index file re-exporting Options component.
.../testPlansPage/testPlansTable/options/options.scss New SCSS file for menu and button styles.
.../testPlansPage/testPlansTable/options/options.tsx New Options React component for row actions.
.../testPlansPage/testPlansTable/progressBar/index.ts New index file re-exporting ProgressBar component.
.../testPlansPage/testPlansTable/progressBar/progressBar.scss New SCSS file for progress bar styles.
.../testPlansPage/testPlansTable/progressBar/progressBar.tsx New ProgressBar React component.
.../testPlansPage/testPlansTable/testPlansTable.scss New SCSS file for the test plans table.
.../testPlansPage/testPlansTable/testPlansTable.tsx New TestPlansTable React component for displaying test plans.
.../testPlansPage/testPlansTable/types.ts Added TestPlans type alias.
.../testPlansPage/testPlansTable/useTestPlans.ts New hook to load and manage test plans data.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TestPlansPage
    participant useTestPlans
    participant TestPlansTable
    participant EmptyTestPlans

    User->>TestPlansPage: Visit Test Plans page
    TestPlansPage->>useTestPlans: Invoke hook to load test plans
    useTestPlans-->>TestPlansPage: Return { testPlans, loading }
    alt testPlans is empty
        TestPlansPage->>EmptyTestPlans: Render empty state
    else testPlans available
        TestPlansPage->>TestPlansTable: Render table with testPlans data
    end
Loading

Suggested reviewers

  • AmsterGet
  • allaprischepa
  • maria-hambardzumian

Poem

A table appears, so neat and grand,
With test plans lined up, just as planned.
Progress bars march, options in tow,
Buttons to refresh, and numbers that grow.
The page now shines, with data anew—
A rabbit’s hop forward, just for you!
🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test-plans-table

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.

@OleksandrDragun
Copy link
Author

@coderabbitai review

Copy link

coderabbitai bot commented Jul 19, 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: 3

🧹 Nitpick comments (6)
app/src/pages/inside/testPlansPage/testPlansTable/progressBar/progressBar.tsx (2)

22-24: Add input validation and documentation for the progress prop.

The progress prop should be validated to ensure it's within expected bounds and documented for clarity.

 interface ProgressBarProps {
+  /** Progress percentage (0-100) */
-  progress: number;
+  progress: number;
 }

Consider adding runtime validation:

 export const ProgressBar = ({ progress }: ProgressBarProps) => (
+  const clampedProgress = Math.max(0, Math.min(100, progress));
   <div className={cx('progress-bar')}>
-    <div className={cx('progress-bar__indicator')} style={{ width: `${progress}%` }} />
+    <div className={cx('progress-bar__indicator')} style={{ width: `${clampedProgress}%` }} />
   </div>
 );

26-30: Consider adding accessibility attributes.

The progress bar could benefit from ARIA attributes for better accessibility support.

 export const ProgressBar = ({ progress }: ProgressBarProps) => (
-  <div className={cx('progress-bar')}>
+  <div className={cx('progress-bar')} role="progressbar" aria-valuenow={progress} aria-valuemin={0} aria-valuemax={100}>
     <div className={cx('progress-bar__indicator')} style={{ width: `${progress}%` }} />
   </div>
 );
app/src/pages/inside/testPlansPage/testPlansTable/messages.ts (1)

19-40: Optional: derive menu ids from a constant enum

To avoid drift between IDs & keys (see typo above), export an enum of keys and reuse it when defining messages.

app/src/pages/inside/testPlansPage/testPlansTable/useTestPlans.ts (1)

30-30: Consider reducing the simulation delay for better developer experience.

The 2-second delay might be unnecessarily long for development and testing purposes.

-      await new Promise((resolve) => setTimeout(resolve, 2000));
+      await new Promise((resolve) => setTimeout(resolve, 500));
app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.scss (1)

18-22: Consider adding align-items for complete flexbox centering.

If centering is the intended behavior, you might want to add align-items: center for vertical centering as well.

 &__table-container {
   display: flex;
   justify-content: center;
+  align-items: center;
   padding-top: 26px;
 }
app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.tsx (1)

100-111: Consider adding data validation for robustness.

The table rendering is implemented correctly. However, consider adding validation to ensure the testPlans data structure is as expected, especially for the coverage field which is used in calculations.

 export const TestPlansTable = ({ testPlans }: TestPlansTableProps) => {
   const { formatMessage } = useIntl();
 
+  // Validate that coverage values are within expected range
+  const validatedTestPlans = testPlans.filter(plan => 
+    typeof plan.coverage === 'number' && 
+    plan.coverage >= 0 && 
+    plan.coverage <= 100
+  );
+
-  const currentTestPlans = testPlans.map(({ name, coverage, total, covered }) => ({
+  const currentTestPlans = validatedTestPlans.map(({ name, coverage, total, covered }) => ({
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 98ed6e6 and 670228b.

⛔ Files ignored due to path filters (1)
  • app/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (19)
  • app/package.json (1 hunks)
  • app/src/pages/inside/testPlansPage/commonMessages.ts (1 hunks)
  • app/src/pages/inside/testPlansPage/emptyTestPlans/emptyTestPlans.tsx (2 hunks)
  • app/src/pages/inside/testPlansPage/emptyTestPlans/messages.ts (0 hunks)
  • app/src/pages/inside/testPlansPage/testPlansPage.scss (2 hunks)
  • app/src/pages/inside/testPlansPage/testPlansPage.tsx (3 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/index.ts (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/messages.ts (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/mockData.ts (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/options/index.ts (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/options/options.scss (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/options/options.tsx (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/progressBar/index.ts (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/progressBar/progressBar.scss (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/progressBar/progressBar.tsx (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.scss (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.tsx (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/types.ts (1 hunks)
  • app/src/pages/inside/testPlansPage/testPlansTable/useTestPlans.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • app/src/pages/inside/testPlansPage/emptyTestPlans/messages.ts
🧰 Additional context used
🧠 Learnings (16)
📓 Common learnings
Learnt from: Guria
PR: reportportal/service-ui#4403
File: app/src/pages/inside/testCaseLibraryPage/emptyState/emptyStateDetails.tsx:30-36
Timestamp: 2025-06-12T00:09:07.409Z
Learning: During the mock stage of UI work in reportportal/service-ui, it is acceptable for interactive elements (e.g., buttons) to omit functional handlers such as `onClick`; these will be implemented in subsequent merge requests. Review comments should avoid flagging these omissions unless the implementation MR is in scope.
Learnt from: allaprischepa
PR: reportportal/service-ui#4418
File: app/localization/translated/zh.json:2125-2130
Timestamp: 2025-06-23T06:22:27.254Z
Learning: For the ReportPortal project, translation work should be delegated to dedicated translators rather than being handled directly during code review. English keys can serve as placeholders until proper translations are provided by the translation team.
app/package.json (2)
Learnt from: AmsterGet
PR: reportportal/service-ui#4397
File: app/src/controllers/plugins/uiExtensions/selectors.js:55-88
Timestamp: 2025-06-10T15:10:26.627Z
Learning: In the ReportPortal service-ui codebase, plugin metadata fields like `details.modules` and `manifest.extensions` are required fields that are validated on the server side, so defensive checks for undefined values are not needed in the client-side selectors.
Learnt from: allaprischepa
PR: reportportal/service-ui#4472
File: app/src/pages/instance/allUsersPage/allUsersHeader/allUsersExport/allUsersExport.tsx:48-50
Timestamp: 2025-07-18T10:24:12.355Z
Learning: In the ReportPortal service-ui project, when removing properties from objects, the `delete` operator is preferred over destructuring when the destructured variable would be unused, as the project uses `@typescript-eslint/no-unused-vars` rule which prevents unused variables from destructuring patterns like `const { limit, ...data } = object;`.
app/src/pages/inside/testPlansPage/emptyTestPlans/emptyTestPlans.tsx (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/testPlansPage.scss (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/testPlansTable/types.ts (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/testPlansTable/progressBar/index.ts (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/testPlansTable/options/index.ts (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/commonMessages.ts (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/testPlansTable/mockData.ts (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/testPlansTable/options/options.tsx (2)
Learnt from: Guria
PR: reportportal/service-ui#4407
File: app/src/pages/common/popoverControl/popoverControl.tsx:55-63
Timestamp: 2025-06-13T21:54:46.839Z
Learning: The Popover component from '@reportportal/ui-kit' handles closing internally when items are clicked, so manual closing via setIsOpened(false) in onClick handlers is not needed.
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:75-86
Timestamp: 2025-06-18T14:36:19.317Z
Learning: In ReportPortal TypeScript components, noop handlers are sometimes used to satisfy TypeScript requirements for required props, not because functionality is missing. This is a common pattern when the actual form handling is managed by wrapper components.
app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.scss (2)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
Learnt from: Guria
PR: reportportal/service-ui#4403
File: app/src/pages/inside/testCaseLibraryPage/emptyState/emptyStateDetails.tsx:30-36
Timestamp: 2025-06-12T00:09:07.409Z
Learning: During the mock stage of UI work in reportportal/service-ui, it is acceptable for interactive elements (e.g., buttons) to omit functional handlers such as `onClick`; these will be implemented in subsequent merge requests. Review comments should avoid flagging these omissions unless the implementation MR is in scope.
app/src/pages/inside/testPlansPage/testPlansTable/useTestPlans.ts (1)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
app/src/pages/inside/testPlansPage/testPlansTable/index.ts (3)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
Learnt from: AmsterGet
PR: reportportal/service-ui#4409
File: app/localization/translated/es.json:1648-1652
Timestamp: 2025-06-18T16:24:46.188Z
Learning: In the ReportPortal project, Spanish and Chinese localization entries are intentionally left in English during development. Native speakers handle these translations later in the process, so having English text in Spanish (es.json) and Chinese (zh.json) locale files is expected and acceptable.
Learnt from: allaprischepa
PR: reportportal/service-ui#4472
File: app/src/pages/instance/allUsersPage/allUsersHeader/allUsersExport/allUsersExport.tsx:48-50
Timestamp: 2025-07-18T10:24:12.355Z
Learning: In the ReportPortal service-ui project, when removing properties from objects, the `delete` operator is preferred over destructuring when the destructured variable would be unused, as the project uses `@typescript-eslint/no-unused-vars` rule which prevents unused variables from destructuring patterns like `const { limit, ...data } = object;`.
app/src/pages/inside/testPlansPage/testPlansTable/messages.ts (2)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
Learnt from: AmsterGet
PR: reportportal/service-ui#4409
File: app/localization/translated/es.json:1648-1652
Timestamp: 2025-06-18T16:24:46.188Z
Learning: In the ReportPortal project, Spanish and Chinese localization entries are intentionally left in English during development. Native speakers handle these translations later in the process, so having English text in Spanish (es.json) and Chinese (zh.json) locale files is expected and acceptable.
app/src/pages/inside/testPlansPage/testPlansPage.tsx (6)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:75-86
Timestamp: 2025-06-18T14:36:19.317Z
Learning: In ReportPortal TypeScript components, noop handlers are sometimes used to satisfy TypeScript requirements for required props, not because functionality is missing. This is a common pattern when the actual form handling is managed by wrapper components.
Learnt from: Guria
PR: reportportal/service-ui#4385
File: app/src/components/testCaseList/testCaseNameCell/testCaseNameCell.tsx:30-42
Timestamp: 2025-06-09T17:12:07.281Z
Learning: In React components, static objects like icon mappings that don't depend on props or state should be defined outside the component function to avoid unnecessary re-creation on every render, improving performance.
Learnt from: Guria
PR: reportportal/service-ui#4385
File: app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.scss:17-22
Timestamp: 2025-06-09T17:12:00.851Z
Learning: In the reportportal/service-ui codebase, ScrollWrapper component is used to provide scrollable contexts, eliminating the need to add overflow properties to individual page components for sticky positioning to work correctly.
Learnt from: allaprischepa
PR: reportportal/service-ui#4472
File: app/src/pages/instance/allUsersPage/allUsersHeader/allUsersExport/allUsersExport.tsx:48-50
Timestamp: 2025-07-18T10:24:12.355Z
Learning: In the ReportPortal service-ui project, when removing properties from objects, the `delete` operator is preferred over destructuring when the destructured variable would be unused, as the project uses `@typescript-eslint/no-unused-vars` rule which prevents unused variables from destructuring patterns like `const { limit, ...data } = object;`.
Learnt from: allaprischepa
PR: reportportal/service-ui#4472
File: app/src/pages/instance/organizationsPage/organizationsPageHeader/organizationsExport/organizationsExport.tsx:48-50
Timestamp: 2025-07-18T10:24:49.022Z
Learning: In the ReportPortal service-ui project, when the @typescript-eslint/no-unused-vars rule prevents destructuring with unused variables (even with underscore prefixes), the `delete` operator is the preferred approach for removing object properties. This applies specifically when destructuring patterns like `const { limit: _limit, ...data }` still trigger linting errors despite the underscore prefix.
app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.tsx (2)
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:23-24
Timestamp: 2025-06-18T14:37:30.906Z
Learning: In the test case library page at `app/src/pages/inside/testCaseLibraryPage/constans.ts`, the file is intentionally named `constans.ts` (missing the 't'), not `constants.ts`. This is the correct filename and imports referencing '../../../constans' are valid.
Learnt from: yelyzavetakhokhlova
PR: reportportal/service-ui#4416
File: app/src/pages/inside/testCaseLibraryPage/createTestCaseModal/testCaseDetails/template/template.tsx:75-86
Timestamp: 2025-06-18T14:36:19.317Z
Learning: In ReportPortal TypeScript components, noop handlers are sometimes used to satisfy TypeScript requirements for required props, not because functionality is missing. This is a common pattern when the actual form handling is managed by wrapper components.
🧬 Code Graph Analysis (5)
app/src/pages/inside/testPlansPage/emptyTestPlans/emptyTestPlans.tsx (1)
app/src/pages/inside/testPlansPage/commonMessages.ts (1)
  • commonMessages (19-32)
app/src/pages/inside/testPlansPage/testPlansTable/options/options.tsx (2)
app/src/pages/common/popoverControl/popoverControl.tsx (1)
  • PopoverItem (26-33)
app/src/pages/inside/testPlansPage/testPlansTable/messages.ts (1)
  • messages (19-40)
app/src/pages/inside/testPlansPage/testPlansTable/useTestPlans.ts (2)
app/src/pages/inside/testPlansPage/testPlansTable/types.ts (1)
  • TestPlans (17-22)
app/src/pages/inside/testPlansPage/testPlansTable/mockData.ts (1)
  • mockedTestPlans (17-36)
app/src/pages/inside/testPlansPage/testPlansTable/messages.ts (1)
app/src/pages/inside/testPlansPage/emptyTestPlans/messages.ts (1)
  • messages (19-48)
app/src/pages/inside/testPlansPage/testPlansPage.tsx (4)
app/src/pages/inside/testPlansPage/testPlansTable/useTestPlans.ts (1)
  • useTestPlans (21-45)
app/src/pages/inside/testPlansPage/commonMessages.ts (1)
  • commonMessages (19-32)
app/src/pages/inside/testPlansPage/emptyTestPlans/emptyTestPlans.tsx (1)
  • EmptyTestPlans (35-69)
app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.tsx (1)
  • TestPlansTable (35-112)
🔇 Additional comments (20)
app/package.json (1)

30-30: Dependency @reportportal/ui-kit 0.0.1-alpha.75 availability confirmed

Version 0.0.1-alpha.75 is published on npm alongside the preceding alpha releases (70–74). No further issues detected—proceed with this dependency update.

app/src/pages/inside/testPlansPage/commonMessages.ts (1)

19-32: Well-structured internationalization implementation.

The message definitions follow React Intl best practices with consistent ID naming and clear default messages. Centralizing these messages is a good approach for maintainability.

app/src/pages/inside/testPlansPage/emptyTestPlans/emptyTestPlans.tsx (2)

23-23: Good refactoring to centralize messages.

Adding the import for commonMessages supports the message centralization effort and improves consistency across the Test Plans feature.


54-54: Consistent use of centralized messaging.

The change from messages.createTestPlansLabel to commonMessages.createTestPlan aligns with the centralization effort and ensures consistent labeling across components.

app/src/pages/inside/testPlansPage/testPlansPage.scss (2)

19-19: Appropriate positioning context for action buttons.

Adding position: relative to the header creates the necessary positioning context for absolutely positioned action buttons.


41-47: Well-structured action button positioning.

The new .test-plans-page__actions class provides clean positioning for action buttons with consistent spacing. The absolute positioning within the header and flexbox layout with gap creates a professional layout.

app/src/pages/inside/testPlansPage/testPlansTable/options/index.ts (1)

17-17: LGTM – simple barrel export

No issues spotted.

app/src/pages/inside/testPlansPage/testPlansTable/progressBar/index.ts (1)

17-17: LGTM – matches existing barrel pattern

app/src/pages/inside/testPlansPage/testPlansTable/mockData.ts (1)

17-36: coverage numbers don’t match covered/total

Example: 340 / 358 ≈ 95%, yet coverage is 98. Same for the other rows. Either:

  1. Drop coverage and compute it in UI, or
  2. Fix the hard-coded values.
-    covered: 340,
-    total: 358,
-    coverage: 98,
+    covered: 340,
+    total: 358,
+    coverage: 95,

…and so on.
Inconsistent mock data will surface as confusing UI during manual testing.

app/src/pages/inside/testPlansPage/testPlansTable/useTestPlans.ts (1)

21-45: Hook implementation looks good for mock stage development.

The useTestPlans hook properly simulates async data loading with appropriate TypeScript types and state management. The implementation follows React hooks best practices.

app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.scss (1)

17-45: SCSS implementation follows good practices.

The stylesheet uses consistent BEM naming, appropriate CSS custom properties, and provides good interactive states with proper accessibility considerations.

app/src/pages/inside/testPlansPage/testPlansTable/index.ts (1)

17-17: Clean module export structure.

The simple re-export follows standard barrel export patterns and improves module organization by centralizing the component export.

app/src/pages/inside/testPlansPage/testPlansTable/options/options.scss (1)

17-48: Well-structured button and menu styles.

The implementation provides proper button resets, accessible interactive states, and consistent theming through CSS custom properties. The SVG state management is appropriate for the use case.

app/src/pages/inside/testPlansPage/testPlansTable/progressBar/progressBar.scss (1)

17-27: Clean and functional progress bar implementation.

The styles provide a simple, effective progress bar with proper structure, consistent theming, and appropriate visual properties including overflow handling and border radius.

app/src/pages/inside/testPlansPage/testPlansTable/options/options.tsx (1)

30-54: LGTM! Component structure follows established patterns.

The Options component is well-structured and follows the existing codebase patterns. The absence of onClick handlers for menu items is acceptable during the mock stage of UI development, as noted in the retrieved learnings from previous reviews.

app/src/pages/inside/testPlansPage/testPlansPage.tsx (3)

19-19: Good choice using lodash.isEmpty for consistency.

Using lodash.isEmpty provides consistent empty checking across different data types compared to manual checks.


28-30: LGTM! Clean integration of data fetching and components.

The integration of the useTestPlans hook and TestPlansTable component is well-structured. Using commonMessages for shared localization keys shows good separation of concerns.


52-63: Excellent conditional rendering pattern.

The conditional rendering logic provides a good user experience:

  • Actions are only shown when there are test plans to act upon
  • Empty state vs table rendering is handled cleanly
  • Button placement and styling follow UI patterns
app/src/pages/inside/testPlansPage/testPlansTable/testPlansTable.tsx (2)

38-58: Clean data transformation logic.

The mapping from test plan data to table rows is well-structured and handles all the required display components appropriately. The use of component cells for complex content (progress bars, options) follows good table design patterns.


60-98: Well-defined column configuration.

The column definitions are comprehensive with appropriate widths, alignment, and headers. The separation between primary and fixed columns follows the Table component's expected API.

Copy link

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.73%. Comparing base (98ed6e6) to head (882afde).

Additional details and impacted files
@@                  Coverage Diff                  @@
##           feature/test-library    #4477   +/-   ##
=====================================================
  Coverage                 66.73%   66.73%           
=====================================================
  Files                        85       85           
  Lines                       995      995           
  Branches                    143      142    -1     
=====================================================
  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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants