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
Pierre de La Morinerie
2024465bc2
Merge pull request #4959 from betagouv/fix-attestation-preview
...
Administrateur : correction de la prévisualisation des attestations
2020-03-30 17:36:21 +02:00
Pierre de La Morinerie
ed5f2fa35f
attestation: fix preview of logos
...
Turns out that assigning the params to the procedure calls `read` on the
images files. Calling `read` moves the seek offset to the end of the
file; which means that subsequent calls to `read` return an empty
string.
Fix the issue by calling `rewind` before attempting to `read` the file,
to ensure the seek offset is at the beginning of the file.
Fix #4958
2020-03-30 14:58:50 +02:00
Pierre de La Morinerie
b8c3d7c6bd
attestation: ensure the PDF is rendered successfully
2020-03-30 14:58:50 +02:00
Pierre de La Morinerie
008181bfbf
Merge pull request #4954 from betagouv/pj-prepare-validations
...
Nettoyage des validations de PJ
2020-03-30 12:06:53 +02:00
Pierre de La Morinerie
fe13043efd
dossier: prepare validations to piece_justificative champs
...
We can't yet enable the validations, because of an issue that will
(hopefully) be solved with Rails 6.
See https://github.com/betagouv/demarches-simplifiees.fr/issues/4926
2020-03-30 11:12:25 +02:00
Pierre de La Morinerie
f3c210e875
dossier: remove dead validation code
...
This code used to be called by CarrierWave, but is unused since the
migration to ActiveStorage.
This means that these validations are currently disabled though.
See https://github.com/betagouv/demarches-simplifiees.fr/issues/4926
2020-03-30 11:12:25 +02:00
Pierre de La Morinerie
245ef2befd
specs: fix an Rspec warning
2020-03-30 11:12:25 +02:00
Keirua
bc68570244
Merge pull request #4956 from betagouv/4955-bandeau-coronavirus
...
#4955 - ajout d'un bandeau d'informations coronavirus
2020-03-27 15:55:09 +01:00
clemkeirua
6a22ba7036
#4955 - ajout d'un bandeau d'informations coronavirus
2020-03-27 15:33:03 +01:00
Paul Chavard
3120f94370
Merge pull request #4953 from tchak/fix-locales
...
Use ’ consistently instead of '
2020-03-26 18:03:20 +01:00
Paul Chavard
a60b6b6776
Use ’ consistently instead of '
2020-03-26 17:27:48 +01:00
Paul Chavard
e333e2dce2
Merge pull request #4951 from tchak/fix-manager
...
Remove non-existant columns from manager dashboards
2020-03-26 16:35:25 +01:00
Paul Chavard
c763679b54
Remove non-existant columns from manager dashboards
2020-03-26 16:17:07 +01:00
Paul Chavard
953ebfe45a
Merge pull request #4943 from tchak/rename-delete-to-discard
...
Rename delete_and_keep_track -> discard_and_keep_track
2020-03-26 15:37:24 +01:00
Paul Chavard
c707a21f97
Rename delete_and_keep_track -> discard_and_keep_track
2020-03-26 14:23:23 +01:00
Pierre de La Morinerie
b974020785
Merge pull request #4881 from maatinito/issue/fc_requires_eidas
...
Spécification du niveau eIDAS lors des appels à France Connect
2020-03-26 14:21:40 +01:00
Christian Lautier
806e5d5eed
eIDAS level added to France Connect authorization call
2020-03-26 14:07:32 +01:00
Keirua
7462264f82
Merge pull request #4948 from tchak/add-default-to-en_construction_conservation_extension
...
Add default to en_construction_conservation_extension
2020-03-26 13:25:04 +01:00
Paul Chavard
273cb8a8ff
Add default to en_construction_conservation_extension
2020-03-26 13:03:26 +01:00
Paul Chavard
5fbce8a5dc
Merge pull request #4946 from tchak/fix-migration
...
Do not add default to en_construction_conservation_extension
2020-03-26 11:48:44 +01:00
Paul Chavard
e60597aa30
Do not add default to en_construction_conservation_extension
2020-03-26 11:46:27 +01:00
Paul Chavard
d9145545ca
Merge pull request #4937 from tchak/do-not-delete-users-with-hidden-dossiers
...
User should not be deleted if they have hidden dossiers with state_instruction_commencee
2020-03-25 19:02:13 +01:00
Paul Chavard
08a5dd6a27
User should not be deleted if they have hidden dossiers with state_instruction_commencee
...
fix #4933
2020-03-25 18:15:14 +01:00
Paul Chavard
ed0441176b
Merge pull request #4941 from tchak/use-constants
...
Refactor scopes with intervals and use Time.zone.now
2020-03-25 18:14:38 +01:00
Paul Chavard
51224fad49
Refactor scopes with intervals and use Time.zone.now
2020-03-25 17:42:03 +01:00
Paul Chavard
9b20ce9470
Merge pull request #4915 from tchak/cleanup-discarded-dossier
...
Add a job to remove discarded dossiers
2020-03-25 17:41:40 +01:00
Paul Chavard
c086f6d580
Add a job to remove discarded dossiers
2020-03-25 17:28:25 +01:00
Paul Chavard
26b41caca9
Merge pull request #4939 from tchak/show-deleted-dossier-reason
...
Show the reason on deleted dossiers
2020-03-25 17:28:05 +01:00
Paul Chavard
ec1cd989ab
Show the reason on deleted dossiers
2020-03-25 16:57:03 +01:00
Pierre de La Morinerie
7a8936eacb
Merge pull request #4932 from tchak/fix-dossier-scopes
...
Les dossiers en brouillon supprimés ne génèrent plus de notifications ou d'opérations dans les journaux
2020-03-25 16:03:53 +01:00
Paul Chavard
5b5ae5a7a5
Do not send notifications or create operation logs on brouillon demarches
2020-03-25 15:04:52 +01:00
Paul Chavard
966503fd4e
Merge pull request #4938 from betagouv/improve-upload-label
...
dossier: make the upload label a real label
2020-03-25 15:04:34 +01:00
Pierre de La Morinerie
f895570b00
dossier: make the upload label a real label
2020-03-25 14:43:09 +01:00
Pierre de La Morinerie
1de3674e36
Merge pull request #4930 from betagouv/4890-accessibilite
...
Améliorations d'accessibilité (CGU, pieds-de-page, sélection du genre)
2020-03-25 10:58:45 +01:00
clemkeirua
b4160e7554
added footer on static pages
2020-03-25 09:50:41 +00:00
clemkeirua
a34b45e4f4
make the 'male' field selected by default during identity creation
2020-03-25 09:50:41 +00:00
clemkeirua
1bdc0836a6
password length for screen reader on /users/sign_up
...
We use a placeholder (which is not made for this, but we have reasons to do that)
so using a visible labels or paragraph duplicates the information
I picked aria-describedby, which is not the ideal solution (it seems to be aria-labelledby) but which is the most widely supported
https://www.w3.org/WAI/tutorials/forms/instructions/#using-aria-describedby
2020-03-25 09:50:41 +00:00
clemkeirua
5ef6f92fdc
update CGU URL
2020-03-25 09:50:41 +00:00
krichtof
4e6571512a
Merge pull request #4929 from betagouv/4907-afficher-les-deleted-dossiers
...
instructeur: affiche les dossiers supprimés pour une procédure
2020-03-25 10:25:45 +01:00