Skip to content

Test Case Details Page content #4403

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 1 commit into from
Jun 17, 2025
Merged

Conversation

Guria
Copy link
Contributor

@Guria Guria commented Jun 11, 2025

PR Checklist

  • Have you verified that the PR is pointing to the correct target branch? (feature/test-library)
  • 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

localhost_3000_ (1)
localhost_3000_

Summary by CodeRabbit

  • New Features

    • Introduced editable sections for tags and descriptions in the test case details sidebar.
    • Added a detailed header for the test case details page, including breadcrumb navigation, metadata, and action menus.
    • Implemented a new empty state for scenario details with localized messaging and documentation links.
  • Refactor

    • Updated breadcrumb rendering to use a reusable component on relevant pages.
    • Restructured the test case details page layout to use a grid and sidebar/main content design.
    • Simplified and reorganized code for menu items and priority icons.
  • Style

    • Added and updated SCSS styles for new components and improved page layouts.
  • Bug Fixes

    • Applied a temporary CSS workaround for width-related UI issues.
  • Documentation

    • Enhanced localization with new message keys for improved UI text and actions.

Copy link

coderabbitai bot commented Jun 11, 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 and refactors several UI components for the test case library pages, including a new TestCaseDetailsHeader, sidebar sections for tags and descriptions, and improved empty state handling. Breadcrumb navigation is standardized using a reusable component, and localization keys and messages are expanded. Stylesheets are reorganized to support new layouts and components.

Changes

File(s) Change Summary
app/src/common/constants/localization.js Added a new localization key DUPLICATE to COMMON_LOCALE_KEYS.
app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.jsx,
app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.scss
Removed class binding and related styles for the popover tools button; added a temporary .width-content CSS rule.
app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.jsx,
app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.scss
Refactored breadcrumb rendering to use a reusable Breadcrumbs component; updated related styles for breadcrumb display.
app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/editableDescriptionSection.tsx,
app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/index.ts
Added new EditableDescriptionSection component and module export.
app/src/pages/inside/testCaseLibraryPage/editableTagsSection/editableTagsSection.tsx,
app/src/pages/inside/testCaseLibraryPage/editableTagsSection/index.ts
Added new EditableTagsSection component and module export.
app/src/pages/inside/testCaseLibraryPage/emptyState/messages.ts Added three new localized messages for scenario details and actions.
app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.tsx,
app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.scss,
app/src/pages/inside/testCaseLibraryPage/infoBlock/index.ts
Added new InfoBlock component, its styles, and updated export.
app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.tsx,
app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.scss,
app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/index.ts
Added new SectionWithHeader component, its styles, and module export.
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/messages.ts Replaced a generic header message with four specific messages for tags and description fields.
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.tsx,
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.scss,
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/messages.ts,
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/index.ts
Added new TestCaseDetailsHeader component with styles and localized messages; added module export.
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.tsx,
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.scss
Refactored page layout to use a grid and sidebar, integrating new header and sidebar components.
app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.tsx,
app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.scss
Refactored to use the reusable Breadcrumbs component, updated structure and styles for the header and title.
app/src/pages/inside/testCaseLibraryPage/emptyState/details/detailsEmptyState.tsx,
app/src/pages/inside/testCaseLibraryPage/emptyState/details/index.ts
Added new DetailsEmptyState component and module export for scenario details empty state.
app/src/pages/inside/testCaseLibraryPage/emptyState/mainPage/mainPageEmptyState.tsx Refactored action dispatch to remove dependency on redirect; now dispatches plain action objects.
app/src/pages/inside/testCaseLibraryPage/testCaseList/priorityIcon/priorityIcon.tsx Simplified class name assignment for priority icon; removed helper function.
app/src/pages/inside/testCaseLibraryPage/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx Simplified menuItems array syntax to concise object literals.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant TestCaseDetailsPage
    participant TestCaseDetailsHeader
    participant Sidebar (EditableTagsSection/EditableDescriptionSection)
    participant MainContent (DetailsEmptyState)

    User->>TestCaseDetailsPage: Visit page
    TestCaseDetailsPage->>TestCaseDetailsHeader: Render header with test case data
    TestCaseDetailsPage->>Sidebar: Render tags and description sections
    TestCaseDetailsPage->>MainContent: Render DetailsEmptyState
    User->>Sidebar: Click "Add Tag" or "Add Description"
    Sidebar->>Sidebar: Trigger onAddTag/onAddDescription callback
    User->>TestCaseDetailsHeader: Use menu actions (duplicate, history, delete)
    TestCaseDetailsHeader->>TestCaseDetailsHeader: Handle menu action callback
