Commit 39ea486e1f9701f2a6e91155d2dfd205edd4c94e

Authored by Dmitriy Zaporozhets
1 parent 8652cd89

Fixed specs. Some css fixes

app/assets/stylesheets/common.scss
@@ -1092,13 +1092,12 @@ p.time { @@ -1092,13 +1092,12 @@ p.time {
1092 position: absolute; 1092 position: absolute;
1093 right:14px; 1093 right:14px;
1094 top:7px; 1094 top:7px;
1095 - height: 30px;  
1096 } 1095 }
1097 1096
1098 div.attachments { 1097 div.attachments {
1099 position:relative; 1098 position:relative;
1100 width: 350px; 1099 width: 350px;
1101 - height: 30px; 1100 + height: 36px;
1102 overflow:hidden; 1101 overflow:hidden;
1103 margin:0 0 5px !important; 1102 margin:0 0 5px !important;
1104 } 1103 }
app/views/issues/_form.html.haml
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 .clearfix 15 .clearfix
16 = f.label :description, "Issue Details" 16 = f.label :description, "Issue Details"
17 .input 17 .input
18 - = f.text_area :description, :maxlength => 2000, :class => "xxlarge" 18 + = f.text_area :description, :maxlength => 2000, :class => "xxlarge", :rows => 10
19 %p.hint Markdown is enabled. 19 %p.hint Markdown is enabled.
20 20
21 .clearfix 21 .clearfix
app/views/issues/show.html.haml
@@ -44,7 +44,7 @@ @@ -44,7 +44,7 @@
44 %strong.author= link_to_issue_assignee(@issue) 44 %strong.author= link_to_issue_assignee(@issue)
45 45
46 %div 46 %div
47 - - if @issue.description 47 + - if @issue.description.present?
48 %hr 48 %hr
49 = markdown @issue.description 49 = markdown @issue.description
50 50
app/views/merge_requests/show.html.haml
@@ -30,22 +30,12 @@ @@ -30,22 +30,12 @@
30 30
31 .merge_request_box 31 .merge_request_box
32 .merge_request_status_holder 32 .merge_request_status_holder
33 - - if @merge_request.closed  
34 - %h5 33 + %h5
  34 + - if @merge_request.closed
35 .alert-message.error.status_info Closed 35 .alert-message.error.status_info Closed
36 - - if @merge_request.merged?  
37 - %span  
38 - Merged by #{@merge_request.merge_event.author_name}  
39 - %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.  
40 - - elsif @merge_request.closed_event  
41 - %span  
42 - Closed by #{@merge_request.closed_event.author_name}  
43 - %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.  
44 - %br  
45 - - else  
46 - %h5 36 + - else
47 .alert-message.success.status_info Open 37 .alert-message.success.status_info Open
48 - = @merge_request.title 38 + = @merge_request.title
49 39
50 40
51 %div 41 %div
@@ -57,7 +47,19 @@ @@ -57,7 +47,19 @@
57 %cite.cgray and currently assigned to 47 %cite.cgray and currently assigned to
58 = image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av" 48 = image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av"
59 %strong.author= link_to_merge_request_assignee(@merge_request) 49 %strong.author= link_to_merge_request_assignee(@merge_request)
60 - 50 +
  51 +
  52 + - if @merge_request.closed
  53 + %hr
  54 + - if @merge_request.merged?
  55 + %span
  56 + Merged by #{@merge_request.merge_event.author_name}
  57 + %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
  58 + - elsif @merge_request.closed_event
  59 + %span
  60 + Closed by #{@merge_request.closed_event.author_name}
  61 + %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
  62 + %br
