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