-
Notifications
You must be signed in to change notification settings - Fork 175
Initial UI tests #4794
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
base: main
Are you sure you want to change the base?
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 <[email protected]> Co-authored-by: James Griffin <[email protected]> Co-authored-by: James Chapman <[email protected]> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Unit Test Results241 tests 241 ✅ 30s ⏱️ Results for commit 2a9436b. ♻️ 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 2 new workflows are similar to the existing ones. Can't this be done in the existing workflow that does unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'll give it a try now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tamirkamara I have merged it in now, do you think the coverage report will be useful, or happy to remove it if not.
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