Commit graph

9429 commits

Author SHA1 Message Date
Christophe Robillard
290edd9e69 ameliore la découvrabilité du fichier téléchargé 2020-04-06 10:12:00 +02:00
Pierre de La Morinerie
d47ec3d3ad
Merge pull request #4970 from betagouv/improve-identite-required-fields
Usager : simplification de l'apparence des champs sur la page Identité
2020-04-02 18:05:17 +02:00
Pierre de La Morinerie
e166f89aa0 identite: remove the "*" for required labels
When all fields are required, it's better to say nothing.
2020-04-02 17:34:00 +02:00
Pierre de La Morinerie
7f629ffca1 identite: mark the radio buttons as actually required 2020-04-02 17:34:00 +02:00
Kara Diaby
da938d0571
Merge pull request #4950 from betagouv/feat/4893
feat/4893 - migrate the mapReader to mapbox-gl with react
2020-04-02 15:56:09 +02:00
kara Diaby
aa56cfd7a0 migrate map to mapbox-gl with a react component 2020-04-02 15:39:47 +02:00
Paul Chavard
bbaffd7f4b
Merge pull request #4988 from tchak/refactor-expired-tests
Refactor expired dossiers deletion service
2020-04-02 15:35:15 +02:00
Paul Chavard
ca6c97bf0f Refactor expired dossiers deletion service 2020-04-02 15:24:02 +02:00
Paul Chavard
725cfa45d3 Do not set processed_at if already defined 2020-04-02 15:23:53 +02:00
Pierre de La Morinerie
c3b6e7e30f
Merge pull request #4987 from tchak/fix-order-in-test
Les dossier.dossier_operation_logs sont par défaut ordonnés par ordre de création
2020-04-02 14:18:18 +02:00
Paul Chavard
413abccd3c Add default order to dossier.dossier_operation_logs 2020-04-02 14:05:40 +02:00
Pierre de La Morinerie
d7faa7aeab
Merge pull request #4971 from betagouv/autocomplete-identity
Usager : permet au navigateur web de remplir automatiquement les champs prénom, nom et mot de passes
2020-04-02 12:15:51 +02:00
Pierre de La Morinerie
c4f2e6cab0 credentials: add autocomplete attributes
Allow browsers to autofill more informations.