Loading

Possibly related PRs

  • reportportal/service-ui#4391: Introduces the initial setup of the TestCaseDetailsPage component and routing, which this PR extends with new UI components and refactors.

Suggested reviewers

  • ViktorSoroka07
  • allaprischepa
  • maria-hambardzumian
  • BlazarQSO

Poem

In the warren of code, new details arise,
Breadcrumbs and headers now sparkle our skies.
Tags and descriptions, with buttons to add,
Empty states smiling, no reason to be sad.
With every new section, the test cases bloom—
A rabbit’s delight in this UI room! 🐇✨

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch feature/edit-test-case
  • 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.

@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.73%. Comparing base (f255cfb) to head (ed34f42).

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

@Guria
Copy link
Contributor Author

Guria commented Jun 11, 2025

@coderabbitai full review

Copy link

coderabbitai bot commented Jun 11, 2025

✅ Actions performed

Full review triggered.

@Guria Guria added the TMS label Jun 11, 2025
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 (2)
app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.scss (1)

18-23: 🛠️ Refactor suggestion

Avoid global CSS overrides when possible.
Applying :global(.width-content) may unintentionally affect other components; consider scoping this workaround within the popover-tools container or targeting a more specific selector until the UI-kit fix lands.

app/src/pages/common/popoverControl/popoverControl.tsx (1)

54-66: ⚠️ Potential issue

label used as React key → collisions possible

label is translated text; two items could share the same string causing duplicate-key warnings.
Use index or a stable id instead.

