-
Notifications
You must be signed in to change notification settings - Fork 61
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
feat(new-primary-school): Add mock users for testing application hotfix #17220
Conversation
WalkthroughThe pull request modifies the Changes
Sequence DiagramsequenceDiagram
participant Service as NewPrimarySchoolService
participant Environment as Environment Check
participant NationalRegistry as NationalRegistryService
participant MockData as Mocked Data Provider
Service->>Environment: Check if running in production
alt Not in Production
Service->>MockData: Retrieve mocked children data
else In Production
Service->>NationalRegistry: Fetch children data
end
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
75cfb82
to
bb0ad16
Compare
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.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (2)
libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school-mock-users.ts (2)
16-16
: Fix inconsistent naming with trailing spacesThere are trailing spaces in the following names:
- 'Stúfur Maack '
- 'Bína Maack '
- fullName: 'Stúfur Maack ', + fullName: 'Stúfur Maack', - fullName: 'Bína Maack ', + fullName: 'Bína Maack',Also applies to: 34-34
1-56
: Add documentation for test scenariosPlease add JSDoc comments explaining:
- The purpose of each mock user
- The test scenarios they cover
- The significance of different gender codes used (2,3,4)
Example:
/** * Mock users for testing new primary school application scenarios. * Each key represents a parent's national ID with their associated children. * * Test scenarios covered: * - Single child with both parents * - Multiple children with different custody arrangements * - etc. */ export const mockedUsers: Record<string, NationalRegistryPerson[]> = {
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
libs/api/domains/national-registry-x-road/src/index.ts
(1 hunks)libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school-mock-users.ts
(1 hunks)libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts
(2 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
libs/api/domains/national-registry-x-road/src/index.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school-mock-users.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts (1)
Pattern libs/**/*
: "Confirm that the code adheres to the following:
- Reusability of components and hooks across different NextJS apps.
- TypeScript usage for defining props and exporting types.
- Effective tree-shaking and bundling practices."
📓 Learnings (1)
libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts (1)
Learnt from: birkirkristmunds
PR: island-is/island.is#16096
File: libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts:0-0
Timestamp: 2024-11-12T15:15:11.835Z
Learning: In the TypeScript service `NewPrimarySchoolService` in `libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts`, the `validChildren` array in the `getChildren` method is used for developing and testing purposes.
🔇 Additional comments (1)
libs/api/domains/national-registry-x-road/src/index.ts (1)
3-3
: LGTM! Export follows TypeScript best practices
The export of NationalRegistryPerson
model enhances reusability across the application, which aligns with the coding guidelines for library modules.
...te-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school-mock-users.ts
Outdated
Show resolved
Hide resolved
...plate-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #17220 +/- ##
==========================================
- Coverage 35.73% 35.72% -0.01%
==========================================
Files 6937 6937
Lines 148307 148299 -8
Branches 42327 42370 +43
==========================================
- Hits 52998 52983 -15
- Misses 95309 95316 +7 Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 21 Total Test Services: 0 Failed, 20 Passed Test ServicesThis report shows up to 10 services
🔻 Code Coverage Decreases vs Default Branch (1)
|
...plate-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts
Show resolved
Hide resolved
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.
LGTM!
…ix (#17220) * feat(new-primary-school): Add mock users for testing application * remove console log * Removed mock user file --------- Co-authored-by: hfhelgason <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Hotfix: Mock users for new primary school application testing
Attach a link to issue if relevant
What
Specify what you're trying to achieve
Why
Specify why you need to achieve this
Screenshots / Gifs
Attach Screenshots / Gifs to help reviewers understand the scope of the pull request
Checklist:
Summary by CodeRabbit