References:
- MDN: Autofill (https://developer.mozilla.org/fr/docs/Web/HTML/Attributs/autocomplete)
- Safari Password Autofill (https://developer.apple.com/documentation/security/password_autofill/enabling_password_autofill_on_an_html_input_element)
2020-04-02 12:07:42 +02:00
Pierre de La Morinerie
8f7a21317a
Merge pull request #4981 from betagouv/fix-champ-policy-for-invite
Usager : corrige les champs Carte, SIRET et pièce justificative pour les invités
2020-04-02 11:43:55 +02:00
Pierre de La Morinerie
059e11601b policies: fix champ policy for guest users 2020-04-02 11:27:14 +02:00
Pierre de La Morinerie
c17ceb4440 policies: DRY the scope 2020-04-02 11:27:14 +02:00
Pierre de La Morinerie
ac922c456e policies: refactor champ_policy_spec
Creating champs without attaching them to a procedure works only by
chance.
2020-04-02 11:27:13 +02:00
Paul Chavard
533b16b6ea
Merge pull request #4976 from tchak/fix-reassign-dossiers-group-instructeur
Reassign discarded dossiers on group_instructeur
2020-04-01 18:30:29 +02:00
Paul Chavard
c0bbfa42b7 Reassign discarded dossiers on group_instructeur
fix #4851
2020-04-01 18:10:12 +02:00
Paul Chavard
d55535b237
Merge pull request #4982 from tchak/prepare_for_more_deletions
Refactor notify near deletion mailers
2020-04-01 18:01:35 +02:00
Paul Chavard
7ba4c513e6 Refactor notify near deletion mailers 2020-04-01 17:40:52 +02:00
Paul Chavard
ccb884df6d
Merge pull request #4944 from tchak/discard-procedures
Discard/Undo Démarches and Dossiers in manager
2020-03-31 20:46:26 +02:00
Paul Chavard
288ace2f34 Dossier on discarded procedure should have access to discarded procedure 2020-03-31 17:08:29 +02:00
Paul Chavard
bd81970f67 DeletedDossier should have access to discarded demarche 2020-03-31 17:08:29 +02:00
Paul Chavard
e4ab2574ce Démarches discarded by administrateur can be reactivated in manager 2020-03-31 17:08:28 +02:00
Paul Chavard
58c126308c Add DiscardedProceduresDeletionJob job 2020-03-31 17:08:28 +02:00
Paul Chavard
da52ec30bd Undo discard dossiers and demarches from manager 2020-03-31 17:08:28 +02:00
Paul Chavard
876e05aed3 Discard demarches from manager 2020-03-31 17:08:28 +02:00
Paul Chavard
89f1f70f0d
Merge pull request #4968 from tchak/clean-up-deleted-dossiers
Clean up deleted dossiers
2020-03-31 17:06:34 +02:00
Paul Chavard
aa066bc20a Validate deleted dossiers dossier_id uniqueness 2020-03-31 16:54:33 +02:00
Paul Chavard
60cb9bcf09 Remove brouillons deleted dossiers 2020-03-31 16:54:33 +02:00
Pierre de La Morinerie
8dcbe5f47c
Merge pull request #4918 from betagouv/auto-upload
Usager : envoi automatique des pièces jointes au dossier (désactivé pour l'instant)
2020-03-31 13:30:18 +02:00
Pierre de La Morinerie
6417c0d2c0 dossiers: allow auto upload of attachments 2020-03-31 13:09:44 +02:00
Pierre de La Morinerie
a1083ca253 javascript: add some comments to the upload systems 2020-03-31 13:09:17 +02:00
Pierre de La Morinerie
2a1c91a2a5
Merge pull request #4960 from betagouv/fix-js-alerts
Javascript : mise à jour d'eslint et de ses dépendences
2020-03-31 13:08:56 +02:00
Pierre de La Morinerie
f4b15da26f js: upgrade eslint and dependencies
Fix vulnerabilities in acorn and minimist.
2020-03-31 13:00:39 +02:00
Pierre de La Morinerie
0f6f447a6c
Merge pull request #4961 from betagouv/remove-wait-for-ajax
Tests : suppression du helper inutilisé `wait-for-ajax`
2020-03-31 13:00:13 +02:00
Pierre de La Morinerie
7a27e78452 specs: remove unused wait-for-ajax helper
This helper is:
- no longer used;
- buggy (not all requests increment it);
- discouraged (we should instead match an UI change that signals the end
of an ajax request).

Good riddance.
2020-03-31 12:54:49 +02:00
Pierre de La Morinerie
34dc554748
Merge pull request #4940 from betagouv/improve-rspec-harness
Simplification de la configuration rspec
2020-03-31 12:54:28 +02:00
Pierre de La Morinerie
cae256fd28 rspec: allow Rails to auto-migrate the test schema
rails_helper already has `ActiveRecord::Migration.maintain_test_schema!`
which automatically updates the test database if needed.

However, if we raise **before** `maintain_test_schema` had the chance
to do its job, the test database is never-automigrated.

Thus by removing the check, we ensure the test database will be migrated
as needed (and still an error will be raised if the schema cannot be
applied).
2020-03-31 12:48:32 +02:00
Pierre de La Morinerie
4cb747fdb6 specs: always require rails_helper
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.

The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.

This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.

Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).

Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.

To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.

Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
Paul Chavard
d6f6a076dd
Merge pull request #4963 from tchak/schedule-cron-jobs
Schedule cron jobs
2020-03-31 12:32:09 +02:00
Paul Chavard
742cc15209 Use base CronJob 2020-03-31 12:25:46 +02:00
Paul Chavard
5005c54891 Add base cron job 2020-03-31 12:25:46 +02:00
Paul Chavard
33bf2fe109 remove deprecated AutoReceiveDossiersForProcedureJob 2020-03-31 12:25:46 +02:00
Paul Chavard
39c47c21cf Remove explicit queue_as :default 2020-03-31 12:01:42 +02:00
Paul Chavard
44ec4a739c
Merge pull request #4964 from tchak/fix-expiration-tests
Use bigger deltas to allow for month length variations
2020-03-31 12:01:17 +02:00
Paul Chavard
c40d689edf Use bigger deltas to allow for month length variations 2020-03-31 11:50:59 +02:00
Paul Chavard
0c81e50c8c
Merge pull request #4962 from betagouv/fix-champs-editor-padding
champs editor: fix bottom padding of the list
2020-03-31 09:41:48 +02:00
Pierre de La Morinerie
54337a1603 editor: fix bottom padding of the list
Turns out Safari (and maybe IE) collapse the margins together. So we
need to give the footer an explicite height.

Fix #3570
2020-03-30 17:36:59 +02:00