-
Notifications
You must be signed in to change notification settings - Fork 0
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
PRMDR-873 - Enable ARF upload via ARF bucket #367
Conversation
… from ARF selection page
…to GP ADMIN, add an non active patient to mock pds service
const mockedUsePatient = usePatient as jest.Mock; | ||
const mockPatient = buildPatientDetails(); | ||
const mockedAxios = axios as jest.Mocked<typeof axios>; | ||
// const mockedAxios = axios as jest.Mocked<typeof axios>; |
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.
Removed commented out lines?
|
||
expect(screen.getByRole('button', { name: 'Upload' })).toBeInTheDocument(); | ||
expect(screen.getByRole('button', { name: 'Upload' })).toBeDisabled(); | ||
// it.skip('can upload documents to both LG and ARF forms', async () => { |
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.
We can remove this if the design has changed to only handle ARF documents
@@ -123,7 +138,7 @@ describe('<SelectStage />', () => { | |||
|
|||
it.each([ | |||
{ name: 'ARF', documents: arfDocuments }, | |||
{ name: 'LG', documents: [buildLgFile(1, 2, 'Joe Blogs')] }, | |||
// { name: 'LG', documents: [buildLgFile(1, 2, 'Joe Blogs')] }, |
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.
We can remove a lot of the commented out code that follows...
/> | ||
</Fieldset> | ||
{/*<Fieldset>*/} | ||
{/* <h2>Lloyd George records</h2>*/} |
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.
Remove
|
||
file_location += f"/{self.s3_file_key}" | ||
return file_location | ||
return f"s3://{self.s3_bucket_name}/{self.sub_folder}/{self.doc_type}/{self.nhs_number}/{self.id}" |
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.
The previous code was more configurable to allow for more path forms such as
bucket/sub/doc...
bucket/sub....
bucket/doc...
This change now limits that and turns future changes into a state configuration rather than a route builder. I would revert this.
I also discourage having your return data set on the return line without a variable before hand.
It's trickier to debug from a break point perspective and if you fall into a pattern of returning function response, code debugging becomes difficult to say the least. The minor memory consideration does is less useful than the code maintainability.
e.g.
rhyme = "Humpty Dumpty sat on the wall"
return rhyme
vs
return "Humpty Dumpty sat on the wall"
No description provided.