61 63
62 64
63 = render "merge_requests/commits" 65 = render "merge_requests/commits"
app/views/notes/_form.html.haml
@@ -25,9 +25,9 @@ @@ -25,9 +25,9 @@
25 .span8 25 .span8
26 %h5 Attachment: 26 %h5 Attachment:
27 .clearfix 27 .clearfix
28 - .attachments.entry 28 + .attachments
29 %div.file_name File name... 29 %div.file_name File name...
30 - %button.file_upload.btn.primary.small Upload File 30 + %button.file_upload.btn.small Upload File
31 .input= f.file_field :attachment, :class => "input-file" 31 .input= f.file_field :attachment, :class => "input-file"
32 %span Any file less then 10 MB 32 %span Any file less then 10 MB
33 33
spec/requests/commits_notes_spec.rb
@@ -13,7 +13,7 @@ describe "Issues" do @@ -13,7 +13,7 @@ describe "Issues" do
13 before do 13 before do
14 visit project_commit_path(project, commit) 14 visit project_commit_path(project, commit)
15 fill_in "note_note", :with => "I commented this commit" 15 fill_in "note_note", :with => "I commented this commit"
16 - click_button "Add note" 16 + click_button "Add Comment"
17 end 17 end
18 18
19 it "should conatin new note" do 19 it "should conatin new note" do
spec/requests/issues_notes_spec.rb
@@ -17,7 +17,7 @@ describe "Issues" do @@ -17,7 +17,7 @@ describe "Issues" do
17 before do 17 before do
18 visit project_issue_path(project, @issue) 18 visit project_issue_path(project, @issue)
19 fill_in "note_note", :with => "I commented this issue" 19 fill_in "note_note", :with => "I commented this issue"
20 - click_button "Add note" 20 + click_button "Add Comment"
21 end 21 end
22 22
23 it "should conatin new note" do 23 it "should conatin new note" do
spec/requests/issues_spec.rb
@@ -92,10 +92,10 @@ describe "Issues" do @@ -92,10 +92,10 @@ describe "Issues" do
92 select @user.name, :from => "issue_assignee_id" 92 select @user.name, :from => "issue_assignee_id"
93 end 93 end
94 94
95 - it { expect { click_button "Save" }.to change {Issue.count}.by(1) } 95 + it { expect { click_button "Submit new issue" }.to change {Issue.count}.by(1) }
96 96
97 it "should add new issue to table" do 97 it "should add new issue to table" do
98 - click_button "Save" 98 + click_button "Submit new issue"
99 99
100 page.should_not have_content("Add new issue") 100 page.should_not have_content("Add new issue")
101 page.should have_content @user.name 101 page.should have_content @user.name
@@ -105,7 +105,7 @@ describe "Issues" do @@ -105,7 +105,7 @@ describe "Issues" do
105 105
106 it "should call send mail" do 106 it "should call send mail" do
107 Notify.should_not_receive(:new_issue_email) 107 Notify.should_not_receive(:new_issue_email)
108 - click_button "Save" 108 + click_button "Submit new issue"
109 end 109 end
110 end 110 end
111 111
@@ -116,10 +116,10 @@ describe "Issues" do @@ -116,10 +116,10 @@ describe "Issues" do
116 select @user2.name, :from => "issue_assignee_id" 116 select @user2.name, :from => "issue_assignee_id"
117 end 117 end
118 118
119 - it { expect { click_button "Save" }.to change {Issue.count}.by(1) } 119 + it { expect { click_button "Submit new issue" }.to change {Issue.count}.by(1) }
120 120
121 it "should add new issue to table" do 121 it "should add new issue to table" do
122 - click_button "Save" 122 + click_button "Submit new issue"
123 123
124 page.should_not have_content("Add new issue") 124 page.should_not have_content("Add new issue")
125 page.should have_content @user2.name 125 page.should have_content @user2.name
@@ -129,11 +129,11 @@ describe "Issues" do @@ -129,11 +129,11 @@ describe "Issues" do
129 129
130 it "should call send mail" do 130 it "should call send mail" do
131 Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true)) 131 Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
132 - click_button "Save" 132 + click_button "Submit new issue"
133 end 133 end
134 134
135 it "should send valid email to user" do 135 it "should send valid email to user" do
136 - click_button "Save" 136 + click_button "Submit new issue"
137 issue = Issue.last 137 issue = Issue.last
138 email = ActionMailer::Base.deliveries.last 138 email = ActionMailer::Base.deliveries.last
139 email.subject.should have_content("New Issue was created") 139 email.subject.should have_content("New Issue was created")
@@ -177,12 +177,13 @@ describe "Issues" do @@ -177,12 +177,13 @@ describe "Issues" do
177 describe "fill in" do 177 describe "fill in" do
178 before do 178 before do
179 fill_in "issue_title", :with => "bug 345" 179 fill_in "issue_title", :with => "bug 345"
  180 + fill_in "issue_description", :with => "bug description"
180 end 181 end
181 182
182 - it { expect { click_button "Save" }.to_not change {Issue.count} } 183 + it { expect { click_button "Save changes" }.to_not change {Issue.count} }
183 184
184 it "should update issue fields" do 185 it "should update issue fields" do
185 - click_button "Save" 186 + click_button "Save changes"
186 187
187 page.should have_content @user.name 188 page.should have_content @user.name
188 page.should have_content "bug 345" 189 page.should have_content "bug 345"
spec/requests/projects_wall_spec.rb
@@ -23,7 +23,7 @@ describe "Projects", "Wall" do @@ -23,7 +23,7 @@ describe "Projects", "Wall" do
23 before do 23 before do
24 visit wall_project_path(project) 24 visit wall_project_path(project)
25 fill_in "note_note", :with => "my post on wall" 25 fill_in "note_note", :with => "my post on wall"
26 - click_button "Add note" 26 + click_button "Add Comment"
27 end 27 end
28 28
29 it "should conatin new note" do 29 it "should conatin new note" do