demarches-normaliennes/spec
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
..
controllers app: use a long-lived cookie for CSRF token 2021-07-20 11:11:52 +02:00
factories Improuve champ blank check 2021-07-22 10:45:25 +02:00
features brouillon: redirect to sign-in when disconnected 2021-07-22 11:58:02 +02:00
fixtures fix encoding problems with cherlock Holmes gem 2021-07-13 10:58:41 +02:00
helpers add spec for archive weight estimation 2021-06-09 10:52:38 +02:00
jobs Prevent double processing of declarative dossiers 2021-06-04 17:55:40 +02:00
lib lib: remove the 'migrated' key on filters 2021-07-20 16:51:32 +02:00
mailers routes: replace the email param in the Avis URLs by a query param 2021-06-17 11:15:51 +02:00
middlewares specs: always require rails_helper 2020-03-31 12:48:32 +02:00
models Fix false positive blank champ warnings 2021-07-22 10:45:25 +02:00
policies policies: fix champ policy for guest users 2020-04-02 11:27:14 +02:00
serializers Add compatibility cadsatre layer with old API GEO 2021-05-24 11:57:00 +02:00
services Revert "Revert "Expose dossier PDF export as IO"" 2021-06-24 21:01:59 +02:00
support brouillon: redirect to sign-in when disconnected 2021-07-22 11:58:02 +02:00
views views: fix checkbox wrongly selected in multiple_drop_down_list 2021-07-20 09:01:07 +02:00
rails_helper.rb specs: add a feature test for forgery protection 2021-07-20 11:11:52 +02:00
spec_helper.rb Chore(test): enable rspec only-failures support 2021-04-15 14:17:39 +02:00