input-output-hk / dapps-certification-web

Certification as a service for the Cardano dApps platform
Apache License 2.0
5 stars 0 forks source link

PLT-9600 #comment test:show wallet address #75

Closed KJES4 closed 5 months ago

KJES4 commented 6 months ago

Pull request template

Description

Added a simple unit test to confirm if the wallet address shows up in the appbar as expected. PR implements https://input-output.atlassian.net/browse/PLT-9600 Link to subtask for PR review https://input-output.atlassian.net/browse/PLT-9696

Checklist

Summary by CodeRabbit

coderabbitai[bot] commented 6 months ago

Walkthrough

The recent changes encompass upgrading project dependencies, boosting code coverage metrics, and enhancing functionality. Highlights include an increase in project metrics and dependency updates across various files. A new test case now validates the rendering of the wallet address in the AppBar component for logged-in users. Moreover, detailed profile information fields have been expanded in profile.slice.ts, with the addition of profileInitialState, while walletConnectionInitialState has been exported in walletConnection.slice.ts.

Changes

Files Change Summary
README.md, package-lock.json, package.json Updated dependencies, increased project metrics, and added @babel/preset-typescript to devDependencies.
src/pages/session/components/AppBar.test.tsx Introduced a test case for the AppBar component to display the wallet address for logged-in users.
src/store/slices/profile.slice.ts, walletConnection.slice.ts Expanded profile information fields in profile.slice.ts and added profileInitialState. Added walletConnectionInitialState export in walletConnection.slice.ts.

Recent Review Status **Configuration used: .coderabbit.yaml**
Commits Files that changed from the base of the PR and between 42fe18934c1f3524c3a98a6523cc8af992c71b25 and 4aa38b0a694224788ba0624cc226405a58ac7fdf.
Files selected for processing (1) * src/store/slices/profile.slice.ts (1 hunks)
Additional comments not posted (5)
src/store/slices/profile.slice.ts (5)
`130-130`: Exporting `initialState` as `profileInitialState` enhances modularity and testability. --- `126-134`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-131] Consider using TypeScript's `Partial` or `Readonly` utility types for `UserProfile` and `IProfile` interfaces to enforce stricter type checks or immutability where appropriate. --- `126-134`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-131] Ensure consistent error handling in async thunks. Some thunks reject with `null`, while others with a string message or error response data. Standardizing error handling can improve maintainability. --- `126-134`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-131] Review the usage of `any` type for `selectedUser` and `userSubscription` in `ProfileState`. Using more specific types can enhance type safety and code clarity. --- `126-134`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-131] Consider abstracting repetitive fetch request logic in thunks to a utility function to reduce code duplication and improve maintainability.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
---
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - 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 generate unit testing code for this file.` - `@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 generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` 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 as PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger a review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configration 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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
github-actions[bot] commented 6 months ago

Coverage Report

Summary

Lines Statements Branches Functions
Coverage: 6%
6.38% (149/2333) 1.42% (19/1338) 4.45% (22/494)

JUnit

Tests Skipped Failures Errors Time
6 0 :zzz: 0 :x: 0 :fire: 18.251s :stopwatch:
Coverage (6%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files6.381.424.456.07 
src010000 
   index.tsx0100002–78
src/app0000 
   App.tsx00001–136
src/components/Avatar90.940100100 
   index.tsx90.94010010014–24
src/components/CertificationMetadataForm0000 
   index.tsx00001–177
src/components/CertificationMetadataForm/components0000 
   AuditReportForm.tsx0100003–66
   FeedbackModal.tsx00003–44
   ReportScriptForm.tsx00001–158
   ReportScriptFormConfirmModal.tsx0100003–31
src/components/CreateCertificate0000 
   CreateCertificate.tsx00001–196
src/components/CustomSwitch0000 
   CustomSwitch.tsx00001–53
src/components/LogsView0000 
   LogsView.tsx00001–107
   LogsViewEntry.tsx0100001–15
src/components/PaymentConfirmation0000 
   PaymentDetailsVerification.tsx00002–71
src/components/ProgressCard0000 
   CircularProgressBar.tsx00001–40
   ProgressCard.tsx00001–44
src/components/ReconnectWallet010000 
   ReconnectWallet.tsx0100001–31
src/components/RepoAccessStatus0000 
   RepoAccessStatus.tsx00002–28
src/components/Snackbar0000 
   index.tsx00001–56
src/components/StatusIcon0000 
   StatusIcon.tsx00004–18
src/components/Table0000 
   Table.tsx00001–216
src/components/Table/components/ColViz0000 
   ColViz.tsx00001–112
src/components/charts/PieChart0000 
   PieChart.tsx00002–32
src/compositions/InputGroup0000 
   index.tsx00003–35
src/compositions/InputGroup/components0000 
   Container.tsx00003–19
   Input.tsx00003–59
src/compositions/Timeline010000 
   Timeline.tsx0100003–23
src/compositions/Timeline/components/TimelineItem12.38009.41 
   TimelineItem.tsx00003–70
   timeline.helper.tsx16.040011.7620, 32, 36–57, 64–74, 79–142
src/pages/certification21.950016.16 
   Certification.helper.tsx27.830020.5195–100, 104–112, 116–128, 135, 145, 149–150, 154, 158–162, 167–168, 173–174, 183–227
   Certification.tsx00002–81
src/pages/certification/certification-result0000 
   CertificationResult.tsx00001–153
   FullReportTable.tsx00001–61
   fullReportTable.helper.tsx00001–126
src/pages/certification/components0000 
   FailedStatus.tsx00001–41
   FileCoverageContainer.tsx00002–96
   ResultContainer.tsx00002–114
   SuccessCard.tsx00001–89
   UnitTestFailureCard.tsx00001–35
src/pages/certification/components/AuditorRunTestForm0000 
   AuditorRunTestForm.tsx00001–312
src/pages/certification/components/DownloadResult010000 
   DownloadResult.tsx0100001–20
src/pages/certification/components/TimelineView0000 
   TimelineView.tsx00001–235
src/pages/home0000 
   index.tsx00001–195
src/pages/landing0000 
   index.tsx00001–82
src/pages/landing/components48.3819.3546.4247.95 
   ConnectSection.tsx76505073.6846, 70–71, 75–76, 80, 85–94, 125–129
   RegisterModal.tsx00003–43
   RegisterSection.tsx00001–160
   SubscriptionSection.tsx100100100100 
src/pages/metrics0000 
   index.tsx00001–112
src/pages/metrics/components0000 
   AuditorReportsChart.tsx00002–73
   MetricWidget.tsx0100003–37
   RunTimesChart.tsx00002–78
   SubscriptionsChart.tsx0100002–59
src/pages/profile0000 
   index.tsx00001–103
src/pages/reportUpload010000 
   index.tsx0100003–19
src/pages/session0000 
   index.tsx00001–54
src/pages/session/components29.262.715.3829.41 
   AppBar.tsx88.885057.1486.9525, 29, 33
   AppLayout.tsx00002–44
   NavBar.tsx00002–115
src/pages/support-commands0000 
   config.tsx010010001–72
   index.tsx00001–177
src/pages/support-commands/components0000 
   Card.tsx00001–32
   DeleteUserModal.tsx0100003–60
   UserDetailsModal.tsx00001–112
src/pages/support-commands/details0000 
   index.tsx00001–200
src/pages/testingHistory010000 
   index.tsx0100001–37
src/pages/testingHistory/components0000 
   AppTable.tsx00001–269
   HistoryContainer.tsx00001–64
src/utils10080100100 
   test-utils.tsx1008010010022