demarches-normaliennes/spec/features/users
Pierre de La Morinerie e1909ed29f brouillon: redirect to sign-in when disconnected
There are two cases where the draft auto-save might fail because the
user is no longer authenticated:

- The user signed-out in another tab,
- The brower quit and re-opened, so the Session cookie expired.

In both cases, the auto-save will never succeed until the user
authenticates again, so displaying a "Retry" button is cruel.

Moreover, in plus of all auto-save requests failing with a small error,
the actual hard failure only occurs after filling all the form and
trying to submit it. Then the user is redirected to the sign-in page –
but all their changes are lost.

Instead, we now redirect to the sign-in page on the first 401 error
during the auto-save, let the user sign-in, and then redirect back to
the form.
2021-07-22 11:58:02 +02:00
..
brouillon_spec.rb brouillon: redirect to sign-in when disconnected 2021-07-22 11:58:02 +02:00
change_email_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
dossier_creation_spec.rb zeitwerk: Api -> API 2021-02-09 13:07:30 +01:00
dossier_details_spec.rb remove pending tests 2020-07-15 09:27:23 +00:00
dossier_shared_examples.rb app: rename new_user to users 2019-03-25 10:56:39 +01:00
invite_spec.rb fix tests for autosave_brouillon 2020-09-21 08:46:01 +00:00
linked_dropdown_spec.rb Fix apostrophes ‘ -> ’ 2021-05-26 18:05:14 +02:00
list_dossiers_spec.rb add test for users/list_dossiers_spec 2020-04-09 09:42:31 +02:00
managing_password_spec.rb password: add specific page for reset instructions 2021-04-22 14:24:15 +02:00
sign_out_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
sign_up_spec.rb Test: use APPLICATION_NAME to deal nicely with custom configuration 2021-04-13 22:46:33 +02:00