Commit fb5379b42ab4d2d85dacf04e44b2b8c6b5e34f34

Authored by Daniel
1 parent 38468efa

Change feature names

features/deactivate_software.feature 0 → 100644
... ... @@ -0,0 +1,60 @@
  1 +Feature: deactivate software
  2 + As a administrator of a software
  3 + I want to be able to deactivate
  4 + So that, if needed, I can reactivate it without loosing it's data
  5 +
  6 + Background:
  7 + Given "MpogSoftwarePlugin" plugin is enabled
  8 + And I am logged in as admin
  9 + And I go to /admin/plugins
  10 + And I check "MpogSoftwarePlugin"
  11 + And I press "Save changes"
  12 + And SoftwareInfo has initial default values on database
  13 +
  14 + @selenium
  15 + Scenario: Deactivate a software
  16 + Given the following software language
  17 + | programing_language | version | operating_system |
  18 + | Python | 1.0 | Linux |
  19 + And the following software databases
  20 + | database_name | version | operating_system |
  21 + | PostgreSQL | 1.0 | Linux |
  22 + And the following softwares
  23 + | name | acronym | operating_platform | software_language | software_database |
  24 + | teste | ts | I dont know | Python | PostgreSQL |
  25 + And I go to /plugin/mpog_software/archive_software
  26 + And I should see "teste"
  27 + And I follow "Deactivate software"
  28 + And I confirm the "Do you want to deactivate this software?" dialog
  29 + And I go to /search/communities
  30 + And I fill in "search-input" with "teste"
  31 + And I press "Search"
  32 + Then I should not see "teste" within "search-profile-item"
  33 +
  34 + @selenium
  35 + Scenario: Activate a deactivated software
  36 + Given the following software language
  37 + | programing_language | version | operating_system |
  38 + | Python | 1.0 | Linux |
  39 + And the following software databases
  40 + | database_name | version | operating_system |
  41 + | PostgreSQL | 1.0 | Linux |
  42 + And the following softwares
  43 + | name | acronym | operating_platform | software_language | software_database |
  44 + | teste | ts | I dont know | Python | PostgreSQL |
  45 + And I go to /plugin/mpog_software/archive_software
  46 + And I should see "teste"
  47 + And I follow "Deactivate software"
  48 + And I confirm the "Do you want to deactivate this software?" dialog
  49 + And I go to /search/communities
  50 + And I fill in "search-input" with "teste"
  51 + And I press "Search"
  52 + And I should not see "Teste" within "search-profile-item"
  53 + And I go to /plugin/mpog_software/archive_software
  54 + And I should see "teste"
  55 + And I follow "Activate Software"
  56 + And I confirm the "Do you want to activate this software?" dialog
  57 + And I follow "Communities"
  58 + And I fill in "search-input" with "teste"
  59 + And I press "Search"
  60 + Then I should see "teste" within "search-profile-item"
