From 8b2daf5c49f4275202f07313bec263f9f7dab125 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Thu, 7 Jun 2012 16:17:58 +0200 Subject: [PATCH] correcting link to projects listed as subprojects in the project details widget --- .../blocks/_projectdetails.rhtml | 4 ++-- features/project_details_widget.feature | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 features/project_details_widget.feature diff --git a/app/views/my_projects_overviews/blocks/_projectdetails.rhtml b/app/views/my_projects_overviews/blocks/_projectdetails.rhtml index 64f98df2c0..4aaaf253c6 100644 --- a/app/views/my_projects_overviews/blocks/_projectdetails.rhtml +++ b/app/views/my_projects_overviews/blocks/_projectdetails.rhtml @@ -1,11 +1,11 @@

<%=l(:label_project_details)%>

<%=l(:label_project_details)%>

-
+
    <% unless @project.homepage.blank? %>
  • <%=l(:field_homepage)%>: <%= auto_link(h(@project.homepage)) %>
  • <% end %> <% if @subprojects.any? %>
  • <%=l(:label_subproject_plural)%>: - <%= @subprojects.collect{|p| link_to(h(p), :action => 'show', :id => p)}.join(", ") %>
  • + <%= @subprojects.collect{|p| link_to(h(p), project_url(p))}.join(", ") %> <% end %> <% @project.visible_custom_field_values.each do |custom_value| %> <% if !custom_value.value.blank? %> diff --git a/features/project_details_widget.feature b/features/project_details_widget.feature new file mode 100644 index 0000000000..9c45bb5f92 --- /dev/null +++ b/features/project_details_widget.feature @@ -0,0 +1,22 @@ +Feature: Project Details Widget + + Background: + Given there is 1 project with the following: + | Name | Parent | + And the project "Parent" has 1 subproject with the following: + | Name | Child | + And I am already logged in as "admin" + + @javascript + Scenario: Adding a "Project Details" widget + Given I am on the project "Parent" overview personalization page + When I select "Project details" from the available widgets drop down + And I wait for the AJAX requests to finish + Then the "Project details" widget should be in the hidden block + + Scenario: Includes links to all child projects + Given the following widgets should be selected for the overview page of the "Parent" project: + | top | Projectdetails | + When I go to the overview page of the project called "Parent" + And I follow "Child" within ".mypage-box .project_details" + Then I should be on the overview page of the project called "Child"