Commit ec80627d35a05eb68ede17dea1c58ff32bfcf2da
Committed by
David Silva
1 parent
128ab2dd
Exists in
master
and in
5 other branches
Add selenium test to software's license info javascript behavior
Signed-off-by: Fabio Teixeira <fabio1079@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing
3 changed files
with
16 additions
and
2 deletions
Show diff stats
features/software_registration.feature
@@ -79,3 +79,17 @@ Feature: edit public software information | @@ -79,3 +79,17 @@ Feature: edit public software information | ||
79 | Then I should see "Step 2/2 - Software Community Configuration" | 79 | Then I should see "Step 2/2 - Software Community Configuration" |
80 | And I go to /myprofile/new-software/profile_editor/edit | 80 | And I go to /myprofile/new-software/profile_editor/edit |
81 | Then I should not see "Step 2/2 - Software Community Configuration" | 81 | Then I should not see "Step 2/2 - Software Community Configuration" |
82 | + | ||
83 | + @selenium | ||
84 | + Scenario: Show license link when a license is selected | ||
85 | + Given I am on mpog-admin's control panel | ||
86 | + And I follow "Create a new software" | ||
87 | + And I fill in "community_name" with "another software" | ||
88 | + And I fill in "software_info_finality" with "another software finality" | ||
89 | + And I select "GPL-2" from "license_info_id" | ||
90 | + And I should see "www.gpl2.com" within "#version_link" | ||
91 | + And I press "Create" | ||
92 | + And I go to another-software's control panel | ||
93 | + And I follow "Software Info" | ||
94 | + And I select "GPL-3" from "license_info_id" | ||
95 | + Then I should see "www.gpl3.com" within "#version_link" | ||
82 | \ No newline at end of file | 96 | \ No newline at end of file |
lib/tasks/create_lincences.rake
1 | namespace :software do | 1 | namespace :software do |
2 | desc "Create software licences" | 2 | desc "Create software licences" |
3 | 3 | ||
4 | - task :create_licences => :environment do | 4 | + task :create_licenses => :environment do |
5 | Environment.all.each do |env| | 5 | Environment.all.each do |env| |
6 | if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("MpogSoftwarePlugin") | 6 | if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("MpogSoftwarePlugin") |
7 | list_file = File.open "plugins/mpog_software/public/static/licences.txt", "r" | 7 | list_file = File.open "plugins/mpog_software/public/static/licences.txt", "r" |
views/mpog_software_plugin_myprofile/_main_software_editor_extras.html.erb
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | 12 | ||
13 | <h3> <%= _("Licenses") %> </h3> | 13 | <h3> <%= _("Licenses") %> </h3> |
14 | <div id='licenses'> | 14 | <div id='licenses'> |
15 | - <%= select_tag("license[license_infos_id]", options_for_select(LicenseHelper.getListLicenses.collect{|l| [l.version, l.id]}, :selected => @profile.software_info.license_info_id), :id => "license_info_version") %> | 15 | + <%= select_tag("license[license_infos_id]", options_for_select(LicenseHelper.getListLicenses.collect{|l| [l.version, l.id]}, :selected => @profile.software_info.license_info_id), :id => "license_info_id") %> |
16 | <br /> | 16 | <br /> |
17 | 17 | ||
18 | <h4> <%= _("License link") %> </h4> | 18 | <h4> <%= _("License link") %> </h4> |