... ...
features/manage_software.feature
... ... @@ -1,59 +0,0 @@
1   -Feature:
2   - As a administrator of a software
3   - I want to manage it
4   -
5   - Background:
6   - Given "MpogSoftwarePlugin" plugin is enabled
7   - And I am logged in as admin
8   - And I go to /admin/plugins
9   - And I check "MpogSoftwarePlugin"
10   - And I press "Save changes"
11   - And SoftwareInfo has initial default values on database
12   -
13   - @selenium
14   - Scenario: Deactivate a software
15   - Given the following software language
16   - | programing_language | version | operating_system |
17   - | Python | 1.0 | Linux |
18   - And the following software databases
19   - | database_name | version | operating_system |
20   - | PostgreSQL | 1.0 | Linux |
21   - And the following softwares
22   - | name | acronym | operating_platform | software_language | software_database |
23   - | teste | ts | I dont know | Python | PostgreSQL |
24   - And I go to /plugin/mpog_software/archive_software
25   - And I should see "teste"
26   - And I follow "Deactivate software"
27   - And I confirm the "Do you want to deactivate this software?" dialog
28   - And I go to /search/communities
29   - And I fill in "search-input" with "teste"
30   - And I press "Search"
31   - Then I should not see "teste" within "search-profile-item"
32   -
33   - @selenium
34   - Scenario: Activate a deactivated software
35   - Given the following software language
36   - | programing_language | version | operating_system |
37   - | Python | 1.0 | Linux |
38   - And the following software databases
39   - | database_name | version | operating_system |
40   - | PostgreSQL | 1.0 | Linux |
41   - And the following softwares
42   - | name | acronym | operating_platform | software_language | software_database |
43   - | teste | ts | I dont know | Python | PostgreSQL |
44   - And I go to /plugin/mpog_software/archive_software
45   - And I should see "teste"
46   - And I follow "Deactivate software"
47   - And I confirm the "Do you want to deactivate this software?" dialog
48   - And I go to /search/communities
49   - And I fill in "search-input" with "teste"
50   - And I press "Search"
51   - And I should not see "Teste" within "search-profile-item"
52   - And I go to /plugin/mpog_software/archive_software
53   - And I should see "teste"
54   - And I follow "Activate Software"
55   - And I confirm the "Do you want to activate this software?" dialog
56   - And I follow "Communities"
57   - And I fill in "search-input" with "teste"
58   - And I press "Search"
59   - Then I should see "teste" within "search-profile-item"
features/software_info_validation.feature
... ... @@ -1,435 +0,0 @@
1   -Feature:
2   - As a user
3   - I want to create a new software
4   -
5   - Background:
6   - Given "MpogSoftwarePlugin" plugin is enabled
7   - And SoftwareInfo has initial default values on database
8   - And I am logged in as admin
9   - And I go to /admin/plugins
10   - And I check "MpogSoftwarePlugin"
11   - And I press "Save changes"
12   -
13   - @selenium
14   - Scenario: Do not show error message if all required fields are correctly filled
15   - Given I go to admin_user's control panel
16   - And I follow "Manage my groups"
17   - And I follow "Create a new software"
18   - And I fill in "community_name" with "test name"
19   - And I fill in "language__version" with "2.0.0"
20   - And I fill in "language__operating_system" with "Linux"
21   - And I fill in "database__version" with "3.0"
22   - And I fill in "database__operating_system" with "GNU"
23   - And I fill in "operating_system__version" with "3.0"
24   - And I fill in "software_info_operating_platform" with "test operating platform"
25   - And fill in "software_info_acronym" with "SFTW"
26   - And I press "Create"
27   - Then I should see "Manage my groups"
28   -
29   - Scenario: Show operating_platform errors if this field is blank
30   - Given I go to admin_user's control panel
31   - And I follow "Manage my groups"
32   - And I follow "Create a new software"
33   - And fill in "community_name" with "test"
34   - And fill in "language__version" with "2.0.0"
35   - And fill in "language__operating_system" with "Linux"
36   - And I fill in "database__version" with "3.0"
37   - And I fill in "database__operating_system" with "GNU"
38   - And fill in "software_info_acronym" with "SFTW"
39   - And I press "Create"
40   - Then I should see "Operating platform can't be blank"
41   -
42   - Scenario: Do not show operating_platform errors if this field is not blank
43   - Given I go to admin_user's control panel
44   - And I follow "Manage my groups"
45   - And I follow "Create a new software"
46   - And fill in "software_info_operating_platform" with "test operating platform"
47   - And fill in "language__version" with "2.0.0"
48   - And fill in "language__operating_system" with "Linux"
49   - And I fill in "database__version" with "3.0"
50   - And I fill in "database__operating_system" with "GNU"
51   - And I press "Create"
52   - Then I should not see "Operating platform can't be blank"
53   -
54   - @selenium
55   - Scenario: Show software_langue errors if this Version is blank
56   - Given I go to admin_user's control panel
57   - And I follow "Manage my groups"
58   - And I follow "Create a new software"
59   - And fill in "community_name" with "test"
60   - And fill in "language__operating_system" with "Linux"
61   - And I fill in "database__version" with "3.0"
62   - And I fill in "database__operating_system" with "GNU"
63   - And I press "Create"
64   - Then I should see "Software languages is invalid"
65   -
66   - Scenario: Show acronym errors if this field is blank
67   - Given I go to admin_user's control panel
68   - And I follow "Manage my groups"
69   - And I follow "Create a new software"
70   - And fill in "community_name" with "test"
71   - And fill in "language__version" with "2.0.0"
72   - And fill in "language__operating_system" with "Linux"
73   - And I fill in "database__version" with "3.0"
74   - And I fill in "database__operating_system" with "GNU"
75   - And I press "Create"
76   - Then I should see "Acronym can't be blank"
77   -
78   - @selenium
79   - Scenario: Show database_fields errors version is blank
80   - Given I go to admin_user's control panel
81   - And I follow "Manage my groups"
82   - And I follow "Create a new software"
83   - And fill in "community_name" with "test"
84   - And fill in "language__version" with "2.0.0"
85   - And fill in "language__operating_system" with "Linux"
86   - And I fill in "database__operating_system" with "GNU"
87   - And I press "Create"
88   - Then I should see "Software databases is invalid"
89   -
90   - Scenario: Show acronym errors if this field has more than 8 characters
91   - Given I go to admin_user's control panel
92   - And I follow "Manage my groups"
93   - And I follow "Create a new software"
94   - And fill in "community_name" with "test"
95   - And fill in "language__version" with "2.0.0"
96   - And fill in "language__operating_system" with "Linux"
97   - And I fill in "database__operating_system" with "GNU"
98   - And I fill in "database__version" with "3.0"
99   - And I press "Create"
100   - And fill in "software_info_acronym" with "123456789"
101   - And I press "Create"
102   - Then I should see "Acronym can't have more than 8 characteres"
103   -
104   - Scenario: Show operating system errors if this field is not filled
105   - Given I go to admin_user's control panel
106   - And I follow "Manage my groups"
107   - And I follow "Create a new software"
108   - And I press "Create"
109   - Then I should see "Operating system : at least one must be filled"
110   -
111   - @selenium
112   - Scenario: Show operating system errors if this field is not filled
113   - Given I go to admin_user's control panel
114   - And I follow "Manage my groups"
115   - And I follow "Create a new software"
116   - And I fill in "operating_system__version" with "3.0"
117   - And I press "Create"
118   - Then I should not see "Operating system : at least one must be filled"
119   -
120   - Scenario: Show library fields when click in New Library
121   - Given I go to admin_user's control panel
122   - And I follow "Manage my groups"
123   - And I follow "Create a new software"
124   - And I follow "New Library"
125   - Then I should see "Name"
126   - Then I should see "Version"
127   - Then I should see "License"
128   -
129   - @selenium
130   - Scenario: Show SoftwareLangue fields when click in New Language
131   - Given I go to admin_user's control panel
132   - And I follow "Manage my groups"
133   - And I follow "Create a new software"
134   - And I follow "New language"
135   - Then I should see "3" of this selector ".software-language-table"
136   - #3 because one is always hidden
137   -
138   - @selenium
139   - Scenario: Show databasefields when click in New database
140   - Given I go to admin_user's control panel
141   - And I follow "Manage my groups"
142   - And I follow "Create a new software"
143   - And I follow "New Database"
144   - Then I should see "3" of this selector ".database-table"
145   - #3 because one is always hidden
146   -
147   - @selenium
148   - Scenario: Create software with libraries
149   - Given I go to admin_user's control panel
150   - And I follow "Manage my groups"
151   - And I follow "Create a new software"
152   - And I follow "New Library"
153   - And I fill in "community_name" with "test123"
154   - And fill in "software_info_acronym" with "SFTW"
155   - And I fill in "software_info_operating_platform" with "test platform"
156   - And I fill in "library__name" with "test library name"
157   - And I fill in "library__version" with "test library version"
158   - And I fill in "library__license" with "test library license"
159   - And fill in "language__version" with "2.0.0"
160   - And fill in "language__operating_system" with "Linux"
161   - And I fill in "database__version" with "3.0"
162   - And I fill in "database__operating_system" with "GNU"
163   - And I fill in "operating_system__version" with "3.0"
164   - And I press "Create"
165   - And I go to /myprofile/test123/profile_editor/edit
166   - And I should see "Libraries"
167   - And selector ".library-table" should have any "test library name"
168   - And selector ".library-table" should have any "test library version"
169   - Then selector ".library-table" should have any "test library license"
170   -
171   - @selenium
172   - Scenario: Delete software libraries
173   - Given I go to admin_user's control panel
174   - And I follow "Manage my groups"
175   - And I follow "Create a new software"
176   - And I follow "New Library"
177   - And I fill in "community_name" with "test123"
178   - And fill in "software_info_acronym" with "SFTW"
179   - And I fill in "software_info_operating_platform" with "test platform"
180   - And I fill in "library__name" with "test name"
181   - And I fill in "library__version" with "test version"
182   - And I fill in "library__license" with "test license"
183   - And fill in "language__version" with "2.0.0"
184   - And fill in "language__operating_system" with "Linux"
185   - And I fill in "database__version" with "3.0"
186   - And I fill in "database__operating_system" with "GNU"
187   - And I fill in "operating_system__version" with "3.0"
188   - And I press "Create"
189   - And I go to /myprofile/test123/profile_editor/edit
190   - And I should see "Libraries"
191   - And selector ".library-table" should have any "test name"
192   - And selector ".library-table" should have any "test version"
193   - And selector ".library-table" should have any "test license"
194   - And I follow "Delete"
195   - And I press "Save"
196   - And I go to /myprofile/test123/profile_editor/edit
197   - And I should not see "test name" within "#library__name"
198   - And I should not see "test version" within "#library__version"
199   - Then I should not see "test license" within "#library__license"
200   -
201   - @selenium
202   - Scenario: Crete software libraries on software edit
203   - Given I go to admin_user's control panel
204   - And I follow "Manage my groups"
205   - And I follow "Create a new software"
206   - And I fill in "community_name" with "test123"
207   - And fill in "software_info_acronym" with "SFTW"
208   - And I fill in "software_info_operating_platform" with "test platform"
209   - And fill in "language__version" with "2.0.0"
210   - And fill in "language__operating_system" with "Linux"
211   - And I fill in "database__version" with "3.0"
212   - And I fill in "database__operating_system" with "GNU"
213   - And I fill in "operating_system__version" with "3.0"
214   - And I press "Create"
215   - And I go to /myprofile/test123/profile_editor/edit
216   - And I follow "New Library"
217   - And I fill in "library__name" with "test name"
218   - And I fill in "library__version" with "test version"
219   - And I fill in "library__license" with "test license"
220   - And I press "Save"
221   - And I go to /myprofile/test123/profile_editor/edit
222   - And I should see "Libraries"
223   - And selector ".library-table" should have any "test name"
224   - And selector ".library-table" should have any "test version"
225   - Then selector ".library-table" should have any "test license"
226   -
227   - @selenium
228   - Scenario: Edit software libraries on software edit
229   - Given I go to admin_user's control panel
230   - And I follow "Manage my groups"
231   - And I follow "Create a new software"
232   - And I follow "New Library"
233   - And I fill in "community_name" with "test123"
234   - And fill in "software_info_acronym" with "SFTW"
235   - And I fill in "software_info_operating_platform" with "test platform"
236   - And I fill in "library__name" with "test name"
237   - And I fill in "library__version" with "test version"
238   - And I fill in "library__license" with "test license"
239   - And fill in "language__version" with "2.0.0"
240   - And fill in "language__operating_system" with "Linux"
241   - And I fill in "database__version" with "3.0"
242   - And I fill in "database__operating_system" with "GNU"
243   - And I fill in "operating_system__version" with "3.0"
244   - And I press "Create"
245   - And I go to /myprofile/test123/profile_editor/edit
246   - And I should see "Libraries"
247   - And selector ".library-table" should have any "test name"
248   - And selector ".library-table" should have any "test version"
249   - And selector ".library-table" should have any "test license"
250   - And I follow "New Library"
251   - And I fill in "library__name" with "new name"
252   - And I fill in "library__version" with "new version"
253   - And I fill in "library__license" with "new license"
254   - And I press "Save"
255   - And I go to /myprofile/test123/profile_editor/edit
256   - And selector ".library-table" should have any "new name"
257   - And selector ".library-table" should have any "new version"
258   - Then selector ".library-table" should have any "new license"
259   -
260   - @selenium
261   - Scenario: change license field
262   - Given I go to admin_user's control panel
263   - And I follow "Manage my groups"
264   - And I follow "Create a new software"
265   - And I fill in "community_name" with "test123"
266   - And fill in "software_info_acronym" with "SFTW"
267   - And I fill in "software_info_operating_platform" with "test platform"
268   - And I select "GPL-2" from "license_info_version"
269   - And fill in "language__version" with "2.0.0"
270   - And fill in "language__operating_system" with "Linux"
271   - And I fill in "database__version" with "3.0"
272   - And I fill in "database__operating_system" with "GNU"
273   - And I fill in "operating_system__version" with "3.0"
274   - And I press "Create"
275   - And I go to /myprofile/test123/profile_editor/edit
276   - And I select "GPL-3" from "version"
277   - And I press "Save"
278   - And I go to /myprofile/test123/profile_editor/edit
279   - Then I should see "GPL-3"
280   -
281   - @selenium
282   - Scenario: license link appears on the create software page
283   - Given I go to admin_user's control panel
284   - And I follow "Manage my groups"
285   - And I follow "Create a new software"
286   - And I fill in "community_name" with "test123"
287   - And I fill in "software_info_operating_platform" with "test platform"
288   - And I select "GPL-2" from "license_info_version"
289   - Then I should see "www.gpl2.com" within "#version_link"
290   -
291   - @selenium
292   - Scenario: license link changes if the user choose a different license
293   - Given I go to admin_user's control panel
294   - And I follow "Manage my groups"
295   - And I follow "Create a new software"
296   - And I fill in "community_name" with "test123"
297   - And I fill in "software_info_operating_platform" with "test platform"
298   - And I select "GPL-2" from "license_info_version"
299   - And I should see "www.gpl2.com" within "#version_link"
300   - And I select "GPL-3" from "license_info_version"
301   - Then I should see "www.gpl3.com" within "#version_link"
302   -
303   - @selenium
304   - Scenario: Crete software with Language
305   - Given I go to admin_user's control panel
306   - And I follow "Manage my groups"
307   - And I follow "Create a new software"
308   - And I fill in "community_name" with "test123"
309   - And fill in "software_info_acronym" with "SFTW"
310   - And I fill in "software_info_operating_platform" with "test platform"
311   - And fill in "language__version" with "2.0.0"
312   - And fill in "language__operating_system" with "Linux"
313   - And I fill in "database__version" with "3.0"
314   - And I fill in "database__operating_system" with "GNU"
315   - And I fill in "operating_system__version" with "3.0"
316   - And I press "Create"
317   - And I go to /myprofile/test123/profile_editor/edit
318   - And I should see "Programming Languages"
319   - And selector ".software-language-table" should have any "2.0.0"
320   - Then selector ".software-language-table" should have any "Linux"
321   -
322   - @selenium
323   - Scenario: Edit softwareLanguage on profile editor
324   - Given I go to admin_user's control panel
325   - And I follow "Manage my groups"
326   - And I follow "Create a new software"
327   - And I fill in "community_name" with "test123"
328   - And fill in "software_info_acronym" with "SFTW"
329   - And I fill in "software_info_operating_platform" with "test platform"
330   - And fill in "language__version" with "2.0.0"
331   - And fill in "language__operating_system" with "Linux"
332   - And I fill in "database__version" with "3.0"
333   - And I fill in "database__operating_system" with "GNU"
334   - And I fill in "operating_system__version" with "3.0"
335   - And I press "Create"
336   - And I go to /myprofile/test123/profile_editor/edit
337   - And I should see "Programming Languages"
338   - And selector ".software-language-table" should have any "2.0.0"
339   - And selector ".software-language-table" should have any "Linux"
340   - And I select "Python" from "language__programming_language_id"
341   - And fill in "language__version" with "3.2"
342   - And fill in "language__operating_system" with "GNU"
343   - And I press "Save"
344   - And I go to /myprofile/test123/profile_editor/edit
345   - And selector ".software-language-table" should have any "Python"
346   - And selector ".software-language-table" should have any "3.2"
347   - Then selector ".software-language-table" should have any "GNU"
348   -
349   - @selenium
350   - Scenario: Adding new softwareLanguage on profile editor
351   - Given I go to admin_user's control panel
352   - And I follow "Manage my groups"
353   - And I follow "Create a new software"
354   - And I fill in "community_name" with "test123"
355   - And fill in "software_info_acronym" with "SFTW"
356   - And I fill in "software_info_operating_platform" with "test platform"
357   - And fill in "language__version" with "2.0.0"
358   - And fill in "language__operating_system" with "Linux"
359   - And I fill in "database__version" with "3.0"
360   - And I fill in "database__operating_system" with "GNU"
361   - And I fill in "operating_system__version" with "3.0"
362   - And I press "Create"
363   - And I go to /myprofile/test123/profile_editor/edit
364   - And I should see "Programming Languages"
365   - And selector ".software-language-table" should have any "2.0.0"
366   - And selector ".software-language-table" should have any "Linux"
367   - And I follow "New language"
368   - And I click on the first button with class ".delete-dynamic-table"
369   - And I click on table number "2" selector ".software-language-table" and select the value "Python"
370   - And I fill with "4.3" in field with name "language[][version]" of table number "2" with class ".software-language-table"
371   - And I fill with "Windows" in field with name "language[][operating_system]" of table number "2" with class ".software-language-table"
372   - And I press "Save"
373   - And I go to /myprofile/test123/profile_editor/edit
374   - And selector ".software-language-table" should have any "Python"
375   - And selector ".software-language-table" should have any "4.3"
376   - Then selector ".software-language-table" should have any "Windows"
377   -
378   - @selenium
379   - Scenario: Edit softwareDatabase on profile editor
380   - Given I go to admin_user's control panel
381   - And I follow "Manage my groups"
382   - And I follow "Create a new software"
383   - And I fill in "community_name" with "test123"
384   - And fill in "software_info_acronym" with "SFTW"
385   - And I fill in "software_info_operating_platform" with "test platform"
386   - And fill in "language__version" with "2.0.0"
387   - And fill in "language__operating_system" with "Linux"
388   - And I fill in "database__version" with "3.0"
389   - And I fill in "database__operating_system" with "GNU"
390   - And I fill in "operating_system__version" with "3.0"
391   - And I press "Create"
392   - And I go to /myprofile/test123/profile_editor/edit
393   - And I should see "Databases"
394   - And selector ".database-table" should have any "3.0"
395   - And selector ".database-table" should have any "GNU"
396   - And I select "PostgreSQL" from "database__database_description_id"
397   - And fill in "database__version" with "3.2"
398   - And fill in "database__operating_system" with "Linux"
399   - And I press "Save"
400   - And I go to /myprofile/test123/profile_editor/edit
401   - And selector ".database-table" should have any "PostgreSQL"
402   - And selector ".database-table" should have any "3.2"
403   - Then selector ".database-table" should have any "Linux"
404   -
405   - @selenium
406   - Scenario: Delete softwareDatabase on profile editor
407   - Given I go to admin_user's control panel
408   - And I follow "Manage my groups"
409   - And I follow "Create a new software"
410   - And I fill in "community_name" with "test123"
411   - And fill in "software_info_acronym" with "SFTW"
412   - And I fill in "software_info_operating_platform" with "test platform"
413   - And fill in "language__version" with "2.0.0"
414   - And fill in "language__operating_system" with "Linux"
415   - And I fill in "database__version" with "3.5"
416   - And I fill in "database__operating_system" with "Solaris"
417   - And I fill in "operating_system__version" with "3.0"
418   - And I press "Create"
419   - And I go to /myprofile/test123/profile_editor/edit
420   - And I should see "Databases"
421   - And selector ".database-table" should have any "3.5"
422   - And selector ".database-table" should have any "Solaris"
423   - And I follow "New Database"
424   - And I click on table number "2" selector ".database-table" and select the value "MariaDB"
425   - And I fill with "4.3" in field with name "database[][version]" of table number "2" with class ".database-table"
426   - And I fill with "Windows" in field with name "database[][operating_system]" of table number "2" with class ".database-table"
427   - And I click on the first button with class ".database-table .delete-dynamic-table"
428   - And I press "Save"
429   - And I go to /myprofile/test123/profile_editor/edit
430   - And selector ".database-table" should have any "MariaDB"
431   - And selector ".database-table" should have any "4.3"
432   - And selector ".database-table" should have any "Windows"
433   - And I should not see "4th Dimension"
434   - And I should not see "3.5"
435   - And I should not see "Solaris"
436 0 \ No newline at end of file
features/software_registration.feature 0 → 100644
... ... @@ -0,0 +1,436 @@
  1 +Feature: software registration
  2 + As a user
  3 + I want to create a new software
  4 + So that I can have software communities on my network
  5 +
  6 + Background:
  7 + Given "MpogSoftwarePlugin" plugin is enabled
  8 + And SoftwareInfo has initial default values on database
  9 + And I am logged in as admin
  10 + And I go to /admin/plugins
  11 + And I check "MpogSoftwarePlugin"
  12 + And I press "Save changes"
  13 +
  14 + @selenium
  15 + Scenario: Do not show error message if all required fields are correctly filled
  16 + Given I go to admin_user's control panel
  17 + And I follow "Manage my groups"
  18 + And I follow "Create a new software"
  19 + And I fill in "community_name" with "test name"
  20 + And I fill in "language__version" with "2.0.0"
  21 + And I fill in "language__operating_system" with "Linux"
  22 + And I fill in "database__version" with "3.0"
  23 + And I fill in "database__operating_system" with "GNU"
  24 + And I fill in "operating_system__version" with "3.0"
  25 + And I fill in "software_info_operating_platform" with "test operating platform"
  26 + And fill in "software_info_acronym" with "SFTW"
  27 + And I press "Create"
  28 + Then I should see "Manage my groups"
  29 +
  30 + Scenario: Show operating_platform errors if this field is blank
  31 + Given I go to admin_user's control panel
  32 + And I follow "Manage my groups"
  33 + And I follow "Create a new software"
  34 + And fill in "community_name" with "test"
  35 + And fill in "language__version" with "2.0.0"
  36 + And fill in "language__operating_system" with "Linux"
  37 + And I fill in "database__version" with "3.0"
  38 + And I fill in "database__operating_system" with "GNU"
  39 + And fill in "software_info_acronym" with "SFTW"
  40 + And I press "Create"
  41 + Then I should see "Operating platform can't be blank"
  42 +
  43 + Scenario: Do not show operating_platform errors if this field is not blank
  44 + Given I go to admin_user's control panel
  45 + And I follow "Manage my groups"
  46 + And I follow "Create a new software"
  47 + And fill in "software_info_operating_platform" with "test operating platform"
  48 + And fill in "language__version" with "2.0.0"
  49 + And fill in "language__operating_system" with "Linux"
  50 + And I fill in "database__version" with "3.0"
  51 + And I fill in "database__operating_system" with "GNU"
  52 + And I press "Create"
  53 + Then I should not see "Operating platform can't be blank"
  54 +
  55 + @selenium
  56 + Scenario: Show software_langue errors if this Version is blank
  57 + Given I go to admin_user's control panel
  58 + And I follow "Manage my groups"
  59 + And I follow "Create a new software"
  60 + And fill in "community_name" with "test"
  61 + And fill in "language__operating_system" with "Linux"
  62 + And I fill in "database__version" with "3.0"
  63 + And I fill in "database__operating_system" with "GNU"
  64 + And I press "Create"
  65 + Then I should see "Software languages is invalid"
  66 +
  67 + Scenario: Show acronym errors if this field is blank
  68 + Given I go to admin_user's control panel
  69 + And I follow "Manage my groups"
  70 + And I follow "Create a new software"
  71 + And fill in "community_name" with "test"
  72 + And fill in "language__version" with "2.0.0"
  73 + And fill in "language__operating_system" with "Linux"
  74 + And I fill in "database__version" with "3.0"
  75 + And I fill in "database__operating_system" with "GNU"
  76 + And I press "Create"
  77 + Then I should see "Acronym can't be blank"
  78 +
  79 + @selenium
  80 + Scenario: Show database_fields errors version is blank
  81 + Given I go to admin_user's control panel
  82 + And I follow "Manage my groups"
  83 + And I follow "Create a new software"
  84 + And fill in "community_name" with "test"
  85 + And fill in "language__version" with "2.0.0"
  86 + And fill in "language__operating_system" with "Linux"
  87 + And I fill in "database__operating_system" with "GNU"
  88 + And I press "Create"
  89 + Then I should see "Software databases is invalid"
  90 +
  91 + Scenario: Show acronym errors if this field has more than 8 characters
  92 + Given I go to admin_user's control panel
  93 + And I follow "Manage my groups"
  94 + And I follow "Create a new software"
  95 + And fill in "community_name" with "test"
  96 + And fill in "language__version" with "2.0.0"
  97 + And fill in "language__operating_system" with "Linux"
  98 + And I fill in "database__operating_system" with "GNU"
  99 + And I fill in "database__version" with "3.0"
  100 + And I press "Create"
  101 + And fill in "software_info_acronym" with "123456789"
  102 + And I press "Create"
  103 + Then I should see "Acronym can't have more than 8 characteres"
  104 +
  105 + Scenario: Show operating system errors if this field is not filled
  106 + Given I go to admin_user's control panel
  107 + And I follow "Manage my groups"
  108 + And I follow "Create a new software"
  109 + And I press "Create"
  110 + Then I should see "Operating system : at least one must be filled"
  111 +
  112 + @selenium
  113 + Scenario: Show operating system errors if this field is not filled
  114 + Given I go to admin_user's control panel
  115 + And I follow "Manage my groups"
  116 + And I follow "Create a new software"
  117 + And I fill in "operating_system__version" with "3.0"
  118 + And I press "Create"
  119 + Then I should not see "Operating system : at least one must be filled"
  120 +
  121 + Scenario: Show library fields when click in New Library
  122 + Given I go to admin_user's control panel
  123 + And I follow "Manage my groups"
  124 + And I follow "Create a new software"
  125 + And I follow "New Library"
  126 + Then I should see "Name"
  127 + Then I should see "Version"
  128 + Then I should see "License"
  129 +
  130 + @selenium
  131 + Scenario: Show SoftwareLangue fields when click in New Language
  132 + Given I go to admin_user's control panel
  133 + And I follow "Manage my groups"
  134 + And I follow "Create a new software"
  135 + And I follow "New language"
  136 + Then I should see "3" of this selector ".software-language-table"
  137 + #3 because one is always hidden
  138 +
  139 + @selenium
  140 + Scenario: Show databasefields when click in New database
  141 + Given I go to admin_user's control panel
  142 + And I follow "Manage my groups"
  143 + And I follow "Create a new software"
  144 + And I follow "New Database"
  145 + Then I should see "3" of this selector ".database-table"
  146 + #3 because one is always hidden
  147 +
  148 + @selenium
  149 + Scenario: Create software with libraries
  150 + Given I go to admin_user's control panel
  151 + And I follow "Manage my groups"
  152 + And I follow "Create a new software"
  153 + And I follow "New Library"
  154 + And I fill in "community_name" with "test123"
  155 + And fill in "software_info_acronym" with "SFTW"
  156 + And I fill in "software_info_operating_platform" with "test platform"
  157 + And I fill in "library__name" with "test library name"
  158 + And I fill in "library__version" with "test library version"
  159 + And I fill in "library__license" with "test library license"
  160 + And fill in "language__version" with "2.0.0"
  161 + And fill in "language__operating_system" with "Linux"
  162 + And I fill in "database__version" with "3.0"
  163 + And I fill in "database__operating_system" with "GNU"
  164 + And I fill in "operating_system__version" with "3.0"
  165 + And I press "Create"
  166 + And I go to /myprofile/test123/profile_editor/edit
  167 + And I should see "Libraries"
  168 + And selector ".library-table" should have any "test library name"
  169 + And selector ".library-table" should have any "test library version"
  170 + Then selector ".library-table" should have any "test library license"
  171 +
  172 + @selenium
  173 + Scenario: Delete software libraries
  174 + Given I go to admin_user's control panel
  175 + And I follow "Manage my groups"
  176 + And I follow "Create a new software"
  177 + And I follow "New Library"
  178 + And I fill in "community_name" with "test123"
  179 + And fill in "software_info_acronym" with "SFTW"
  180 + And I fill in "software_info_operating_platform" with "test platform"
  181 + And I fill in "library__name" with "test name"
  182 + And I fill in "library__version" with "test version"
  183 + And I fill in "library__license" with "test license"
  184 + And fill in "language__version" with "2.0.0"
  185 + And fill in "language__operating_system" with "Linux"
  186 + And I fill in "database__version" with "3.0"
  187 + And I fill in "database__operating_system" with "GNU"
  188 + And I fill in "operating_system__version" with "3.0"
  189 + And I press "Create"
  190 + And I go to /myprofile/test123/profile_editor/edit
  191 + And I should see "Libraries"
  192 + And selector ".library-table" should have any "test name"
  193 + And selector ".library-table" should have any "test version"
  194 + And selector ".library-table" should have any "test license"
  195 + And I follow "Delete"
  196 + And I press "Save"
  197 + And I go to /myprofile/test123/profile_editor/edit
  198 + And I should not see "test name" within "#library__name"
  199 + And I should not see "test version" within "#library__version"
  200 + Then I should not see "test license" within "#library__license"
  201 +
  202 + @selenium
  203 + Scenario: Crete software libraries on software edit
  204 + Given I go to admin_user's control panel
  205 + And I follow "Manage my groups"
  206 + And I follow "Create a new software"
  207 + And I fill in "community_name" with "test123"
  208 + And fill in "software_info_acronym" with "SFTW"
  209 + And I fill in "software_info_operating_platform" with "test platform"
  210 + And fill in "language__version" with "2.0.0"
  211 + And fill in "language__operating_system" with "Linux"
  212 + And I fill in "database__version" with "3.0"
  213 + And I fill in "database__operating_system" with "GNU"
  214 + And I fill in "operating_system__version" with "3.0"
  215 + And I press "Create"
  216 + And I go to /myprofile/test123/profile_editor/edit
  217 + And I follow "New Library"
  218 + And I fill in "library__name" with "test name"
  219 + And I fill in "library__version" with "test version"
  220 + And I fill in "library__license" with "test license"
  221 + And I press "Save"
  222 + And I go to /myprofile/test123/profile_editor/edit
  223 + And I should see "Libraries"
  224 + And selector ".library-table" should have any "test name"
  225 + And selector ".library-table" should have any "test version"
  226 + Then selector ".library-table" should have any "test license"
  227 +
  228 + @selenium
  229 + Scenario: Edit software libraries on software edit
  230 + Given I go to admin_user's control panel
  231 + And I follow "Manage my groups"
  232 + And I follow "Create a new software"
  233 + And I follow "New Library"
  234 + And I fill in "community_name" with "test123"
  235 + And fill in "software_info_acronym" with "SFTW"
  236 + And I fill in "software_info_operating_platform" with "test platform"
  237 + And I fill in "library__name" with "test name"
  238 + And I fill in "library__version" with "test version"
  239 + And I fill in "library__license" with "test license"
  240 + And fill in "language__version" with "2.0.0"
  241 + And fill in "language__operating_system" with "Linux"
  242 + And I fill in "database__version" with "3.0"
  243 + And I fill in "database__operating_system" with "GNU"
  244 + And I fill in "operating_system__version" with "3.0"
  245 + And I press "Create"
  246 + And I go to /myprofile/test123/profile_editor/edit
  247 + And I should see "Libraries"
  248 + And selector ".library-table" should have any "test name"
  249 + And selector ".library-table" should have any "test version"
  250 + And selector ".library-table" should have any "test license"
  251 + And I follow "New Library"
  252 + And I fill in "library__name" with "new name"
  253 + And I fill in "library__version" with "new version"
  254 + And I fill in "library__license" with "new license"
  255 + And I press "Save"
  256 + And I go to /myprofile/test123/profile_editor/edit
  257 + And selector ".library-table" should have any "new name"
  258 + And selector ".library-table" should have any "new version"
  259 + Then selector ".library-table" should have any "new license"
  260 +
  261 + @selenium
  262 + Scenario: change license field
  263 + Given I go to admin_user's control panel
  264 + And I follow "Manage my groups"
  265 + And I follow "Create a new software"
  266 + And I fill in "community_name" with "test123"
  267 + And fill in "software_info_acronym" with "SFTW"
  268 + And I fill in "software_info_operating_platform" with "test platform"
  269 + And I select "GPL-2" from "license_info_version"
  270 + And fill in "language__version" with "2.0.0"
  271 + And fill in "language__operating_system" with "Linux"
  272 + And I fill in "database__version" with "3.0"
  273 + And I fill in "database__operating_system" with "GNU"
  274 + And I fill in "operating_system__version" with "3.0"
  275 + And I press "Create"
  276 + And I go to /myprofile/test123/profile_editor/edit
  277 + And I select "GPL-3" from "version"
  278 + And I press "Save"
  279 + And I go to /myprofile/test123/profile_editor/edit
  280 + Then I should see "GPL-3"
  281 +
  282 + @selenium
  283 + Scenario: license link appears on the create software page
  284 + Given I go to admin_user's control panel
  285 + And I follow "Manage my groups"
  286 + And I follow "Create a new software"
  287 + And I fill in "community_name" with "test123"
  288 + And I fill in "software_info_operating_platform" with "test platform"
  289 + And I select "GPL-2" from "license_info_version"
  290 + Then I should see "www.gpl2.com" within "#version_link"
  291 +
  292 + @selenium
  293 + Scenario: license link changes if the user choose a different license
  294 + Given I go to admin_user's control panel
  295 + And I follow "Manage my groups"
  296 + And I follow "Create a new software"
  297 + And I fill in "community_name" with "test123"
  298 + And I fill in "software_info_operating_platform" with "test platform"
  299 + And I select "GPL-2" from "license_info_version"
  300 + And I should see "www.gpl2.com" within "#version_link"
  301 + And I select "GPL-3" from "license_info_version"
  302 + Then I should see "www.gpl3.com" within "#version_link"
  303 +
  304 + @selenium
  305 + Scenario: Crete software with Language
  306 + Given I go to admin_user's control panel
  307 + And I follow "Manage my groups"
  308 + And I follow "Create a new software"
  309 + And I fill in "community_name" with "test123"
  310 + And fill in "software_info_acronym" with "SFTW"
  311 + And I fill in "software_info_operating_platform" with "test platform"
  312 + And fill in "language__version" with "2.0.0"
  313 + And fill in "language__operating_system" with "Linux"
  314 + And I fill in "database__version" with "3.0"
  315 + And I fill in "database__operating_system" with "GNU"
  316 + And I fill in "operating_system__version" with "3.0"
  317 + And I press "Create"
  318 + And I go to /myprofile/test123/profile_editor/edit
  319 + And I should see "Programming Languages"
  320 + And selector ".software-language-table" should have any "2.0.0"
  321 + Then selector ".software-language-table" should have any "Linux"
  322 +
  323 + @selenium
  324 + Scenario: Edit softwareLanguage on profile editor
  325 + Given I go to admin_user's control panel
  326 + And I follow "Manage my groups"
  327 + And I follow "Create a new software"
  328 + And I fill in "community_name" with "test123"
  329 + And fill in "software_info_acronym" with "SFTW"
  330 + And I fill in "software_info_operating_platform" with "test platform"
  331 + And fill in "language__version" with "2.0.0"
  332 + And fill in "language__operating_system" with "Linux"
  333 + And I fill in "database__version" with "3.0"
  334 + And I fill in "database__operating_system" with "GNU"
  335 + And I fill in "operating_system__version" with "3.0"
  336 + And I press "Create"
  337 + And I go to /myprofile/test123/profile_editor/edit
  338 + And I should see "Programming Languages"
  339 + And selector ".software-language-table" should have any "2.0.0"
  340 + And selector ".software-language-table" should have any "Linux"
  341 + And I select "Python" from "language__programming_language_id"
  342 + And fill in "language__version" with "3.2"
  343 + And fill in "language__operating_system" with "GNU"
  344 + And I press "Save"
  345 + And I go to /myprofile/test123/profile_editor/edit
  346 + And selector ".software-language-table" should have any "Python"
  347 + And selector ".software-language-table" should have any "3.2"
  348 + Then selector ".software-language-table" should have any "GNU"
  349 +
  350 + @selenium
  351 + Scenario: Adding new softwareLanguage on profile editor
  352 + Given I go to admin_user's control panel
  353 + And I follow "Manage my groups"
  354 + And I follow "Create a new software"
  355 + And I fill in "community_name" with "test123"
  356 + And fill in "software_info_acronym" with "SFTW"
  357 + And I fill in "software_info_operating_platform" with "test platform"
  358 + And fill in "language__version" with "2.0.0"
  359 + And fill in "language__operating_system" with "Linux"
  360 + And I fill in "database__version" with "3.0"
  361 + And I fill in "database__operating_system" with "GNU"
  362 + And I fill in "operating_system__version" with "3.0"
  363 + And I press "Create"
  364 + And I go to /myprofile/test123/profile_editor/edit
  365 + And I should see "Programming Languages"
  366 + And selector ".software-language-table" should have any "2.0.0"
  367 + And selector ".software-language-table" should have any "Linux"
  368 + And I follow "New language"
  369 + And I click on the first button with class ".delete-dynamic-table"
  370 + And I click on table number "2" selector ".software-language-table" and select the value "Python"
  371 + And I fill with "4.3" in field with name "language[][version]" of table number "2" with class ".software-language-table"
  372 + And I fill with "Windows" in field with name "language[][operating_system]" of table number "2" with class ".software-language-table"
  373 + And I press "Save"
  374 + And I go to /myprofile/test123/profile_editor/edit
  375 + And selector ".software-language-table" should have any "Python"
  376 + And selector ".software-language-table" should have any "4.3"
  377 + Then selector ".software-language-table" should have any "Windows"
  378 +
  379 + @selenium
  380 + Scenario: Edit softwareDatabase on profile editor
  381 + Given I go to admin_user's control panel
  382 + And I follow "Manage my groups"
  383 + And I follow "Create a new software"
  384 + And I fill in "community_name" with "test123"
  385 + And fill in "software_info_acronym" with "SFTW"
  386 + And I fill in "software_info_operating_platform" with "test platform"
  387 + And fill in "language__version" with "2.0.0"
  388 + And fill in "language__operating_system" with "Linux"
  389 + And I fill in "database__version" with "3.0"
  390 + And I fill in "database__operating_system" with "GNU"
  391 + And I fill in "operating_system__version" with "3.0"
  392 + And I press "Create"
  393 + And I go to /myprofile/test123/profile_editor/edit
  394 + And I should see "Databases"
  395 + And selector ".database-table" should have any "3.0"
  396 + And selector ".database-table" should have any "GNU"
  397 + And I select "PostgreSQL" from "database__database_description_id"
  398 + And fill in "database__version" with "3.2"
  399 + And fill in "database__operating_system" with "Linux"
  400 + And I press "Save"
  401 + And I go to /myprofile/test123/profile_editor/edit
  402 + And selector ".database-table" should have any "PostgreSQL"
  403 + And selector ".database-table" should have any "3.2"
  404 + Then selector ".database-table" should have any "Linux"
  405 +
  406 + @selenium
  407 + Scenario: Delete softwareDatabase on profile editor
  408 + Given I go to admin_user's control panel
  409 + And I follow "Manage my groups"
  410 + And I follow "Create a new software"
  411 + And I fill in "community_name" with "test123"
  412 + And fill in "software_info_acronym" with "SFTW"
  413 + And I fill in "software_info_operating_platform" with "test platform"
  414 + And fill in "language__version" with "2.0.0"
  415 + And fill in "language__operating_system" with "Linux"
  416 + And I fill in "database__version" with "3.5"
  417 + And I fill in "database__operating_system" with "Solaris"
  418 + And I fill in "operating_system__version" with "3.0"
  419 + And I press "Create"
  420 + And I go to /myprofile/test123/profile_editor/edit
  421 + And I should see "Databases"
  422 + And selector ".database-table" should have any "3.5"
  423 + And selector ".database-table" should have any "Solaris"
  424 + And I follow "New Database"
  425 + And I click on table number "2" selector ".database-table" and select the value "MariaDB"
  426 + And I fill with "4.3" in field with name "database[][version]" of table number "2" with class ".database-table"
  427 + And I fill with "Windows" in field with name "database[][operating_system]" of table number "2" with class ".database-table"
  428 + And I click on the first button with class ".database-table .delete-dynamic-table"
  429 + And I press "Save"
  430 + And I go to /myprofile/test123/profile_editor/edit
  431 + And selector ".database-table" should have any "MariaDB"
  432 + And selector ".database-table" should have any "4.3"
  433 + And selector ".database-table" should have any "Windows"
  434 + And I should not see "4th Dimension"
  435 + And I should not see "3.5"
  436 + And I should not see "Solaris"
... ...