Initial UI tests#4794
Conversation
* Initial UI tests * Move to shared mocks * Fix failing tests * fix costs tag * fix costs test failures * fix(ui): resolve test failures in App.test.tsx - Updated the MSAL mock in `App.test.tsx` to use a class-based mock, resolving the `TypeError: ... is not a constructor` error. - Wrapped asynchronous operations in `act()` in `ConfirmCopyUrlToClipboard.test.tsx`, `ConfirmDisableEnableResource.test.tsx`, `GenericErrorBoundary.test.tsx`, and `SecuredByRole.test.tsx` to fix warnings and ensure proper state updates. * fix(ui): resolve test failures in App.test.tsx - Updated the MSAL mock in `App.test.tsx` to use a class-based mock, resolving the `TypeError: ... is not a constructor` error. - Wrapped asynchronous operations in `act()` in `ResourceCard.test.tsx` to fix warnings and ensure proper state updates. * fix(ui): resolve test failures and act warnings - Updated the MSAL mock in `App.test.tsx` to use a class-based mock, resolving the `TypeError: ... is not a constructor` error. - Wrapped asynchronous operations in `act()` in `ResourceCard.test.tsx`, `ExceptionLayout.test.tsx`, and `ConfirmDeleteResource.test.tsx` to fix warnings and ensure proper state updates. * fix tests * fix warnings --------- Co-authored-by: Marcus Robinson <marrobi@microsoft.com> Co-authored-by: James Griffin <me@JamesGriff.in> Co-authored-by: James Chapman <james.chapman@necsu.onmicrosoft.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Unit Test Results241 tests 241 ✅ 26s ⏱️ Results for commit 91af3fb. ♻️ This comment has been updated with latest results. |
|
Hi @tamirkamara I've added the fixes for the super-linter issues in to this branch. We could update eslint to flag more stuff like use of "any" as an example if we want to in a separate PR. example eslint https://github.com/JC-wk/AzureTRE/blob/eslint/ui/app/eslint.config.js |
|
/test-force-approve UI Tests |
|
🤖 pr-bot 🤖 ✅ Marking tests as complete (for commit 455e4ff) (in response to this comment from @marrobi) |
|
/test-force-approve 9456dba |
|
🤖 pr-bot 🤖 ✅ Marking tests as complete (for commit 9456dba) (in response to this comment from @marrobi) |
|
/test-force-approve 91af3fb |
|
🤖 pr-bot 🤖 ✅ Marking tests as complete (for commit 91af3fb) (in response to this comment from @marrobi) |
Resolves #4785 #3869
What is being addressed
There is currently no testing of the TRE UI
Testing showed a couple of ui issues which have also been fixed
How is this addressed