bbc / simorgh

The BBC's Open Source Web Application. Contributions welcome! Used on some of our biggest websites, e.g.
https://www.bbc.com/thai
Other
1.4k stars 222 forks source link

WSTEAM1-1017: Initiate journey across Uploader states #11729

Closed Isabella-Mitchell closed 3 months ago

Isabella-Mitchell commented 3 months ago

Resolves JIRA WSTEAM1-1017 - Configure functionality for the journey across states (Form, uploading & Success)

Overall changes

Supporting the users journey across the various states of the uploader form. Default > Uploading > Success/ Error. Default > Validation Errors > Uploading > Success/ Error.

Code changes

Note I have added some basic unit tests to the Form. I'm looking at adding unit tests to the Form Context Provider though I don't think this should hold up the progress of this ticket.

Testing

  1. Run PR locally
  2. Visit http://localhost.bbc.com:7081/somali/send/u130092370?renderer_env=test
  3. Check form does not submit when empty
  4. Check form does not submit with errors, and form content is not wiped
  5. Check form goes to Uploading screen if there are no validation errors
  6. Check that Page (tab) title updates on screen change
  7. Check the process with a screen reader and check that 'Uploading' 'Error and 'Success' heading is announced on screen change. (Note the form submission will error - check Slack for instructions on how to get form to submit successfully)

Helpful Links

Add Links to useful resources related to this PR if applicable.

Coding Standards

Repository use guidelines

greenc05 commented 3 months ago

"Prefix page title with 'Uploading' on screen change. Remove on Success screen. (We already do this on the Error screen)." Do we add something on the success screen so the title is different to the start page? @Isabella-Mitchell

amoore108 commented 3 months ago

"Prefix page title with 'Uploading' on screen change. Remove on Success screen. (We already do this on the Error screen)." Do we add something on the success screen so the title is different to the start page? @Isabella-Mitchell

I've updated this to use the confirmationStepTitle value from the translations, which is the same value used on the H1 for the success screen.