@@ -19,31 +19,31 @@ Feature:
19
19
And I should not see "Mission type DT77 1"
20
20
And I should not see "Mission type DT77 2"
21
21
22
- # @javascript
23
- # Scenario: As an organization, I can create a mission type
24
- # Given I am authenticated as "DT75"
25
- # And I am on "/organizations/mission_type/"
26
- # When I follow "Ajouter un nouveau type de mission"
27
- # Then I should be on "/organizations/mission_type/new"
28
- # When I press "Ajouter un type de bénévole"
29
- # And I press "Ajouter un type de véhicule"
30
- # And I fill in the following:
31
- # | mission_type[name] | mission type name |
32
- # | mission_type[minimumAvailableHours] | 2 |
33
- # | mission_type[userSkillsRequirement][0][skill] | ci_bspp |
34
- # | mission_type[userSkillsRequirement][0][number] | 3 |
35
- # | mission_type[assetTypesRequirement][0][type] | VPSP |
36
- # | mission_type[assetTypesRequirement][0][number] | 4 |
37
- # And I press "Enregistrer"
38
- # Then I should be on "/organizations/mission_type/"
39
- # And I should see "mission type name"
40
- # When I follow the last "Modifier"
41
- # Then the "mission_type_name" field should contain "mission type name"
42
- # And the "mission_type_minimumAvailableHours" field should contain "2"
43
- # And the "mission_type_userSkillsRequirement_0_skill" field should contain "ci_bspp"
44
- # And the "mission_type_userSkillsRequirement_0_number" field should contain "3"
45
- # And the "mission_type_assetTypesRequirement_0_type" field should contain "302"
46
- # And the "mission_type_assetTypesRequirement_0_number" field should contain "4"
22
+ @javascript
23
+ Scenario : As an organization, I can create a mission type
24
+ Given I am authenticated as "DT75"
25
+ And I am on "/organizations/mission_type/"
26
+ When I follow "Ajouter un nouveau type de mission"
27
+ Then I should be on "/organizations/mission_type/new"
28
+ When I press "Ajouter un type de bénévole"
29
+ And I press "Ajouter un type de véhicule"
30
+ And I fill in the following:
31
+ | mission_type [name ] | mission type name |
32
+ | mission_type [minimumAvailableHours ] | 2 |
33
+ | mission_type [userSkillsRequirement ][0 ][skill ] | ci_bspp |
34
+ | mission_type [userSkillsRequirement ][0 ][number ] | 3 |
35
+ | mission_type [assetTypesRequirement ][0 ][type ] | VPSP |
36
+ | mission_type [assetTypesRequirement ][0 ][number ] | 4 |
37
+ And I press "Enregistrer"
38
+ Then I should be on "/organizations/mission_type/"
39
+ And I should see "mission type name"
40
+ When I follow the last "Modifier"
41
+ Then the "mission_type_name" field should contain "mission type name"
42
+ And the "mission_type_minimumAvailableHours" field should contain "2"
43
+ And the "mission_type_userSkillsRequirement_0_skill" field should contain "ci_bspp"
44
+ And the "mission_type_userSkillsRequirement_0_number" field should contain "3"
45
+ And the "mission_type_assetTypesRequirement_0_type" field should contain "302"
46
+ And the "mission_type_assetTypesRequirement_0_number" field should contain "4"
47
47
48
48
@javascript
49
49
Scenario : As an organization, I cannot create a mission type with duplicate requirements
@@ -71,39 +71,38 @@ Feature:
71
71
And I should see "Au moins une compétence de bénévole est dupliquée"
72
72
And I should see "Au moins un type de véhicule est dupliqué"
73
73
74
- # # todo: this form has a buggy behavior: https://github.com/crf-devs/resop/issues/361
75
- # @javascript
76
- # Scenario: As an organization, I can edit a mission type
77
- # Given I am authenticated as "DT75"
78
- # And I am on "/organizations/mission_type/"
79
- # When I follow "Modifier"
80
- # Then I should be on "/organizations/mission_type/751/edit"
81
- # When I fill in the following:
82
- # | mission_type[name] | mission type name |
83
- # | mission_type[userSkillsRequirement][0][skill] | ci_bspp |
84
- # And I press "delete_mission_type_userSkillsRequirement_1"
85
- # And I press "Enregistrer"
86
- # Then I should be on "/organizations/mission_type/"
87
- # And I should see "mission type name"
88
- # When I follow "Modifier"
89
- # And I should see "CI Réseau BSPP"
74
+ @javascript
75
+ Scenario : As an organization, I can edit a mission type
76
+ Given I am authenticated as "DT75"
77
+ And I am on "/organizations/mission_type/"
78
+ When I follow "Modifier"
79
+ Then I should be on "/organizations/mission_type/751/edit"
80
+ When I fill in the following:
81
+ | mission_type [name ] | mission type name |
82
+ | mission_type [userSkillsRequirement ][0 ][skill ] | ci_bspp |
83
+ And I press "delete_mission_type_userSkillsRequirement_1"
84
+ And I press "Enregistrer"
85
+ Then I should be on "/organizations/mission_type/"
86
+ And I should see "mission type name"
87
+ When I follow "Modifier"
88
+ And I should see "CI Réseau BSPP"
90
89
91
90
Scenario : As an organization, I cannot edit a mission type of another organization
92
91
Given I am authenticated as "DT75"
93
92
And I am on "/organizations/mission_type/771/edit"
94
93
Then the response status code should be 403
95
94
96
- # @javascript
97
- # Scenario: As an organization, I can delete a mission type
98
- # Given I am authenticated as "DT75"
99
- # And I am on "/organizations/mission_type/"
100
- # When I press "Supprimer"
101
- # Then I should see "Vous êtes sur le point de supprimer le type de mission : Mission type DT75 1"
102
- # When I press "Supprimer "
103
- # Then the response status code should be 200
104
- # And I should be on "/organizations/mission_type/"
105
- # And I should not see "Le type de mission a été supprimé avec succès "
106
- # And I should not see "Mission type DT75 1"
95
+ @javascript
96
+ Scenario : As an organization, I can delete a mission type
97
+ Given I am authenticated as "DT75"
98
+ And I am on "/organizations/mission_type/"
99
+ When I follow "Supprimer"
100
+ And I wait for "#delete-item-modal" to be visible
101
+ Then I should see "Vous êtes sur le point de supprimer l'élément : Mission type DT75 1. "
102
+ When I press "Supprimer"
103
+ Then I should be on "/organizations/mission_type/"
104
+ And I should see "Le type de mission a été supprimé avec succès "
105
+ And I should not see "Mission type DT75 1"
107
106
108
107
Scenario : As an organization, I cannot delete a mission type of another organization
109
108
Given I am authenticated as "DT75"
0 commit comments