-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(j-s): Show courtRecord files in indictments to everyone once upl…
…oaded (#15817) * Show court records to everyone once uploaded * Show court records when uploaded * Add test
- Loading branch information
Showing
3 changed files
with
57 additions
and
24 deletions.
There are no files selected for viewing
3 changes: 1 addition & 2 deletions
3
...dicial-system/web/src/components/AppealCaseFilesOverview/AppealCaseFilesOverview.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
...dicial-system/web/src/components/IndictmentCaseFilesList/IndictmentCaseFilesList.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { render, screen } from '@testing-library/react' | ||
|
||
import { | ||
CaseDecision, | ||
CaseFileCategory, | ||
CaseType, | ||
} from '@island.is/judicial-system-web/src/graphql/schema' | ||
import { | ||
mockCase, | ||
mockCaseFile, | ||
} from '@island.is/judicial-system-web/src/utils/mocks' | ||
import { | ||
ApolloProviderWrapper, | ||
IntlProviderWrapper, | ||
} from '@island.is/judicial-system-web/src/utils/testHelpers' | ||
|
||
import IndictmentCaseFilesList from './IndictmentCaseFilesList' | ||
|
||
describe('IndictmentCaseFilesList', () => { | ||
it('should render court records if there are courtRecord case files', () => { | ||
render( | ||
<IntlProviderWrapper> | ||
<ApolloProviderWrapper> | ||
<IndictmentCaseFilesList | ||
workingCase={{ | ||
...mockCase(CaseType.INDICTMENT), | ||
caseFiles: [mockCaseFile(CaseFileCategory.COURT_RECORD)], | ||
}} | ||
/> | ||
</ApolloProviderWrapper> | ||
</IntlProviderWrapper>, | ||
) | ||
|
||
expect(screen.queryByTestId('PDFButton')).not.toBeNull() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters