demarches-normaliennes/spec/support
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
..
active_job.rb specs: clear jobs queue before each test 2021-03-16 11:49:14 +01:00
capybara.rb brouillon: redirect to sign-in when disconnected 2021-07-22 11:58:02 +02:00
controller_helpers.rb Files should not start with a new line 2017-04-04 16:59:38 +02:00
database_cleaner.rb spec: during js specs, cleanup database using deletion 2019-09-10 16:40:02 +02:00
download_helpers.rb ajout d'un test sur le telechargement de zips 2020-07-21 15:45:57 +02:00
factory_bot.rb spec: better split spec_helper and rails_helper 2021-03-04 22:59:39 +01:00
feature_helpers.rb Improuve ComboMultipleDropdownList style 2021-04-28 12:54:45 +02:00
feature_matchers.rb features: move feature matchers to their own file 2019-11-27 11:58:45 +01:00
shared_examples_for_jobs.rb jobs: extract an RetryOnTranscientErrors concern 2021-04-29 14:08:12 +02:00
shared_exemples_for_dossier.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
smart_listing.rb spec: better split spec_helper and rails_helper 2021-03-04 22:59:39 +01:00
vcr.rb spec: better split spec_helper and rails_helper 2021-03-04 22:59:39 +01:00
warden.rb spec: better split spec_helper and rails_helper 2021-03-04 22:59:39 +01:00
webmock.rb spec: better split spec_helper and rails_helper 2021-03-04 22:59:39 +01:00