test: add unit and integration tests for application detail page#1137
test: add unit and integration tests for application detail page#1137iamitprakash merged 4 commits intofeat/application-detailfrom
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughIntroduces a new application detail view with six reusable UI components (DetailHeader, FeedbackCard, InfoCard, SocialLinkPill, StatusBadge) for rendering applicant profiles. Updates the detail route, controller, and template to fetch and display application data with admin-specific UI variants. Includes constants for status/social mappings and comprehensive unit tests. Changes
Sequence DiagramsequenceDiagram
participant Client
participant Route
participant API
participant Controller
participant Template
Client->>Route: Navigate to /applications/:id
Route->>Route: model()
Route->>API: GET /self/user/profile
API-->>Route: currentUser data
Route->>API: GET /applications/:id
API-->>Route: application data
Route->>Route: Return { application, currentUser }
Route->>Controller: Pass model
Controller->>Controller: Compute isAdmin, canAccessApplication
Controller->>Controller: Derive aboutYouSections, hasFeedback
Template->>Template: Render DetailHeader (if canAccessApplication)
Template->>Template: Render admin messaging (if isAdmin)
Template->>Template: Render InfoCard + FeedbackCard sections
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying www-rds with
|
| Latest commit: |
9853db0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a2d785c6.www-rds.pages.dev |
| Branch Preview URL: | https://test-application-detail.www-rds.pages.dev |
85a3d59 to
2aa61dd
Compare
7e85e38 to
8e0d33f
Compare
041ac8d to
9853db0
Compare
* feat: add application detail page * refactor: remove unused getters, simplify info card section * fix: incorrect usage of lastNudge and invalid linkedin url * test: add unit and integration tests for application detail page (#1137) * test: add unit tests for routes and controllers for detail page * test: add integration tests for application components * fix: add more expectation and cleanup tests * refactor: use constants for applications data
Date: 19-01-26
Developer Name: @MayankBansal12
Issue Ticket Number:-
Description:
Feat PR: feat: add application detail page #1130
Is Under Feature Flag
Database changes
Breaking changes (If your feature is breaking/missing something please mention pending tickets)
Is Development Tested?
Tested in staging?
Add relevant Screenshot below ( e.g test coverage etc. )
tests