-
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(j-s): Subpoena PDF #16098
feat(j-s): Subpoena PDF #16098
Conversation
WalkthroughThe changes introduce a new method Changes
Possibly related PRs
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
|
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: 4
Outside diff range and nitpick comments (3)
apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.tsx (1)
Line range hint
75-279
: Approve the changes with a suggestion for refactoring.The changes introduce a new section for displaying subpoena-related information based on the presence of an arraignment date and defendants in the
workingCase
. The rendering logic is clear and thePdfButton
components are configured correctly to enable accessing subpoena PDFs for each defendant.Consider extracting the rendering logic for the subpoena section into a separate component for better readability and maintainability. This will help keep the
IndictmentCaseFilesList
component focused on its primary responsibility and make the code easier to understand and modify in the future.For example, you can create a new component called
SubpoenaSection
and move the rendering logic there:interface SubpoenaSectionProps { workingCase: Case } const SubpoenaSection: FC<SubpoenaSectionProps> = ({ workingCase }) => { const { formatMessage } = useIntl() return ( <Box marginBottom={5}> <Text variant="h4" as="h4" marginBottom={1}> {formatMessage(strings.subpoenaTitle)} </Text> {workingCase.defendants.map((defendant) => ( <Box marginBottom={2} key={`subpoena-${workingCase.id}`}> <PdfButton caseId={workingCase.id} title={formatMessage(strings.subpoenaButtonText, { name: defendant.name, })} pdfType="subpoena" elementId={defendant.id} renderAs="row" /> </Box> ))} </Box> ) }Then, you can use the
SubpoenaSection
component in theIndictmentCaseFilesList
component like this:{showSubpoenaPdf && workingCase.defendants && workingCase.defendants.length > 0 && ( <SubpoenaSection workingCase={workingCase} /> )}This refactoring will make the code more modular and easier to maintain.
apps/judicial-system/backend/src/app/modules/defendant/limitedAccessDefendant.controller.ts (2)
56-56
: Set Content-Disposition Header for PDF ResponseTo ensure that the PDF is correctly handled by the client, consider setting the
Content-Disposition
header. This informs the browser how to display the PDF, either inline or as an attachment.Apply this diff to add the header:
@Get() @Header('Content-Type', 'application/pdf') + @Header('Content-Disposition', 'inline; filename="subpoena.pdf"') @ApiOkResponse({ content: { 'application/pdf': {} }, description: 'Gets the subpoena for a given defendant as a pdf document', })
61-84
: Add Unit Tests forgetSubpoenaPdf
MethodCurrently, there are no unit tests provided for the
getSubpoenaPdf
method. Implementing unit tests will ensure that the method functions as expected and will help catch future regressions.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (7)
- apps/judicial-system/api/src/app/modules/file/limitedAccessFile.controller.ts (3 hunks)
- apps/judicial-system/backend/src/app/modules/case/limitedAccessCase.controller.ts (0 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/defendant.controller.ts (1 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/defendant.module.ts (2 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/limitedAccessDefendant.controller.ts (1 hunks)
- apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.strings.ts (1 hunks)
- apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.tsx (2 hunks)
Files not reviewed due to no reviewable changes (1)
- apps/judicial-system/backend/src/app/modules/case/limitedAccessCase.controller.ts
Additional context used
Path-based instructions (6)
apps/judicial-system/api/src/app/modules/file/limitedAccessFile.controller.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/defendant.controller.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/defendant.module.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/limitedAccessDefendant.controller.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.strings.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.tsx (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
Additional comments not posted (8)
apps/judicial-system/backend/src/app/modules/defendant/defendant.module.ts (2)
15-15
: LGTM!The import statement for the new
LimitedAccessDefendantController
is correctly added, following the proper syntax and naming convention.
27-27
: Verify the impact of the new controller on the API endpoints.The
LimitedAccessDefendantController
is correctly added to theDefendantModule
. This addition is expected to introduce new endpoints or modify existing ones related to limited access for defendants.Please run the following script to verify the impact on the API endpoints:
apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.strings.ts (2)
31-36
: LGTM!The new message definition for
subpoenaTitle
follows the expected structure and conventions. The message ID, default message, and description are appropriate for the intended usage.
37-42
: Looks good!The new message definition for
subpoenaButtonText
is structured correctly and follows the established conventions. The message ID, default message with the{name}
placeholder, and description are suitable for the intended purpose of generating the text for a PDF button to download the subpoena.apps/judicial-system/backend/src/app/modules/defendant/defendant.controller.ts (1)
159-161
: LGTM!The addition of the new roles
prosecutorRule
,prosecutorRepresentativeRule
, andpublicProsecutorStaffRule
to the@RolesRules
decorator for thegetSubpoenaPdf
method is a positive change. It expands the role-based access control, allowing the prosecution side to access the subpoena PDF, which aligns with the PR objective of improving transparency and accessibility of subpoenas for both prosecution and defense.apps/judicial-system/backend/src/app/modules/defendant/limitedAccessDefendant.controller.ts (1)
54-54
: Verify Role-Based Access Control ConfigurationThe
@RolesRules(defenderRule)
decorator applies thedefenderRule
to this route. Ensure that this rule accurately reflects the intended access permissions for defenders accessing subpoenas. Additionally, confirm that thedefenderRule
is correctly defined and imported.Run the following script to verify the
defenderRule
definition:Verification successful
Verification Successful: Role-Based Access Control Correctly Configured
The
defenderRule
is correctly defined in the guards module asUserRole.DEFENDER
and is consistently imported and used across various controllers, including thelimitedAccessDefendant.controller.ts
file. The rule accurately reflects the intended access permissions for defenders, and its usage is verified in multiple test files.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that defenderRule is correctly defined and used. # Test: Search for the definition of defenderRule. # Expect: The defenderRule should be defined with appropriate permissions. rg --type ts --files-with-matches 'defenderRule' | xargs rg 'defenderRule'Length of output: 6168
apps/judicial-system/api/src/app/modules/file/limitedAccessFile.controller.ts (2)
9-9
: Import ofQuery
is appropriateThe added import of
Query
from@nestjs/common
is necessary for handling query parameters in the new method.
23-23
: Import ofSubpoenaType
is appropriateIncluding
SubpoenaType
in the import statement ensures type safety for thesubpoenaType
query parameter.
apps/judicial-system/backend/src/app/modules/defendant/limitedAccessDefendant.controller.ts
Show resolved
Hide resolved
apps/judicial-system/backend/src/app/modules/defendant/limitedAccessDefendant.controller.ts
Show resolved
Hide resolved
apps/judicial-system/backend/src/app/modules/defendant/limitedAccessDefendant.controller.ts
Show resolved
Hide resolved
apps/judicial-system/api/src/app/modules/file/limitedAccessFile.controller.ts
Show resolved
Hide resolved
…ment-case-files-subpoena
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16098 +/- ##
==========================================
- Coverage 36.71% 36.65% -0.07%
==========================================
Files 6761 6749 -12
Lines 139082 138772 -310
Branches 39504 39446 -58
==========================================
- Hits 51059 50860 -199
+ Misses 88023 87912 -111
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 42 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Datadog ReportAll test runs ✅ 9 Total Test Services: 0 Failed, 9 Passed Test Services
🔻 Code Coverage Decreases vs Default Branch (1)
|
apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.tsx
Outdated
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.
Actionable comments posted: 1
Outside diff range and nitpick comments (7)
apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/defendantControllerGuards.spec.ts (1)
13-16
: Improved test structure and readability.The changes to this test case are well-implemented:
- The test name is now more descriptive and accurately reflects its purpose.
- The test structure has been simplified, combining assertions for both guards into a single, concise test case.
- The new implementation is more readable and maintains the same level of test coverage.
These improvements align well with best practices for writing clear and maintainable tests.
Consider adding the following assertions to further enhance the test coverage:
expect(guards[0]).toBe(JwtAuthGuard); expect(guards[1]).toBe(RolesGuard);This would ensure that the guards are applied in the correct order, which can be important for proper authentication and authorization flow.
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdfRolesRules.spec.ts (2)
15-18
: LGTM: Test case is concise and verifies the correct permissions.The test case effectively checks that there's only one rule for accessing the subpoena PDF and that it matches the
defenderRule
. This ensures that only the defender role has the necessary permissions.Consider adding a more descriptive test name to clarify the exact permission being tested:
- it('should give permission to roles', () => { + it('should give permission only to the defender role', () => {
1-19
: LGTM: Overall structure follows best practices.The test file is well-structured, following NextJS and TypeScript best practices. It uses Jest effectively and focuses on a single responsibility. The use of
Reflect.getMetadata
suggests a clean, decorator-based approach for defining role rules.To improve robustness, consider adding a test case to verify the behavior when no rules are present:
it('should handle case with no rules', () => { // Mock Reflect.getMetadata to return undefined or an empty array jest.spyOn(Reflect, 'getMetadata').mockReturnValueOnce([]); const noRules = Reflect.getMetadata( 'roles-rules', LimitedAccessDefendantController.prototype.getSubpoenaPdf, ); expect(noRules).toHaveLength(0); });This additional test would ensure that the system behaves correctly even when no rules are defined.
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/limitedAccessDefendantControllerGuards.spec.ts (1)
16-27
: Test case is comprehensive and well-structured.The test case thoroughly verifies the guard configuration for the
LimitedAccessDefendantController
. It checks both the number of guards and their specific types, which is excellent. The assertions are clear and follow good practices for unit testing.One minor suggestion for improvement:
Consider extracting the expected guard types into an array or object at the beginning of the test. This would make the test more maintainable and easier to update if the guard configuration changes in the future. For example:
it('should have the right guard configuration', () => { const expectedGuards = [ { type: JwtAuthGuard }, { type: RolesGuard }, { type: CaseExistsGuard }, { type: CaseTypeGuard, config: { allowedCaseTypes: indictmentCases } }, { type: CaseReadGuard }, { type: DefendantExistsGuard } ]; expect(guards).toHaveLength(expectedGuards.length); expectedGuards.forEach((expected, index) => { if ('config' in expected) { expect(guards[index]).toBeInstanceOf(expected.type); expect(guards[index]).toEqual(expected.config); } else { expect(new guards[index]()).toBeInstanceOf(expected.type); } }); });This approach makes the test more declarative and easier to maintain.
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdf.spec.ts (3)
15-31
: LGTM: Test suite setup is well-structured.The test suite setup follows Jest best practices, using
beforeEach
to set up the testing environment and mock data. The use ofuuid
for generating unique identifiers is appropriate.Consider extracting the mock data creation (lines 16-20) into a separate function for better readability and reusability. For example:
function createMockData() { const caseId = uuid(); const defendantId = uuid(); return { caseId, defendantId, defendant: { id: defendantId } as Defendant, theCase: { id: caseId } as Case, res: { end: jest.fn() } as unknown as Response, }; }Then, you can use it in your
describe
block:describe('LimitedAccessDefendantController - Get subpoena pdf', () => { const { caseId, defendantId, defendant, theCase, res } = createMockData(); // ... rest of the code });
33-50
: LGTM: givenWhenThen function is well-implemented.The
givenWhenThen
function follows the Given-When-Then pattern, which enhances readability and maintainability. The error handling and asynchronous implementation are appropriate for testing asynchronous operations.Consider adding a
result
property to theThen
interface to capture the successful result of the operation. This would allow for more comprehensive testing of both success and error scenarios. For example:interface Then { error?: Error; result?: any; // Or a more specific type if known } // In the givenWhenThen function: const then: Then = {}; try { then.result = await limitedAccessDefendantController.getSubpoenaPdf( caseId, defendantId, theCase, defendant, res, ); } catch (error) { then.error = error as Error; }This change would allow for more flexible assertions in your test cases.
52-68
: LGTM with suggestions: Test case is well-structured but could be expanded.The test case is clear and follows Jest best practices. The assertions appropriately verify the expected behavior of the
getSubpoenaPdf
method.To improve test coverage and robustness, consider adding the following test cases:
Test error handling:
it('should handle errors when generating PDF', async () => { const error = new Error('PDF generation failed'); mockPdfService.getSubpoenaPdf.mockRejectedValueOnce(error); const { error: thrownError } = await givenWhenThen(); expect(thrownError).toEqual(error); });Test with different input parameters:
it('should call getSubpoenaPdf with correct parameters including optional ones', async () => { const additionalParams = { param1: 'value1', param2: 'value2', param3: 'value3', }; await limitedAccessDefendantController.getSubpoenaPdf( caseId, defendantId, theCase, defendant, res, additionalParams.param1, additionalParams.param2, additionalParams.param3 ); expect(mockPdfService.getSubpoenaPdf).toHaveBeenCalledWith( theCase, defendant, additionalParams.param1, additionalParams.param2, additionalParams.param3 ); });These additional test cases will help ensure that the
getSubpoenaPdf
method handles various scenarios correctly, including error cases and different input parameters.
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (9)
- apps/judicial-system/backend/src/app/modules/defendant/test/createTestingDefendantModule.ts (4 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/defendantControllerGuards.spec.ts (1 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/getSubpoenaPdfGuards.spec.ts (1 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/getSubpoenaPdfRolesRules.spec.ts (2 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdf.spec.ts (1 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdfRolesRules.spec.ts (1 hunks)
- apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/limitedAccessDefendantControllerGuards.spec.ts (1 hunks)
- apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.strings.ts (1 hunks)
- apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.tsx (2 hunks)
Files skipped from review due to trivial changes (1)
- apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/getSubpoenaPdfGuards.spec.ts
Files skipped from review as they are similar to previous changes (2)
- apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.strings.ts
- apps/judicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.tsx
Additional context used
Path-based instructions (6)
apps/judicial-system/backend/src/app/modules/defendant/test/createTestingDefendantModule.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/defendantControllerGuards.spec.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/getSubpoenaPdfRolesRules.spec.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdf.spec.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdfRolesRules.spec.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/limitedAccessDefendantControllerGuards.spec.ts (1)
Pattern
apps/**/*
: "Confirm that the code adheres to the following:
- NextJS best practices, including file structure, API routes, and static generation methods.
- Efficient state management and server-side rendering techniques.
- Optimal use of TypeScript for component and utility type safety."
Additional comments not posted (12)
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdfRolesRules.spec.ts (1)
1-13
: LGTM: Imports and test setup are well-structured.The imports are appropriate for the test, and the describe block clearly outlines the purpose of the test suite. The setup in the
beforeEach
block correctly retrieves the metadata for thegetSubpoenaPdf
method.apps/judicial-system/backend/src/app/modules/defendant/test/defendantController/getSubpoenaPdfRolesRules.spec.ts (4)
5-7
: LGTM: New role imports added correctlyThe new role imports (prosecutorRepresentativeRule, prosecutorRule, and publicProsecutorStaffRule) are correctly added and follow the existing naming conventions. They are also appropriately grouped with similar imports, maintaining good code organization.
11-11
: Improved test description accuracyThe test description has been updated to correctly reflect the DefendantController and specify the functionality being tested (custody notice pdf rules). This change enhances the clarity and accuracy of the test suite.
23-26
: LGTM: Updated expectations and new role checksThe test has been appropriately updated to reflect the addition of new roles:
- The expected length of rules has been correctly increased to 6.
- New role checks for prosecutorRule, prosecutorRepresentativeRule, and publicProsecutorStaffRule have been added.
These changes improve the comprehensiveness of the test and maintain consistency with the newly imported rules.
Line range hint
1-31
: Overall assessment: Well-implemented changesThe changes in this file are well-implemented and consistent with the PR objectives. The test suite has been updated to include new roles and improve its accuracy. The modifications adhere to TypeScript best practices and maintain good code organization. No issues or concerns were identified during this review.
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/limitedAccessDefendantControllerGuards.spec.ts (2)
1-6
: Imports look good and follow best practices.The imports are well-organized, grouped by external and internal modules, and all seem relevant to the test file's purpose.
1-28
: Overall, excellent test implementation with minor improvement opportunities.This test file for the
LimitedAccessDefendantController
guard configuration is well-structured and comprehensive. It effectively verifies the number and types of guards applied to the controller. The test follows good practices for unit testing in a TypeScript/Jest environment.While the implementation is solid, there are a few minor opportunities for improvement:
- Enhancing type safety in the test setup.
- Improving the maintainability of the test case by extracting expected guard configurations.
These suggestions aim to make the tests more robust and easier to maintain in the long run. Great job on implementing thorough tests for this critical part of the application!
apps/judicial-system/backend/src/app/modules/defendant/test/limitedAccessDefendantController/getSubpoenaPdf.spec.ts (1)
1-14
: LGTM: Imports and type definitions are well-structured.The imports are appropriate for the test file, and the custom
Then
interface andGivenWhenThen
type are well-defined, following TypeScript best practices.apps/judicial-system/backend/src/app/modules/defendant/test/createTestingDefendantModule.ts (4)
19-19
: LGTM: Import statement for LimitedAccessDefendantControllerThe import statement for
LimitedAccessDefendantController
is correctly added and follows the existing import style in the file. This addition aligns with the PR objectives of enhancing defendant data access control.
31-35
: LGTM: LimitedAccessDefendantController added to testing moduleThe
LimitedAccessDefendantController
is correctly added to thecontrollers
array in the testing module configuration. This ensures that the new controller is included in the testing setup, maintaining comprehensive test coverage for the defendant module.
89-92
: LGTM: LimitedAccessDefendantController instance added to module exportsThe
LimitedAccessDefendantController
instance is correctly retrieved from the module and added to the returned object. This follows the established pattern in the file and ensures that the new controller is available for testing. The naming convention is consistent with other controller instances.Also applies to: 105-105
Line range hint
1-107
: Overall assessment: Changes successfully integrate LimitedAccessDefendantControllerThe modifications to
createTestingDefendantModule.ts
effectively incorporate the newLimitedAccessDefendantController
into the testing setup. These changes align with the PR objectives of enhancing defendant data access control and maintain consistency with existing code structure and NextJS/NestJS best practices. The new controller is properly imported, added to the module configuration, and made available for testing, ensuring comprehensive test coverage for the defendant module.
...fendant/test/limitedAccessDefendantController/limitedAccessDefendantControllerGuards.spec.ts
Show resolved
Hide resolved
* Shows subpoenas to prosecution, defence and riksak * Updates unit tests * Fixes key issue --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Subpoena PDF
Sýna fyrirkallið á yfirliti máls hjá ákæranda
What
Why
Screenshots / Gifs
Checklist:
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Documentation