Closed KJES4 closed 5 months ago
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
.
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 . |
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.
Lines | Statements | Branches | Functions |
---|---|---|---|
6.38% (149/2333) | 1.42% (19/1338) | 4.45% (22/494) |
Tests | Skipped | Failures | Errors | Time |
---|---|---|---|---|
6 | 0 :zzz: | 0 :x: | 0 :fire: | 18.251s :stopwatch: |
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s |
---|---|---|---|---|---|
All files | 6.38 | 1.42 | 4.45 | 6.07 | |
src | 0 | 100 | 0 | 0 | |
index.tsx | 0 | 100 | 0 | 0 | 2–78 |
src/app | 0 | 0 | 0 | 0 | |
App.tsx | 0 | 0 | 0 | 0 | 1–136 |
src/components/Avatar | 90.9 | 40 | 100 | 100 | |
index.tsx | 90.9 | 40 | 100 | 100 | 14–24 |
src/components/CertificationMetadataForm | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–177 |
src/components/CertificationMetadataForm/components | 0 | 0 | 0 | 0 | |
AuditReportForm.tsx | 0 | 100 | 0 | 0 | 3–66 |
FeedbackModal.tsx | 0 | 0 | 0 | 0 | 3–44 |
ReportScriptForm.tsx | 0 | 0 | 0 | 0 | 1–158 |
ReportScriptFormConfirmModal.tsx | 0 | 100 | 0 | 0 | 3–31 |
src/components/CreateCertificate | 0 | 0 | 0 | 0 | |
CreateCertificate.tsx | 0 | 0 | 0 | 0 | 1–196 |
src/components/CustomSwitch | 0 | 0 | 0 | 0 | |
CustomSwitch.tsx | 0 | 0 | 0 | 0 | 1–53 |
src/components/LogsView | 0 | 0 | 0 | 0 | |
LogsView.tsx | 0 | 0 | 0 | 0 | 1–107 |
LogsViewEntry.tsx | 0 | 100 | 0 | 0 | 1–15 |
src/components/PaymentConfirmation | 0 | 0 | 0 | 0 | |
PaymentDetailsVerification.tsx | 0 | 0 | 0 | 0 | 2–71 |
src/components/ProgressCard | 0 | 0 | 0 | 0 | |
CircularProgressBar.tsx | 0 | 0 | 0 | 0 | 1–40 |
ProgressCard.tsx | 0 | 0 | 0 | 0 | 1–44 |
src/components/ReconnectWallet | 0 | 100 | 0 | 0 | |
ReconnectWallet.tsx | 0 | 100 | 0 | 0 | 1–31 |
src/components/RepoAccessStatus | 0 | 0 | 0 | 0 | |
RepoAccessStatus.tsx | 0 | 0 | 0 | 0 | 2–28 |
src/components/Snackbar | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–56 |
src/components/StatusIcon | 0 | 0 | 0 | 0 | |
StatusIcon.tsx | 0 | 0 | 0 | 0 | 4–18 |
src/components/Table | 0 | 0 | 0 | 0 | |
Table.tsx | 0 | 0 | 0 | 0 | 1–216 |
src/components/Table/components/ColViz | 0 | 0 | 0 | 0 | |
ColViz.tsx | 0 | 0 | 0 | 0 | 1–112 |
src/components/charts/PieChart | 0 | 0 | 0 | 0 | |
PieChart.tsx | 0 | 0 | 0 | 0 | 2–32 |
src/compositions/InputGroup | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 3–35 |
src/compositions/InputGroup/components | 0 | 0 | 0 | 0 | |
Container.tsx | 0 | 0 | 0 | 0 | 3–19 |
Input.tsx | 0 | 0 | 0 | 0 | 3–59 |
src/compositions/Timeline | 0 | 100 | 0 | 0 | |
Timeline.tsx | 0 | 100 | 0 | 0 | 3–23 |
src/compositions/Timeline/components/TimelineItem | 12.38 | 0 | 0 | 9.41 | |
TimelineItem.tsx | 0 | 0 | 0 | 0 | 3–70 |
timeline.helper.tsx | 16.04 | 0 | 0 | 11.76 | 20, 32, 36–57, 64–74, 79–142 |
src/pages/certification | 21.95 | 0 | 0 | 16.16 | |
Certification.helper.tsx | 27.83 | 0 | 0 | 20.51 | 95–100, 104–112, 116–128, 135, 145, 149–150, 154, 158–162, 167–168, 173–174, 183–227 |
Certification.tsx | 0 | 0 | 0 | 0 | 2–81 |
src/pages/certification/certification-result | 0 | 0 | 0 | 0 | |
CertificationResult.tsx | 0 | 0 | 0 | 0 | 1–153 |
FullReportTable.tsx | 0 | 0 | 0 | 0 | 1–61 |
fullReportTable.helper.tsx | 0 | 0 | 0 | 0 | 1–126 |
src/pages/certification/components | 0 | 0 | 0 | 0 | |
FailedStatus.tsx | 0 | 0 | 0 | 0 | 1–41 |
FileCoverageContainer.tsx | 0 | 0 | 0 | 0 | 2–96 |
ResultContainer.tsx | 0 | 0 | 0 | 0 | 2–114 |
SuccessCard.tsx | 0 | 0 | 0 | 0 | 1–89 |
UnitTestFailureCard.tsx | 0 | 0 | 0 | 0 | 1–35 |
src/pages/certification/components/AuditorRunTestForm | 0 | 0 | 0 | 0 | |
AuditorRunTestForm.tsx | 0 | 0 | 0 | 0 | 1–312 |
src/pages/certification/components/DownloadResult | 0 | 100 | 0 | 0 | |
DownloadResult.tsx | 0 | 100 | 0 | 0 | 1–20 |
src/pages/certification/components/TimelineView | 0 | 0 | 0 | 0 | |
TimelineView.tsx | 0 | 0 | 0 | 0 | 1–235 |
src/pages/home | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–195 |
src/pages/landing | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–82 |
src/pages/landing/components | 48.38 | 19.35 | 46.42 | 47.95 | |
ConnectSection.tsx | 76 | 50 | 50 | 73.68 | 46, 70–71, 75–76, 80, 85–94, 125–129 |
RegisterModal.tsx | 0 | 0 | 0 | 0 | 3–43 |
RegisterSection.tsx | 0 | 0 | 0 | 0 | 1–160 |
SubscriptionSection.tsx | 100 | 100 | 100 | 100 | |
src/pages/metrics | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–112 |
src/pages/metrics/components | 0 | 0 | 0 | 0 | |
AuditorReportsChart.tsx | 0 | 0 | 0 | 0 | 2–73 |
MetricWidget.tsx | 0 | 100 | 0 | 0 | 3–37 |
RunTimesChart.tsx | 0 | 0 | 0 | 0 | 2–78 |
SubscriptionsChart.tsx | 0 | 100 | 0 | 0 | 2–59 |
src/pages/profile | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–103 |
src/pages/reportUpload | 0 | 100 | 0 | 0 | |
index.tsx | 0 | 100 | 0 | 0 | 3–19 |
src/pages/session | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–54 |
src/pages/session/components | 29.26 | 2.7 | 15.38 | 29.41 | |
AppBar.tsx | 88.88 | 50 | 57.14 | 86.95 | 25, 29, 33 |
AppLayout.tsx | 0 | 0 | 0 | 0 | 2–44 |
NavBar.tsx | 0 | 0 | 0 | 0 | 2–115 |
src/pages/support-commands | 0 | 0 | 0 | 0 | |
config.tsx | 0 | 100 | 100 | 0 | 1–72 |
index.tsx | 0 | 0 | 0 | 0 | 1–177 |
src/pages/support-commands/components | 0 | 0 | 0 | 0 | |
Card.tsx | 0 | 0 | 0 | 0 | 1–32 |
DeleteUserModal.tsx | 0 | 100 | 0 | 0 | 3–60 |
UserDetailsModal.tsx | 0 | 0 | 0 | 0 | 1–112 |
src/pages/support-commands/details | 0 | 0 | 0 | 0 | |
index.tsx | 0 | 0 | 0 | 0 | 1–200 |
src/pages/testingHistory | 0 | 100 | 0 | 0 | |
index.tsx | 0 | 100 | 0 | 0 | 1–37 |
src/pages/testingHistory/components | 0 | 0 | 0 | 0 | |
AppTable.tsx | 0 | 0 | 0 | 0 | 1–269 |
HistoryContainer.tsx | 0 | 0 | 0 | 0 | 1–64 |
src/utils | 100 | 80 | 100 | 100 | |
test-utils.tsx | 100 | 80 | 100 | 100 | 22 |
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
Documentation
README.md
.Chores
Tests
AppBar
component correctly displays the wallet address when a user is logged in.