Commit graph

500 commits

Author SHA1 Message Date
Pierre de La Morinerie
a8444927ab specs: fix the sign-up with unconfirmed account test
It was testing the sign-in instead of the sign-up.
2020-02-12 13:24:52 +00:00
Pierre de La Morinerie
e746d90016 mailers: add a link to the procedure when the account already exists 2020-02-12 13:24:52 +00:00
Paul Chavard
7afeae1408 remove dossier.linked_dossiers 2020-02-11 17:49:22 +01:00
Paul Chavard
f0ea96772d Only invite experts to dossiers instructeur have access to 2020-02-11 17:38:57 +01:00
Pierre de La Morinerie
2532091302 form: improve wording of repetition blocks controls 2020-02-11 17:36:50 +01:00
Christophe Robillard
cef776ff9e admin: fix add administrateur to a procedure 2020-02-04 16:21:42 +01:00
Christophe Robillard
055918aabc admin: replace calls to Administrateur.find_by(email: ...) 2020-02-04 16:21:42 +01:00
Pierre de La Morinerie
745b00366f Revert "app: hide IE11 deprecation banner during the strike"
This reverts commit c2882b6cc3.
2020-01-28 15:18:18 +01:00
Pierre de La Morinerie
724ff50363 factories: rename dossier for_individual to with_individual
This clarifies the distinction between

```
create :procedure, :for_individual
```

and

```
create :dossier, :with_individual
```
2020-01-21 17:24:56 +01:00
Paul Chavard
14295db9ad Revert "Revert "Merge pull request #4552 from tchak/champ-communes""
This reverts commit 4373cb22cb.
2020-01-14 18:46:07 +01:00
clemkeirua
4373cb22cb Revert "Merge pull request #4552 from tchak/champ-communes"
This reverts commit 4cec26f73a, reversing
changes made to 0ef25ef36c.
2020-01-13 16:26:27 +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
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
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
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
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
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
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
simon lehericey
361e57355a Spec: full_scenario use js 2019-11-18 17:08:51 +01:00
simon lehericey
9469734f29 Follow flipper name convention to appears on manager admin page 2019-11-07 11:09:05 +01:00
simon lehericey
5643e671a0 Code use user.active? 2019-11-05 14:10:39 +01:00
Pierre de La Morinerie
f131dbb80d instructeurs: make the create form not using email directly
Before the form attempted to read an email value from the Instructeur
model, and failed (because the empty Instructeur had no user yet).

We could let `Instructeur#email` return `nil` if there is no User –
but as a created Instructeur is always supposed to have a User, this
seems like a nice safeguard to keep.

So instead this commit rewrites the create form, which now doesn’t
depend on an Instructeur model. Seems easy enough for now.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
d78d206544 instructeurs: fix expert creation not to use Instructeur.email
It kind of worked until now, because the email field is disabled, and
thus never accessed.

But better make it clean, by accessing an object (User) where the email
field actually exists.
2019-11-04 10:44:24 +01:00
Pierre de La Morinerie
1c61f2de58 views: refactor the attachment/edit view
Make it more reusable, by:

- Renaming `attachment/update` to `attachment/edit`
- Refactoring the CSS styles into their own stylesheet
- Allow to specify the 'accept' option
2019-10-31 10:27:19 +01:00
Pierre de La Morinerie
5be83bd01e procedure: make the layout more similar to the mockup 2019-10-31 10:27:19 +01:00
simon lehericey
cba9ffb753 full_scenario extended with notifications controle 2019-10-25 09:42:17 +02:00
simon lehericey
e290fc3674 No need to update column as the sign_up process activates the user 2019-10-24 18:32:48 +02:00
simon lehericey
e97c705628 Add end to end spec 2019-10-23 21:47:20 +02:00
Paul Chavard
86b271997b Invite experts to linked dossiers
closes #3669
2019-10-23 13:10:09 +02:00
Pierre de La Morinerie
f0c2599d18 specs: improve feature spec for experts
- Move the avis feature spec to a separate file
- Add more test cases
2019-10-21 12:57:10 +02:00
Pierre de La Morinerie
0807fed258 specs: rename instructeur_spec.rb to instruction_spec.rb
This clarifies the difference between this spec and the other
instructeur specs in the same directory.
2019-10-21 11:27:35 +02:00
Paul Chavard
2c486b8fe2 Bump some javascript dependencies 2019-10-07 15:40:27 +02:00
Nicolas Bouilleaud
78da268ded Improve feature tests for procedure cloning and creation 2019-09-17 16:30:48 +02:00
Nicolas Bouilleaud
fc416ee2ec Fix procedure_locked_spec
`login_as administrateur, scope: :administrateur` doesn’t seem to actually do anything, but testing for the _absence_ of content can’t break.

- Make the test fail if login fails,
- Fix the login,
- Write the opposite test,
- Update the searched content to the actual text used in the partial
2019-09-17 14:50:37 +02:00
simon lehericey
caf1fbca44 Use assign_to 2019-09-02 11:41:12 +02:00
simon lehericey
b541ef0b41 Procedure has many instructeurs with defaut_groupe_instructeur 2019-09-02 11:41:12 +02:00
Chaïb Martinez
8ad79d3235 New signup test
Signed-off-by: Chaïb Martinez <chaibax@gmail.com>
2019-08-27 10:45:26 +02:00
simon lehericey
08bb393ced Spec: specify locked logic 2019-08-16 16:48:22 +02:00
simon lehericey
7fbedb78fb Add feature spec about managing passwords (with the courtesy of kemenaran) 2019-08-14 17:27:10 +02:00
simon lehericey
149b0b5797 Fix Sign out 2019-08-14 16:58:50 +02:00
simon lehericey
c08e356367 Remove or fix nonsense code 2019-08-14 15:08:14 +02:00
simon lehericey
c380d807ab Spec: sign_in with administrateur.user 2019-08-14 15:08:14 +02:00
Paul Chavard
e68d2cf5e2 Enable champ repetition for all 2019-08-14 12:53:51 +01:00