Commit bbf5a17bb5c12276ffd82076bae645b7a8979e95
1 parent
f405dad8
Exists in
master
and in
5 other branches
Cucumber tests
- Only environment admin can change a generic software to a public software - Show Adherent fields only to public software Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing
1 changed file
with
45 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,45 @@ | @@ -0,0 +1,45 @@ | ||
| 1 | +Feature: edit adherent fields | ||
| 2 | + As a user | ||
| 3 | + I want to edit adherent fields | ||
| 4 | + to mantain my public software up to date. | ||
| 5 | + | ||
| 6 | + Background: | ||
| 7 | + Given "MpogSoftwarePlugin" plugin is enabled | ||
| 8 | + And the following users | ||
| 9 | + | login | name | email | | ||
| 10 | + | joaosilva | Joao Silva | joaosilva@example.com | | ||
| 11 | + | mariasilva | Maria Silva | mariasilva@example.com | | ||
| 12 | + And SoftwareInfo has initial default values on database | ||
| 13 | + And I am logged in as mpog_admin | ||
| 14 | + And I go to /admin/plugins | ||
| 15 | + And I check "MpogSoftwarePlugin" | ||
| 16 | + And I press "Save changes" | ||
| 17 | + And I go to /myprofile/mpog-admin | ||
| 18 | + And I follow "Create a new software" | ||
| 19 | + And I fill in "community_name" with "basic software" | ||
| 20 | + And I fill in "software_info_finality" with "basic software finality" | ||
| 21 | + And I press "Create" | ||
| 22 | + | ||
| 23 | + Scenario: Don't show public software checkbox to no enviroment admin | ||
| 24 | + Given I am logged in as "joaosilva" | ||
| 25 | + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software | ||
| 26 | + And I follow "Specifications" | ||
| 27 | + Then I should not see "Is a public software" | ||
| 28 | + | ||
| 29 | + Scenario: Show public software checkbox no enviroment admin | ||
| 30 | + Given I am logged in as mpog_admin | ||
| 31 | + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software | ||
| 32 | + And I follow "Specifications" | ||
| 33 | + Then I should see "Is a public software" | ||
| 34 | + | ||
| 35 | + Scenario: Show adherent fields when checkbox are checked | ||
| 36 | + Given I am logged in as mpog_admin | ||
| 37 | + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software | ||
| 38 | + And I follow "Specifications" | ||
| 39 | + And I check "software[public_software]" | ||
| 40 | + And I press "Save" | ||
| 41 | + And I go to /myprofile/basic-software/plugin/mpog_software/edit_software | ||
| 42 | + And I follow "Specifications" | ||
| 43 | + Then I should see "Adherent to e-ping ?" | ||
| 44 | + | ||
| 45 | + |