demarches-normaliennes/spec/system
Sébastien Carceles 20136b7ac8
feat(demarche): create and prefill a dossier with POST request (#8233)
* add base controller for public api

* add dossiers controller with basic checks

* create the dossier

* ensure content-type is json

* prefill dossier with given values

* mark a dossier as prefilled

When a dossier is prefilled, it's allowed not to have a user.

Plus, we add a secure token to the dossier, which we will need later to set a
user after sign in / sign up.

* set user as owner of an orphan prefilled dossier

When a visitor comes from the dossier_url answered by the public api,
the dossier is orphan:
- when the user is already authenticated: they become the owner
- when the user is not authenticated: they can sign in / sign up / france_connect
and then they become the owner

So here is the procedure:
- allow to sign in / sign up / france connect when user is unauthenticated
- set dossier ownership when the dossier is orphan
- check dossier ownership when the dossier is not
- redirect to brouillon path when user is signed in and owner

* mark the dossier as prefilled when it's prefilled
(even with a GET request, because it will be useful later on, for
exmample in order to cleanup the unused prefilled dossiers)

* system spec: prefilling dossier with post request
2023-01-03 14:46:10 +01:00
..
accessibilite fix(dossier): update spec 2022-12-21 14:03:02 +01:00
administrateurs fix system specs by adding zone for new procedure 2022-12-21 09:02:16 +01:00
api_particulier fix system specs by adding zone for new procedure 2022-12-21 09:02:16 +01:00
experts refactor(dossier): champs -> champs_public 2022-11-10 22:44:39 +00:00
france_connect refactor(ujs): turbo use an id for turbo_stream.update id not a class 2022-09-29 17:04:15 +02:00
instructeurs correctif(instructeurs/dossier#telecharger_pjs): ne pas inclure les bills et horodatage quand on telecharge un dossier unitairement 2022-12-26 17:11:10 +01:00
integrateurs feat(demarche): describe procedure prefilling (#8187) 2022-12-19 11:32:09 +00:00
routing fix system specs by adding zone for new procedure 2022-12-21 09:02:16 +01:00
sessions style: signin button styled accordingly to UX 2022-10-11 09:50:21 +02:00
users feat(demarche): create and prefill a dossier with POST request (#8233) 2023-01-03 14:46:10 +01:00
forgery_spec.rb specs: migrate from features to system specs 2021-10-26 12:24:46 +02:00
help_spec.rb feat(DSFR.header): switch to DSFR header 2022-09-06 10:09:12 +02:00
i18n_spec.rb feat(header): switch to DSFR translate component and dropdown component 2022-09-06 10:09:12 +02:00
outdated_browser_spec.rb specs: migrate from features to system specs 2021-10-26 12:24:46 +02:00
patron_spec.rb fix(dossier): update spec 2022-12-21 14:03:02 +01:00