Fixed specs. Some css fixes

This commit is contained in:
Dmitriy Zaporozhets 2012-03-25 19:44:29 +03:00
parent 8652cd8989
commit 39ea486e1f
9 changed files with 35 additions and 33 deletions

View file

@ -1092,13 +1092,12 @@ p.time {
position: absolute;
right:14px;
top:7px;
height: 30px;
}
div.attachments {
position:relative;
width: 350px;
height: 30px;
height: 36px;
overflow:hidden;
margin:0 0 5px !important;
}

View file

@ -15,7 +15,7 @@
.clearfix
= f.label :description, "Issue Details"
.input
= f.text_area :description, :maxlength => 2000, :class => "xxlarge"
= f.text_area :description, :maxlength => 2000, :class => "xxlarge", :rows => 10
%p.hint Markdown is enabled.
.clearfix

View file

@ -44,7 +44,7 @@
%strong.author= link_to_issue_assignee(@issue)
%div
- if @issue.description
- if @issue.description.present?
%hr
= markdown @issue.description

View file

@ -30,22 +30,12 @@
.merge_request_box
.merge_request_status_holder
- if @merge_request.closed
%h5
%h5
- if @merge_request.closed
.alert-message.error.status_info Closed
- if @merge_request.merged?
%span
Merged by #{@merge_request.merge_event.author_name}
%small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
- elsif @merge_request.closed_event
%span
Closed by #{@merge_request.closed_event.author_name}
%small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
%br
- else
%h5
- else
.alert-message.success.status_info Open
= @merge_request.title
= @merge_request.title
%div
@ -57,7 +47,19 @@
%cite.cgray and currently assigned to
= image_tag gravatar_icon(@merge_request.assignee_email), :width => 16, :class => "lil_av"
%strong.author= link_to_merge_request_assignee(@merge_request)
- if @merge_request.closed
%hr
- if @merge_request.merged?
%span
Merged by #{@merge_request.merge_event.author_name}
%small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
- elsif @merge_request.closed_event
%span
Closed by #{@merge_request.closed_event.author_name}
%small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
%br
= render "merge_requests/commits"

View file

@ -25,9 +25,9 @@
.span8
%h5 Attachment:
.clearfix
.attachments.entry
.attachments
%div.file_name File name...
%button.file_upload.btn.primary.small Upload File
%button.file_upload.btn.small Upload File
.input= f.file_field :attachment, :class => "input-file"
%span Any file less then 10 MB

View file

@ -13,7 +13,7 @@ describe "Issues" do
before do
visit project_commit_path(project, commit)
fill_in "note_note", :with => "I commented this commit"
click_button "Add note"
click_button "Add Comment"
end
it "should conatin new note" do

View file

@ -17,7 +17,7 @@ describe "Issues" do
before do
visit project_issue_path(project, @issue)
fill_in "note_note", :with => "I commented this issue"
click_button "Add note"
click_button "Add Comment"
end
it "should conatin new note" do

View file

@ -92,10 +92,10 @@ describe "Issues" do
select @user.name, :from => "issue_assignee_id"
end
it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
it { expect { click_button "Submit new issue" }.to change {Issue.count}.by(1) }
it "should add new issue to table" do
click_button "Save"
click_button "Submit new issue"
page.should_not have_content("Add new issue")
page.should have_content @user.name
@ -105,7 +105,7 @@ describe "Issues" do
it "should call send mail" do
Notify.should_not_receive(:new_issue_email)
click_button "Save"
click_button "Submit new issue"
end
end
@ -116,10 +116,10 @@ describe "Issues" do
select @user2.name, :from => "issue_assignee_id"
end
it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
it { expect { click_button "Submit new issue" }.to change {Issue.count}.by(1) }
it "should add new issue to table" do
click_button "Save"
click_button "Submit new issue"
page.should_not have_content("Add new issue")
page.should have_content @user2.name
@ -129,11 +129,11 @@ describe "Issues" do
it "should call send mail" do
Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
click_button "Save"
click_button "Submit new issue"
end
it "should send valid email to user" do
click_button "Save"
click_button "Submit new issue"
issue = Issue.last
email = ActionMailer::Base.deliveries.last
email.subject.should have_content("New Issue was created")
@ -177,12 +177,13 @@ describe "Issues" do
describe "fill in" do
before do
fill_in "issue_title", :with => "bug 345"
fill_in "issue_description", :with => "bug description"
end
it { expect { click_button "Save" }.to_not change {Issue.count} }
it { expect { click_button "Save changes" }.to_not change {Issue.count} }
it "should update issue fields" do
click_button "Save"
click_button "Save changes"
page.should have_content @user.name
page.should have_content "bug 345"

View file

@ -23,7 +23,7 @@ describe "Projects", "Wall" do
before do
visit wall_project_path(project)
fill_in "note_note", :with => "my post on wall"
click_button "Add note"
click_button "Add Comment"
end
it "should conatin new note" do