[UI-REWRITE]: Improve unit test coverage for React UI client to 95% and remove dead code#5561
[UI-REWRITE]: Improve unit test coverage for React UI client to 95% and remove dead code#5561prince3235 wants to merge 7 commits into
Conversation
1f17a60 to
2dc5529
Compare
937acee to
e137524
Compare
|
@prince3235 - can you please rebase your branch and make sure that these are your changes only? |
0f8c37e to
c36a878
Compare
marekdano
left a comment
There was a problem hiding this comment.
@prince3235 - thank you for your PR and the work on improving our unit tests!!!
Can you look at
-
The files related to coverage should not be committed.
clean_coverage.txt,clean_table.txtandcoverage_table.txt -
All lines with
{/* v8 ignore next 8 */}should be removed! -
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 | |||
There was a problem hiding this comment.
This file should not be committed. Please remove it!
| @@ -0,0 +1,740 @@ | |||
| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | |||
There was a problem hiding this comment.
This file should not be committed. Please remove it!
| @@ -0,0 +1,740 @@ | |||
| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s | |||
There was a problem hiding this comment.
This file should not be committed. Please remove it!
| @@ -0,0 +1,202 @@ | |||
| [ | |||
There was a problem hiding this comment.
This file should not be committed. Please remove it!
| @@ -0,0 +1,202 @@ | |||
| [ | |||
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
We expect no changes in the component.
| @@ -0,0 +1,56 @@ | |||
| export interface ResourceRead { | |||
There was a problem hiding this comment.
This file should not be committed. generated type files are "gitignore".
| export { SUPPORTED_LOCALES } from "./types"; | ||
| export type { SupportedLocale, LocaleMessages } from "./types"; |
| GatewayRead, | ||
| CursorPaginatedGatewaysResponse, | ||
| BodyCreateResourceV1ResourcesPost, | ||
| BodyCreateResourceResourcesPost, |
There was a problem hiding this comment.
Is there a reason to replace the type?
|
@prince3235 - Are you still interested in working on this PR? |
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>
c36a878 to
52b15ec
Compare
…errors Signed-off-by: Marek Dano <Marek.Dano@ibm.com>
Fixes #4764. Increased test coverage to >95% for UI client and removed dead code.