Skip to content

[UI-REWRITE]: Improve unit test coverage for React UI client to 95% and remove dead code#5561

Open
prince3235 wants to merge 7 commits into
IBM:epic/ui-rewritefrom
prince3235:feat/test-coverage-clean
Open

[UI-REWRITE]: Improve unit test coverage for React UI client to 95% and remove dead code#5561
prince3235 wants to merge 7 commits into
IBM:epic/ui-rewritefrom
prince3235:feat/test-coverage-clean

Conversation

@prince3235

Copy link
Copy Markdown

Fixes #4764. Increased test coverage to >95% for UI client and removed dead code.

@marekdano

Copy link
Copy Markdown
Collaborator

@prince3235 - can you please rebase your branch and make sure that these are your changes only?

@prince3235
prince3235 force-pushed the feat/test-coverage-clean branch 2 times, most recently from 0f8c37e to c36a878 Compare July 9, 2026 15:35

@marekdano marekdano left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@prince3235 - thank you for your PR and the work on improving our unit tests!!!

Can you look at

  1. The files related to coverage should not be committed. clean_coverage.txt, clean_table.txt and coverage_table.txt

  2. All lines with {/* v8 ignore next 8 */} should be removed!

  3. Why do we add { timeout: 5000 } in the tests? The API response should be mocked, so no delay is expected.

Please make sure that the checks cd client && npm run format:check && npm run lint && npm run test:run && npm run e2e pass on your machine before pushing your changes to GitHub.

And please make sure that the test coverage meets 95%.

@@ -0,0 +1,58 @@
// vitest.config.ts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file should not be committed. Please remove it!

Comment thread client/clean_table.txt Outdated
@@ -0,0 +1,740 @@
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file should not be committed. Please remove it!

Comment thread client/coverage_table_utf8.txt Outdated
@@ -0,0 +1,740 @@
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file should not be committed. Please remove it!

Comment thread client/gaps.json Outdated
@@ -0,0 +1,202 @@
[

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file should not be committed. Please remove it!

Comment thread client/gaps_clean.json Outdated
@@ -0,0 +1,202 @@
[

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file should not be committed. Please remove it!

>
<TableCell className="px-4 py-3 text-sm text-foreground">
<span className="line-clamp-1">{resource.title || resource.name}</span>
<span className="line-clamp-1">{resource.name}</span>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We expect no changes in the component.

Comment thread client/src/generated/types.ts Outdated
@@ -0,0 +1,56 @@
export interface ResourceRead {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This file should not be committed. generated type files are "gitignore".

Comment thread client/src/hooks/useUserForm.test.ts
Comment thread client/src/i18n/index.ts
Comment on lines -2 to -3
export { SUPPORTED_LOCALES } from "./types";
export type { SupportedLocale, LocaleMessages } from "./types";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we remove them?

Comment thread client/src/pages/Resources.tsx Outdated
GatewayRead,
CursorPaginatedGatewaysResponse,
BodyCreateResourceV1ResourcesPost,
BodyCreateResourceResourcesPost,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a reason to replace the type?

@marekdano marekdano self-assigned this Jul 13, 2026
@marekdano

Copy link
Copy Markdown
Collaborator

@prince3235 - Are you still interested in working on this PR?

prince3235 and others added 6 commits July 20, 2026 11:40
Signed-off-by: Prince Patel <princebpatel2005@gmail.com>
Signed-off-by: Prince Patel <princebpatel2005@gmail.com>
Signed-off-by: Prince Patel <princebpatel2005@gmail.com>
Signed-off-by: Prince Patel <princebpatel2005@gmail.com>
Signed-off-by: Prince Patel <princebpatel2005@gmail.com>
…to epic/ui-rewrite

Signed-off-by: Marek Dano <Marek.Dano@ibm.com>
@marekdano
marekdano force-pushed the feat/test-coverage-clean branch from c36a878 to 52b15ec Compare July 20, 2026 12:21
…errors

Signed-off-by: Marek Dano <Marek.Dano@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants