Commit e8569682a346e594fdbcef4c494da1a00595ce7c

Authored by Diego Camarinha
Committed by Paulo Meireles
1 parent 5191583f

[Mezuro] Fixed project and reading group features.

plugins/mezuro/features/project.feature
... ... @@ -19,6 +19,7 @@ Feature: Project
19 19 Then I should see "Title"
20 20 And I should see "Description"
21 21  
  22 + @kalibro_restart
22 23 Scenario: I create a Mezuro project with valid attributes
23 24 Given I am on mycommunity's control panel
24 25 When I create a Mezuro project with the following data
... ... @@ -35,6 +36,7 @@ Feature: Project
35 36 When I press "Save"
36 37 Then I should see "Title can't be blank"
37 38  
  39 + @kalibro_restart
38 40 Scenario: I try to create a Mezuro project with title already in use
39 41 Given I have a Mezuro project with the following data
40 42 | name | Sample Project |
... ... @@ -46,27 +48,25 @@ Feature: Project
46 48 | Description | Sample Description |
47 49 Then I should see "Slug The title (article name) is already being used by another article, please use another title."
48 50  
49   - @selenium
  51 + @selenium @kalibro_restart
50 52 Scenario: I see a Mezuro project edit form
51 53 Given I have a Mezuro project with the following data
52 54 | name | Sample Project |
53 55 | description | Sample Description |
54 56 | community | mycommunity |
55 57 And I am on article "Sample Project"
56   - And I should be on /mycommunity/sample-project
57 58 When I follow "Edit"
58 59 Then I should see "Sample Project" in the "article_name" input
59 60 And I should see "Sample Description" in the "article_description" input
60 61 And I should see "Save" button
61 62  
62   - @selenium
  63 + @selenium @kalibro_restart
63 64 Scenario: I edit a Mezuro project with valid attributes
64 65 Given I have a Mezuro project with the following data
65 66 | name | Sample Project |
66 67 | description | Sample Description |
67 68 | community | mycommunity |
68 69 And I am on article "Sample Project"
69   - And I should be on /mycommunity/sample-project
70 70 And I follow "Edit"
71 71 When I fill the fields with the new following data
72 72 | article_name | Another Project |
... ... @@ -76,20 +76,19 @@ Feature: Project
76 76 And I should see "Another Description"
77 77 And I should see "Add Repository"
78 78  
79   - @selenium
  79 + @selenium @kalibro_restart
80 80 Scenario: I try to edit a Mezuro project leaving empty its title
81 81 Given I have a Mezuro project with the following data
82 82 | name | Sample Project |
83 83 | description | Sample Description |
84 84 | community | mycommunity |
85 85 And I am on article "Sample Project"
86   - And I should be on /mycommunity/sample-project
87 86 And I follow "Edit"
88 87 When I erase the "article_name" field
89 88 And I press "Save"
90 89 Then I should see "Title can't be blank"
91 90  
92   - @selenium
  91 + @selenium @kalibro_restart
93 92 Scenario: I try to edit a Mezuro project with title of an existing Mezuro Project
94 93 Given I have a Mezuro project with the following data
95 94 | name | Sample Project |
... ... @@ -100,7 +99,6 @@ Feature: Project
100 99 | description | Another Description |
101 100 | community | mycommunity |
102 101 And I am on article "Sample Project"
103   - And I should be on /mycommunity/sample-project
104 102 And I follow "Edit"
105 103 When I fill the fields with the new following data
106 104 | article_name | Another Project |
... ... @@ -108,20 +106,19 @@ Feature: Project
108 106 And I press "Save"
109 107 Then I should see "Slug The title (article name) is already being used by another article, please use another title."
110 108  
111   - @selenium
  109 + @selenium @kalibro_restart
112 110 Scenario: I delete a Mezuro project that belongs to me
113 111 Given I have a Mezuro project with the following data
114 112 | name | Sample Project |
115 113 | description | Sample Description |
116 114 | community | mycommunity |
117 115 And I am on article "Sample Project"
118   - And I should be on /mycommunity/sample-project
119 116 When I follow "Delete"
120 117 And I confirm the "Are you sure that you want to remove the item "Sample Project"?" dialog
121 118 Then I go to /mycommunity/sample-project
122 119 And I should see "There is no such page: /mycommunity/sample-project"
123 120  
124   - @selenium
  121 + @selenium @kalibro_restart
125 122 Scenario: I cannot edit or delete a Mezuro project that doesn't belong to me
126 123 Given I have a Mezuro project with the following data
127 124 | name | Sample Project |
... ... @@ -132,7 +129,6 @@ Feature: Project
132 129 | user | User |
133 130 And I am logged in as "user"
134 131 When I am on article "Sample Project"
135   - And I should be on /mycommunity/sample-project
136 132 Then I should not see "Delete"
137 133 And I should not see "Edit"
138 134  
... ...
plugins/mezuro/features/reading_group.feature
... ... @@ -15,6 +15,7 @@ Feature: Reading Group
15 15 Then I should see "Title"
16 16 And I should see "Description"
17 17  
  18 + @kalibro_restart
