-
Notifications
You must be signed in to change notification settings - Fork 207
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
WSTEAM1-994 - Adds custom file upload html and state handling #11608
Conversation
).toBeInTheDocument(); | ||
}); | ||
|
||
it('should call the function to update state when a file is added', 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.
This test is a little brittle, as it's not testing anything in the UI, due to state management being handled in the the context, only the arguments within the handleChange
function are being tested here
]); | ||
}); | ||
|
||
it('should remove a file from the list when the remove button is clicked', 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.
Same as previous brittle comment
ws-nextjs-app/pages/[service]/send/[id]/FormField/File/index.test.tsx
Outdated
Show resolved
Hide resolved
…994-file-upload-ui
ws-nextjs-app/pages/[service]/send/[id]/FormField/File/styles.ts
Outdated
Show resolved
Hide resolved
ws-nextjs-app/pages/[service]/send/[id]/FormField/File/index.tsx
Outdated
Show resolved
Hide resolved
Looks really great. Huge piece of a work here, so great job tackling this 👏 Is it worth adding a Storybook story for this component too? Think its maybe the only input type that doesn't have a story. |
Thank ya, I've added a story and the data for the somali page I've been testing on |
Resolves JIRA WSTEAM1-994
Overall changes
Adds a custom file upload display, which allows management of adding and removing multiple files adding previews for images and icons for other file types.
Code changes
aria-describedby
can target labelsTesting
ws-nextjs-app
yarn
yarn dev
Helpful Links
Add Links to useful resources related to this PR if applicable.
Coding Standards
Repository use guidelines