- {items.map(({ label, icon, className = '', onClick, variant }) => (
-   <li key={label}>
+ {items.map(({ label, icon, className = '', onClick, variant }, idx) => (
+   <li key={idx}>
🧹 Nitpick comments (20)
app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.tsx (1)

17-31: Expose standard HTML props & type the component

InfoBlock currently swallows common div props (id, style, onClick, etc.).
Extending React.HTMLAttributes<HTMLDivElement> keeps it flexible with zero runtime cost.

-interface InfoBlockProps {
-  label: string;
-  className?: string;
-}
+interface InfoBlockProps extends React.HTMLAttributes<HTMLDivElement> {
+  label: string;
+  className?: string;
+}
 
-export const InfoBlock = ({ label, className = '' }: InfoBlockProps) => (
-  <div className={cx('info-block', className)}>
+export const InfoBlock: React.FC<InfoBlockProps> = ({ label, className = '', ...rest }) => (
+  <div className={cx('info-block', className)} {...rest}>
     <span className={cx('info-block__label')}>{label}</span>
   </div>
 );
app/src/common/constants/localization.js (1)

198-201: Ensure translations are updated.
You’ve added a new DUPLICATE key—run your message extraction and update all language packs to include this string.

app/src/pages/inside/testCaseLibraryPage/emptyState/emptyStateLibrary.tsx (2)

35-45: Memoise handleCreateTestCase to avoid needless re-renders
Each render creates a new callback which will trigger prop inequality in the EmptyStatePage buttons array. Wrap it in useCallback.

-import { useDispatch, useSelector } from 'react-redux';
+import { useDispatch, useSelector } from 'react-redux';
+import { useCallback } from 'react';
@@
-  const handleCreateTestCase = () => {
+  const handleCreateTestCase = useCallback(() => {
     dispatch({
       type: TEST_CASE_DETAILS_PAGE,
       payload: {
         // temporary - will be replaced with actual ID generation
         testCaseSlug: 'new',
         organizationSlug,
         projectSlug,
       },
     });
-  };
+  }, [dispatch, organizationSlug, projectSlug]);

47-53: Minor perf nit – derive benefits once

benefits is recomputed on every render. Not critical, but wrapping the map in useMemo would prevent unnecessary work/XSS parsing.

app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.jsx (1)

102-103: Stale CSS-module key: popover-tools no longer exists

SCSS cleanup removed the .popover-tools rule.
Referencing a non-existent key in a CSS-module returns undefined, so the resulting className is an empty string and the attribute is useless.

-    className={cx('popover-tools')}
+    // className removed – wrapper inherits PopoverControl defaults
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/messages.ts (1)

36-40: Rename the “id” message key to avoid self-shadowing

Using id as an object key inside defineMessages is legal but highly confusing because each message descriptor also contains an id field.
Consider renaming the outer key to idLabel (or similar) for clarity:

-  id: {
+  idLabel: {
     id: 'EditTestCasePage.id',
     defaultMessage: 'ID:',
   },
app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.tsx (2)

24-29: Allow ReactNode for title to support localisation markup

title is typed as string; many translated headers are FormattedMessage components (ReactNode).
Changing the prop to ReactNode provides flexibility with zero breaking impact:

-  title: string;
+  title: ReactNode;

38-45: Semantic HTML / a11y

A <h3> will be rendered no matter where this component is nested. If the consumer places it inside another <h3> you’ll get heading-level skips.
Consider accepting a headingLevel?: 2|3|4|... prop or delegating the heading tag to the parent.

app/src/pages/common/breadcrumbs/breadcrumbs.tsx (1)

41-57: Accessibility: use <nav aria-label="Breadcrumb">

Wrapping the breadcrumbs in a <nav> element with an aria-label improves assistive-tech navigation.

-  return (
-    <div className={cx('breadcrumbs', className)}>
+  return (
+    <nav aria-label="Breadcrumb" className={cx('breadcrumbs', className)}>
       ...
-    </div>
+    </nav>
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.scss (1)

25-27: Global override belongs in a shared util, not a local component stylesheet

Overriding .width-content here couples unrelated styles to this component and will be hard to track once the workaround is removed. Prefer moving such cross-cutting overrides to a dedicated global “workarounds” (or ui-kit-patches) file and add a TODO referencing the upstream issue.

app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.jsx (1)

37-38: Cache breadcrumbItems with useMemo

The array is recreated on every render, forcing unnecessary re-renders of Breadcrumbs.

-import { Breadcrumbs } from 'pages/common';
+import React, { useMemo } from 'react';
+import { Breadcrumbs } from 'pages/common';
...
-  const breadcrumbItems = [formatMessage(messages.productVersions), productVersionId];
+  const breadcrumbItems = useMemo(
+    () => [formatMessage(messages.productVersions), productVersionId],
+    [formatMessage, productVersionId],
+  );
app/src/pages/inside/testCaseLibraryPage/editableTagsSection/editableTagsSection.tsx (1)

34-37: Add an explicit aria-label for accessibility

Icon-only buttons rely on screen-reader text inside. Because the Plus icon conveys no textual meaning, add aria-label (or title) to the Button.

-    <Button onClick={onAddTag} variant="text">
+    <Button onClick={onAddTag} variant="text" aria-label={formatMessage(COMMON_LOCALE_KEYS.ADD)}>
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.tsx (1)

58-62: Nested ScrollWrappers may lead to double scroll bars

There is an outer wrapper for the whole page and another inside the main-content area. Unless required for independent scrolling regions, one wrapper should be enough.

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

30-52: Minor: memoise headerControl to avoid needless re-creates

headerControl is re-computed on every render even though it is purely static.
Not critical here, but a quick useMemo keeps the component flicker-free if you later add animations.

const headerControl = useMemo(
  () => (
    <Button onClick={onAddDescription} variant="text">
      <PlusIcon />
      {formatMessage(COMMON_LOCALE_KEYS.ADD)}
    </Button>
  ),
  [onAddDescription, formatMessage],
);
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.scss (2)

17-37: Fixed 360 px sidebar may hurt smaller viewports

The sidebar is hard-coded to 360px. On narrow laptops (<1280 px) this leaves <900 px for content and may trigger horizontal scroll.

Consider switching to a css-var or minmax(280px, 360px) to let the sidebar shrink gracefully.

-    / 360px 1fr;
+    / minmax(280px, 360px) 1fr;

39-46: Nit: 1 px margin used as layout fix

margin-left: 1px; is commonly added to hide the right border overlap, but it propagates into nested flex math.

Safer alternative: move the right border from the sidebar to a pseudo-element or apply border-left to .page__main-content.

app/src/pages/common/popoverControl/popoverControl.tsx (2)

58-61: Edge-case: class name produced when variant is undefined

Template literal is evaluated even when variant is falsy, yielding
popover-control__item-button--undefined (later stripped by classNames but still odd).

- { [`popover-control__item-button--${variant}`]: !!variant }
+ { ...(variant ? { [`popover-control__item-button--${variant}`]: true } : {}) }

26-32: Consider widening variant union for future-proofing

Limiting to 'danger' forces another breaking change when we need e.g. 'success'.
You can type-safe yet flexible variants:

type ButtonVariant = 'danger' | 'warning' | 'info';
variant?: ButtonVariant;
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.tsx (2)

74-76: Accessibility: add aria-label to the copy icon

Screen-reader users have no context for the duplicate icon.

<CopyToClipboard text={testCase.id} className={cx('header__copy')}>
-  {Parser(IconDuplicate)}
+  {Parser(IconDuplicate)}
+  <span className="visually-hidden">{formatMessage(COMMON_LOCALE_KEYS.COPY)}</span>
</CopyToClipboard>

56-57: Memoise breadcrumbItems

Re-allocating the array on every render causes needless re-renders of Breadcrumbs.

const breadcrumbItems = useMemo(
  () => [formatMessage(messages.testCaseLibraryBreadcrumb), testCase.name],
  [formatMessage, testCase.name],
);
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d4b48df and 5c6e536.

📒 Files selected for processing (35)
  • app/src/common/constants/localization.js (1 hunks)
  • app/src/pages/common/breadcrumbs/breadcrumbs.scss (1 hunks)
  • app/src/pages/common/breadcrumbs/breadcrumbs.tsx (1 hunks)
  • app/src/pages/common/breadcrumbs/index.ts (1 hunks)
  • app/src/pages/common/index.ts (2 hunks)
  • app/src/pages/common/popoverControl/popoverControl.scss (1 hunks)
  • app/src/pages/common/popoverControl/popoverControl.tsx (2 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.jsx (1 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.scss (1 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.jsx (2 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/editableDescriptionSection.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableTagsSection/editableTagsSection.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableTagsSection/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/emptyStateDetails.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/emptyStateLibrary.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/messages.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/messages.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/messages.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.tsx (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.scss (2 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.tsx (2 hunks)
  • app/src/types.d.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (5)
app/src/pages/common/breadcrumbs/breadcrumbs.tsx (2)
app/src/pages/common/breadcrumbs/index.ts (1)
  • Breadcrumbs (17-17)
app/src/pages/common/index.ts (1)
  • Breadcrumbs (19-19)
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/messages.ts (1)
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/messages.ts (1)
  • messages (19-36)
app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/editableDescriptionSection.tsx (4)
app/src/common/constants/localization.js (2)
  • COMMON_LOCALE_KEYS (25-322)
  • COMMON_LOCALE_KEYS (25-322)
app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.tsx (1)
  • SectionWithHeader (31-46)
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/messages.ts (1)
  • messages (19-36)
app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.tsx (1)
  • InfoBlock (27-31)
app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.tsx (1)
app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/index.ts (1)
  • SectionWithHeader (17-17)
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.tsx (4)
app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/messages.ts (1)
  • messages (19-44)
app/src/pages/common/breadcrumbs/breadcrumbs.tsx (1)
  • Breadcrumbs (36-58)
app/src/pages/common/popoverControl/popoverControl.tsx (1)
  • PopoverControl (42-74)
app/src/common/constants/localization.js (2)
  • COMMON_LOCALE_KEYS (25-322)
  • COMMON_LOCALE_KEYS (25-322)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Call feature Docker build / Build and export to AWS ECR
🔇 Additional comments (22)
app/src/pages/common/popoverControl/popoverControl.scss (1)

44-52: 👍 Consistent “danger” variant styling added

Clean BEM-style modifier, variables reused, hover/focus states covered. Looks good.

app/src/pages/inside/testCaseLibraryPage/emptyState/messages.ts (1)

56-68: Message IDs out of namespace – confirm placement

All other keys in this file follow TestCaseLibraryPage.*, but the three new entries use EditTestCasePage.*.
If these strings truly belong to a different page, consider moving them to that page’s messages file to avoid accidental bundle bloat and easier grep-ability.

app/src/pages/common/index.ts (1)

17-20: Export list updated – check tree-shaking side-effects

Adding Breadcrumbs here is correct, just ensure the new component re-export (./breadcrumbs/index.ts) is barrel-safe (no side-effects) so that unused locales don’t get bundled inadvertently.

app/src/pages/common/breadcrumbs/index.ts (1)

17-17: Re-export looks good.
This index file correctly re-exports the Breadcrumbs component, enabling simplified imports across the app.

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

1-37: Styles are well-scoped and follow BEM conventions.
The SectionWithHeader stylesheet is comprehensive, uses CSS modules to avoid collisions, and adheres to your naming standards. No issues found.

app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.scss (1)

21-23: Verify breadcrumb spacing with the new component.
Since custom tree-icon and name styles were removed and only margin-bottom: 12px remains, confirm that the new Breadcrumbs component’s native spacing aligns with the design system before shipping.

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

17-17: Barrel file looks good

Single-line re-export is consistent with the new component structure and keeps import paths clean.

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

17-17: Consistent export pattern – LGTM

Maintains the same barrel-export convention as other new sections, aiding discoverability.

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

17-17: Export looks fine

No issues spotted.

app/src/pages/inside/testCaseLibraryPage/emptyState/emptyStateLibrary.tsx (1)

36-44: Placeholder slug could leak to prod

testCaseSlug: 'new' is marked temporary, but if it ships it’ll collide for every new test-case creation. Please ensure this is replaced by a generated UUID / server-side id before merge or guard it behind a feature flag.

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

17-17: Confirm the underlying component’s export form

export { TestCaseDetailsHeader } assumes that testCaseDetailsHeader.tsx contains a named export.
If that file instead uses a default export (export default TestCaseDetailsHeader), consumers will get undefined.

-export { TestCaseDetailsHeader } from './testCaseDetailsHeader';
+// Use the form that matches the implementation file
+export { default as TestCaseDetailsHeader } from './testCaseDetailsHeader';

Double-check the implementation file and align the barrel export accordingly.

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

17-17: Verify barrel export direction

Same caution as above: ensure the underlying component is exported as a named export; otherwise switch to default as EditableDescriptionSection.

app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.jsx (2)

109-112: Ensure PopoverControl supports variant: "danger"

The new variant prop will only style the delete action if the PopoverControl component passes it through to the UI-kit Button (or adds its own styling).
If that support was not added in the same PR, the prop is silently ignored.

Please confirm PopoverControl handles the variant field for menu items; otherwise the button will render with default styling and we lose the intended visual warning.


116-118: adjustWidthOn="content" is UI-kit-specific – confirm compatibility

@reportportal/ui-kit’s Button did not expose an adjustWidthOn prop in earlier versions. Passing an unknown prop will be forwarded to the DOM, causing a React warning.

Verify that the upgraded UI-kit version indeed introduces this prop; if not, replace with the previous CSS workaround.

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

26-29: Good consolidation of header styling

Switching to CSS variables and adding a bottom border improves consistency with other pages.

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

26-32: Verify that $FONT-ROBOTO-REGULAR is globally available

The stylesheet references the Sass variable $FONT-ROBOTO-REGULAR, but no local import is made. If this file is compiled in isolation (e.g., via CSS-Modules that don’t share the global namespace), the build will fail.

Diff suggestion if a local import is required:

+@import 'styles/typography'; // path to the file that defines $FONT-ROBOTO-REGULAR
app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.tsx (1)

41-47: Minor: className prop can be pushed down

You pass className={cx('test-case-library-page__breadcrumb')} into <Breadcrumbs/>.
The component already accepts className, so this is fine; just ensure the SCSS file defines that modifier, otherwise it’s a no-op.
Nothing to change – just a reminder.

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

36-38: Verify that $FONT-* variables are injected automatically

This file relies on $FONT-SEMIBOLD and $FONT-ROBOTO-REGULAR, but no @use / @import is present.
If the build no longer injects global typography variables by default, SASS compilation will fail. Please confirm the loader config or add an explicit import (e.g. @use 'styles/variables/fonts';).

Also applies to: 64-88

app/src/pages/common/breadcrumbs/breadcrumbs.scss (1)

21-23: Same global-variable concern applies here

$FONT-ROBOTO-REGULAR is referenced without an explicit import. Make sure the variable is available in the module scope or add the import.

app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.jsx (1)

41-42: Confirm Breadcrumbs accepts a plain string array

The new component is passed an array of strings, but some breadcrumb APIs expect { title, href } objects. Double-check the prop‐types to avoid runtime warnings.

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

36-41: Confirm that variant="text" is supported by UI-Kit

Most buttons in the codebase use variants such as primary, ghost, etc.
If text is not a valid variant in the currently installed @reportportal/ui-kit, the button will silently fall back to the default style.

-    <Button onClick={onAddDescription} variant="text">
+    <Button onClick={onAddDescription} variant="ghost">  // or another valid variant

Please double-check the available variants in the design system and adjust if necessary.

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

19-36: LGTM – solid message extraction

Message IDs follow the existing EditTestCasePage.* namespace and default strings are concise.

@Guria Guria force-pushed the feature/edit-test-case branch from 9f8fec8 to e1a5122 Compare June 13, 2025 21:24
@ViktorSoroka07
Copy link

ViktorSoroka07 commented Jun 16, 2025

I see that tags and description are collapsible per design. Is it no longer the requirement?

@Guria Guria force-pushed the feature/edit-test-case branch from e1a5122 to a705946 Compare June 16, 2025 10:33
@Guria
Copy link
Contributor Author

Guria commented Jun 16, 2025

@ViktorSoroka07 I've already decomposed, extracted and implemented several tasks here. I think we might need separate task for collapsible

@Guria Guria force-pushed the feature/edit-test-case branch from a705946 to 6c88bab Compare June 17, 2025 14:13
@Guria
Copy link
Contributor Author

Guria commented Jun 17, 2025

@coderabbitai review

Copy link

coderabbitai bot commented Jun 17, 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: 1

🧹 Nitpick comments (2)
app/src/pages/inside/testCaseLibraryPage/emptyState/details/detailsEmptyState.tsx (1)

17-18: Minor: avoid misleading import alias

html-react-parser exports a plain function; importing it as Parser (PascalCase) suggests a constructor/class.
Consider:

-import Parser from 'html-react-parser';
+import parse from 'html-react-parser';
…
       description={parse(formatMessage(messages.scenarioDescription))}
app/src/pages/inside/testCaseLibraryPage/emptyState/mainPage/mainPageEmptyState.tsx (1)

31-46: Tiny optimisation: wrap handleCreateTestCase in useCallback

The handler is recreated on every render, causing needless re-renders of children receiving it as a prop (e.g., EmptyStatePage). Not critical but easy to tidy up.

-  const handleCreateTestCase = () => {
+  const handleCreateTestCase = useCallback(() => {
     dispatch({ … });
-  };
+  }, [dispatch, organizationSlug, projectSlug]);
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 5c6e536 and 6c88bab.

📒 Files selected for processing (30)
  • app/src/common/constants/localization.js (1 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.jsx (2 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.scss (1 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.jsx (2 hunks)
  • app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/editableDescriptionSection.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableTagsSection/editableTagsSection.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/editableTagsSection/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/details/detailsEmptyState.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/details/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/mainPage/mainPageEmptyState.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/emptyState/messages.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/messages.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/index.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/messages.ts (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.scss (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.tsx (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.scss (2 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.tsx (2 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseList/priorityIcon/priorityIcon.tsx (1 hunks)
  • app/src/pages/inside/testCaseLibraryPage/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (9)
  • app/src/pages/inside/testCaseLibraryPage/testCaseList/testCaseExecutionCell/testCaseExecutionCell.tsx
  • app/src/pages/inside/testCaseLibraryPage/testCaseList/priorityIcon/priorityIcon.tsx
  • app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.jsx
  • app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/index.ts
  • app/src/pages/inside/testCaseLibraryPage/emptyState/details/index.ts
  • app/src/common/constants/localization.js
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.scss
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/index.ts
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.tsx
🚧 Files skipped from review as they are similar to previous changes (19)
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.scss
  • app/src/pages/inside/productVersionPage/productVersionHeader/popoverTools/popoverTools.scss
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/index.ts
  • app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.scss
  • app/src/pages/inside/testCaseLibraryPage/editableTagsSection/index.ts
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/index.ts
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.tsx
  • app/src/pages/inside/testCaseLibraryPage/editableDescriptionSection/editableDescriptionSection.tsx
  • app/src/pages/inside/testCaseLibraryPage/sectionWithHeader/sectionWithHeader.tsx
  • app/src/pages/inside/productVersionPage/productVersionHeader/productVersionHeader.jsx
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/messages.ts
  • app/src/pages/inside/testCaseLibraryPage/editableTagsSection/editableTagsSection.tsx
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsPage.scss
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.tsx
  • app/src/pages/inside/testCaseLibraryPage/emptyState/messages.ts
  • app/src/pages/inside/testCaseLibraryPage/infoBlock/infoBlock.tsx
  • app/src/pages/inside/testCaseLibraryPage/testCaseLibraryPage.scss
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/testCaseDetailsHeader/testCaseDetailsHeader.scss
  • app/src/pages/inside/testCaseLibraryPage/testCaseDetailsPage/messages.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/src/pages/inside/testCaseLibraryPage/emptyState/details/detailsEmptyState.tsx (2)
app/src/pages/inside/testCaseLibraryPage/emptyState/details/index.ts (1)
  • DetailsEmptyState (17-17)
app/src/pages/inside/testCaseLibraryPage/emptyState/messages.ts (1)
  • messages (19-78)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Call feature Docker build / Build and export to AWS ECR
  • GitHub Check: build (20)
🔇 Additional comments (1)
app/src/pages/inside/testCaseLibraryPage/emptyState/mainPage/mainPageEmptyState.tsx (1)

36-45: Redirect → plain dispatch changes browser-history behaviour; confirm this is intended

redirect(TEST_CASE_DETAILS_PAGE, …) performed a history .replace; the new plain action will push a new entry.
If users navigate back they’ll now return to the empty-state page instead of the previous screen.
Verify the UX requirement; if replacement is still desired dispatch an action with meta: { method: 'replace' } (redux-first-router convention) or revert to redirect.

-  dispatch({
+  dispatch({
     type: TEST_CASE_DETAILS_PAGE,
     payload: { … },
+    // meta: { method: 'replace' }, // ← optional: mimic previous behaviour
   });

@Guria Guria force-pushed the feature/edit-test-case branch from 6c88bab to ed34f42 Compare June 17, 2025 14:49
Copy link

@Guria Guria merged commit 7e4f876 into feature/test-library Jun 17, 2025
9 checks passed
@Guria Guria deleted the feature/edit-test-case branch June 17, 2025 15:15
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.

4 participants