18 19 Scenario: I create a Mezuro reading group with valid attributes
19 20 Given I am on joaosilva's control panel
20 21 When I create a Mezuro reading group with the following data
... ... @@ -32,6 +33,7 @@ Feature: Reading Group
32 33 When I press "Save"
33 34 Then I should see "Title can't be blank"
34 35  
  36 + @kalibro_restart
35 37 Scenario: I try to create a Mezuro reading group with title already in use
36 38 Given I have a Mezuro reading group with the following data
37 39 | name | Sample Reading group |
... ... @@ -43,27 +45,25 @@ Feature: Reading Group
43 45 | Description | Sample Description |
44 46 Then I should see "Slug The title (article name) is already being used by another article, please use another title."
45 47  
46   -@selenium
  48 + @selenium @kalibro_restart
47 49 Scenario: I see a Mezuro reading group edit form
48 50 Given I have a Mezuro reading group with the following data
49 51 | name | Sample Reading group |
50 52 | description | Sample Description |
51 53 | user | joaosilva |
52 54 And I am on article "Sample Reading group"
53   - And I should be on /joaosilva/sample-reading-group
54 55 When I follow "Edit"
55 56 Then I should see "Sample Reading group" in the "article_name" input
56 57 And I should see "Sample Description" in the "article_description" input
57 58 And I should see "Save" button
58 59  
59   -@selenium
  60 + @selenium @kalibro_restart
60 61 Scenario: I edit a Mezuro reading group with valid attributes
61 62 Given I have a Mezuro reading group with the following data
62 63 | name | Sample Reading group |
63 64 | description | Sample Description |
64 65 | user | joaosilva |
65 66 And I am on article "Sample Reading group"
66   - And I should be on /joaosilva/sample-reading-group
67 67 And I follow "Edit"
68 68 When I fill the fields with the new following data
69 69 | article_name | Another Reading group |
... ... @@ -73,20 +73,19 @@ Feature: Reading Group
73 73 And I should see "Another Description"
74 74 And I should see "Add Reading"
75 75  
76   -@selenium
  76 + @selenium @kalibro_restart
77 77 Scenario: I try to edit a Mezuro reading group leaving empty its title
78 78 Given I have a Mezuro reading group with the following data
79 79 | name | Sample Reading group |
80 80 | description | Sample Description |
81 81 | user | joaosilva |
82 82 And I am on article "Sample Reading group"
83   - And I should be on /joaosilva/sample-reading-group
84 83 And I follow "Edit"
85 84 When I erase the "article_name" field
86 85 And I press "Save"
87 86 Then I should see "Title can't be blank"
88 87  
89   -@selenium
  88 + @selenium @kalibro_restart
90 89 Scenario: I try to edit a Mezuro reading group with title of an existing Mezuro Reading group
91 90 Given I have a Mezuro reading group with the following data
92 91 | name | Sample Reading group |
... ... @@ -97,7 +96,6 @@ Feature: Reading Group
97 96 | description | Another Description |
98 97 | user | joaosilva |
99 98 And I am on article "Sample Reading group"
100   - And I should be on /joaosilva/sample-reading-group
101 99 And I follow "Edit"
102 100 When I fill the fields with the new following data
103 101 | article_name | Another Reading group |
... ... @@ -105,20 +103,19 @@ Feature: Reading Group
105 103 And I press "Save"
106 104 Then I should see "Slug The title (article name) is already being used by another article, please use another title."
107 105  
108   -@selenium
  106 + @selenium @kalibro_restart
109 107 Scenario: I delete a Mezuro reading group that belongs to me
110 108 Given I have a Mezuro reading group with the following data
111 109 | name | Sample Reading group |
112 110 | description | Sample Description |
113 111 | user | joaosilva |
114 112 And I am on article "Sample Reading group"
115   - And I should be on /joaosilva/sample-reading-group
116 113 When I follow "Delete"
117 114 And I confirm the "Are you sure that you want to remove the item "Sample Reading group"?" dialog
118 115 Then I go to /joaosilva/sample-reading-group
119 116 And I should see "There is no such page: /joaosilva/sample-reading-group"
120 117  
121   -@selenium
  118 + @selenium @kalibro_restart
122 119 Scenario: I cannot edit or delete a Mezuro reading group that doesn't belong to me
123 120 Given I have a Mezuro reading group with the following data
124 121 | name | Sample Reading group |
... ... @@ -129,7 +126,6 @@ Feature: Reading Group
129 126 | adminuser | Admin |
130 127 And I am logged in as "adminuser"
131 128 When I am on article "Sample Reading group"
132   - And I should be on /joaosilva/sample-reading-group
133 129 Then I should not see "Delete"
134 130 And I should not see "Edit"
135 131  
... ...