Commit graph

2482 commits

Author SHA1 Message Date
Pierre de La Morinerie
630c6de967 specs: move the query for individual to the individual context 2020-01-07 17:59:11 +01:00
Paul Chavard
e61e39d345 Remove unused code and tests 2020-01-07 11:52:51 +01:00
Paul Chavard
ff46ee366e Fix user brouillon spec 2020-01-07 11:52:51 +01:00
Paul Chavard
4bbd16576b Add champ communes 2020-01-07 11:52:51 +01:00
Pierre de La Morinerie
8eb295d67e dossiers: avoid exceptions on invalid AASM transitions
When attempting an invalid transition on a dossier, provide a meaningful
error message (instead of letting an `AASM::InvalidTransition` exception
propagate).

This handles not only the case where the same state is applied twice
(which was already handled manually), but all cases where the transition
is invalid.
2019-12-19 13:25:32 +01:00
Pierre de La Morinerie
c7a307553c helpers: allow dossier_display_state to take a state as input
This allow to use either:

- `dossier_display_state(dossier)`
- `dossier_display_state(:en_construction)`
2019-12-19 13:22:40 +01:00
simon lehericey
60538c9c28 Controller use new export model 2019-12-18 13:13:15 +01:00
simon lehericey
745086cbb5 Simplify view 2019-12-18 13:13:15 +01:00
simon lehericey
d0939ae1a4 Add Export Model 2019-12-18 13:13:15 +01:00
simon lehericey
d0f0533a32 Remove unused code 2019-12-18 13:13:15 +01:00
simon lehericey
c02e8b9553 Routing: send emails to the right group 2019-12-16 17:47:08 +01:00
maatinito
a02a5edce3 Bug with time zone when testing sending of brouillon expiration notices 2019-12-11 17:34:10 +01:00
maatinito
9672d892e9 Bug with time zone: Time.zone.today looses time_zone and may breaks database comparisons 2019-12-11 17:34:10 +01:00
simon lehericey
058442c84e [link to #4557] An instructeur cannot change its email on its own 2019-12-11 17:18:21 +01:00
simon lehericey
e06733d01b Clean spec 2019-12-11 17:18:21 +01:00
Paul Chavard
6b5793f0b9 [GraphQL] fix a crash in mutations with an attachment 2019-12-11 13:22:32 +01:00
Paul Chavard
422b7f37ec [GraphQL] expose file information 2019-12-11 12:34:49 +01:00
Pierre de La Morinerie
c2882b6cc3 app: hide IE11 deprecation banner during the strike
Having two banners appearing in a few days may be overwhelming for
users.
2019-12-04 17:32:04 +01:00
Paul Chavard
2f060fc30a Add depubliee state to procedures 2019-12-04 16:52:41 +01:00
Paul Chavard
b5eafdab56 [GraphQL]: informations du service 2019-12-04 14:21:40 +01:00
Paul Chavard
fd42fafcb4 [GraphQL]: informations du demandeur du dossier 2019-12-04 12:39:29 +01:00
Christophe Robillard
4e7c779116 refuse les numéros de tel invalides
rend facultatif les numéros de téléphone
2019-12-04 05:34:43 +01:00
simon lehericey
006e426a11 Work on deletion mail 2019-12-03 17:18:53 +01:00
simon lehericey
79bfb8b143 Delete expired dossiers 2019-12-03 17:18:53 +01:00
simon lehericey
6391f7ff9c Work on notify_near_deletion mailer 2019-12-03 17:18:53 +01:00
simon lehericey
03b7e81ca4 Send deletion notice for near expired brouillon 2019-12-03 17:18:53 +01:00
Pierre de La Morinerie
3212dfddca app: allow hiding the browser banner for one week 2019-12-03 16:09:18 +01:00
Pierre de La Morinerie
fb3f82074d Hide the suggestions when the user corrects the address 2019-12-03 14:06:11 +01:00
Pierre de La Morinerie
1d1260060e Fix the tests by using event delegation 2019-12-03 14:06:11 +01:00
clemkeirua
849008231c ajout de test capybara 2019-12-03 14:06:11 +01:00
Paul Chavard
7b947feae4 Rename demarche archivée to demarche close 2019-11-28 15:07:16 +01:00
Paul Chavard
3e334a3306 Drop test_started_at
# Conflicts:
#	spec/models/procedure_spec.rb
2019-11-28 14:17:47 +01:00
Pierre de La Morinerie
e7dd9e36d6 specs: fix Capybara warning
Capybara logs several warnings during tests:

> Locator Integer:243 for selector :link must be an instance of String
> or Symbol. This will raise an error in a future version of Capybara.

This is because we use selectors like `have_link(dossier.id)`, where the
locator is a Number (instead of a String or Symbol).
2019-11-28 12:09:12 +01:00
simon lehericey
6657459f9c Fix add instructeur with empty mail
As select2 does not handle required attribute, we can only add server side logic
2019-11-27 14:39:16 +01:00
Paul Chavard
e9f993fe0c [GraphQL]: normalize date names in French 2019-11-27 12:23:00 +01:00
Pierre de La Morinerie
a328e8d94a features: refactor the editor specs
- Add an `add_champ` helper
- Stop relying on a default champ being created
- Wait for all champs to be created by watching the "Add champ" button 

This should fix the flakiness of these tests.

Refs #4417
2019-11-27 11:58:46 +01:00
Pierre de La Morinerie
d0cd875e91 features: add a leave_browser_open helper 2019-11-27 11:58:45 +01:00
Pierre de La Morinerie
0ef4a5253c features: move feature matchers to their own file
This allows to have the same syntax than native Capybara matchers.
2019-11-27 11:58:45 +01:00
maatinito
9de9a1fd71 Use time.zone functions instead of server time functions
(Time.zone.today vs Date.today)
2019-11-26 14:26:36 +01:00
maatinito
14bc2b99b9 auto-archive badly occurs in UTC time and not in local time (1 hour too late in France, 10 hours before in Tahiti ;-) 2019-11-25 14:39:42 +01:00
clemkeirua
789fcf72ca ajout d'un test automatisé 2019-11-25 10:37:10 +01:00
Pierre de La Morinerie
1de4ef8a9a specs: fix error in routing feature test by waiting for Turbolinks 2019-11-21 18:37:51 +01:00
Pierre de La Morinerie
b78134c691 specs: make the routing feature test more robust
- Use human-readable form labels
- Always wait for the result of the previous action to be loaded before
  starting another action
2019-11-21 18:29:45 +01:00
Pierre de La Morinerie
68f5aae99d autosave: add feature test 2019-11-21 14:00:06 +01:00
Paul Chavard
0c6705f7fd Drop old export service 2019-11-21 10:25:40 +01:00
Christophe Robillard
b42f21264e permet le suivi auto après envoi instructeur
Close #4163
2019-11-20 16:41:30 +01:00
Pierre de La Morinerie
8b8a96abda dossiers: save draft by default (instead of submitting)
Make the default behavior of `update_brouillon` be to update the draft,
instead of submitting the dossier.

This makes all requests made to `update_brouillon` without specifying
an extra `submit_draft` parameter to just save the draft. It will make
autosaving the draft easier and safer.
2019-11-20 11:24:31 +01:00
simon lehericey
dae7a3bfd0 [fix #4529] Log user email in manager space 2019-11-19 12:15:03 +01:00
Paul Chavard
e600aceccc [GraphQL]: add dossier state change mutations 2019-11-19 11:51:34 +01:00
simon lehericey
4b62c9267a fix flaky test 2019-11-18 17:26:28 +01:00