Commit 5e12f10c142ca5add14e5c752cf9ef6d88c4dfd8

Authored by gitlabhq
1 parent 82d16ccf

fixes

app/views/layouts/_head_panel.html.erb
... ... @@ -10,7 +10,10 @@
10 10 <%= current_user.name %>
11 11 <% end %>
12 12 <%= link_to 'Logout', destroy_user_session_path, :class => "logout", :method => :delete %>
13   - </div>
  13 + </div>
  14 + <div class="search">
  15 + <%= text_field_tag "search", nil, :placeholder => "Search", :class => "search-input" %>
  16 + </div>
14 17 <!-- .login-top -->
15 18 <nav>
16 19 <%= link_to root_path, :class => current_page?(root_path) ? "current dashboard" : "dashboard" do %>
... ... @@ -31,7 +34,6 @@
31 34 <div class="span-24">
32 35 <div class="span-10">
33 36 <span class="search-holder">
34   - <%= text_field_tag "search", nil, :placeholder => "Search" %>
35 37 </span>
36 38 </div>
37 39 <div class="right">
... ...
app/views/layouts/devise.html.haml
... ... @@ -11,6 +11,5 @@
11 11 REQ_URI = "#{request.env["REQUEST_URI"]}";
12 12 REQ_REFFER = "#{request.env["HTTP_REFERER"]}";
13 13 %body.login-page
14   - #container
15   - = render :partial => "layouts/flash"
  14 + = render :partial => "layouts/flash"
16 15 = yield
... ...
spec/requests/issues_spec.rb
... ... @@ -5,7 +5,10 @@ describe &quot;Issues&quot; do
5 5  
6 6 before do
7 7 login_as :user
  8 + @user2 = Factory :user
  9 +
8 10 project.add_access(@user, :read, :write)
  11 + project.add_access(@user2, :read, :write)
9 12 end
10 13  
11 14 describe "GET /issues" do
... ... @@ -49,20 +52,20 @@ describe &quot;Issues&quot; do
49 52 end
50 53  
51 54 it "should show only open" do
52   - should have_content(@issue.title)
  55 + should have_content(@issue.title[0..25])
53 56 should have_no_content(@closed_issue.title)
54 57 end
55 58  
56 59 it "should show only closed" do
57 60 choose "closed_issues"
58 61 should have_no_content(@issue.title)
59   - should have_content(@closed_issue.title)
  62 + should have_content(@closed_issue.title[0..25])
60 63 end
61 64  
62 65 it "should show all" do
63 66 choose "all_issues"
64   - should have_content(@issue.title)
65   - should have_content(@closed_issue.title)
  67 + should have_content(@issue.title[0..25])
  68 + should have_content(@closed_issue.title[0..25])
66 69 end
67 70 end
68 71 end
... ... @@ -78,35 +81,71 @@ describe &quot;Issues&quot; do
78 81 end
79 82  
80 83 describe "fill in" do
81   - before do
82   - fill_in "issue_title", :with => "bug 345"
83   - click_link "Select user"
84   - click_link @user.name
85   - end
86   -
87   - it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
88   -
89   - it "should add new issue to table" do
90   - click_button "Save"
91   -
92   - page.should_not have_content("Add new issue")
93   - page.should have_content @user.name
94   - page.should have_content "bug 345"
95   - page.should have_content project.name
  84 + describe 'assign to me' do
  85 + before do
  86 + fill_in "issue_title", :with => "bug 345"
  87 + click_link "Select user"
  88 + within "#issue_assignee_id-menu" do
  89 + click_link @user.name
  90 + end
  91 + end
  92 +
  93 + it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
  94 +
  95 + it "should add new issue to table" do
  96 + click_button "Save"
  97 +
  98 + page.should_not have_content("Add new issue")
  99 + page.should have_content @user.name
  100 + page.should have_content "bug 345"
  101 + page.should have_content project.name
  102 + end
  103 +
  104 + it "should call send mail" do
  105 + Notify.should_not_receive(:new_issue_email)
  106 + click_button "Save"
  107 + end
  108 +
  109 + it "should send valid email to user with email & password" do
  110 + click_button "Save"
  111 + ActionMailer::Base.deliveries.last.should be_nil
  112 + end
96 113 end
97 114  
98   - it "should call send mail" do
99   - Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
100   - click_button "Save"
101   - end
  115 + describe 'assign to other' do
  116 + before do
  117 + fill_in "issue_title", :with => "bug 345"
  118 + click_link "Select user"
  119 + within "#issue_assignee_id-menu" do
  120 + click_link @user2.name
  121 + end
  122 + end
  123 +
  124 + it { expect { click_button "Save" }.to change {Issue.count}.by(1) }
  125 +
  126 + it "should add new issue to table" do
  127 + click_button "Save"
  128 +
  129 + page.should_not have_content("Add new issue")
  130 + page.should have_content @user2.name
  131 + page.should have_content "bug 345"
  132 + page.should have_content project.name
  133 + end
  134 +
  135 + it "should call send mail" do
  136 + Notify.should_receive(:new_issue_email).and_return(stub(:deliver => true))
  137 + click_button "Save"
  138 + end
  139 +
  140 + it "should send valid email to user with email & password" do
  141 + click_button "Save"
  142 + issue = Issue.last
  143 + email = ActionMailer::Base.deliveries.last
  144 + email.subject.should have_content("New Issue was created")
  145 + email.body.should have_content(issue.title)
  146 + email.body.should have_content(issue.assignee.name)
  147 + end
102 148  
103   - it "should send valid email to user with email & password" do
104   - click_button "Save"
105   - issue = Issue.last
106   - email = ActionMailer::Base.deliveries.last
107   - email.subject.should have_content("New Issue was created")
108   - email.body.should have_content(issue.title)
109   - email.body.should have_content(issue.assignee.name)
110 149 end
111 150 end
112 151 end
... ...
spec/requests/projects_spec.rb
... ... @@ -13,14 +13,14 @@ describe &quot;Projects&quot; do
13 13 end
14 14  
15 15 it "should have link to new project" do
16   - page.should have_content("New Project")
  16 + page.should have_content("Create new project")
17 17 end
18 18 end
19 19  
20 20 describe "GET /projects/new" do
21 21 before do
22 22 visit projects_path
23   - click_link "New Project"
  23 + click_link "Create new project"
24 24 end
25 25  
26 26 it "should be correct path" do
... ...
spec/support/login.rb
... ... @@ -12,15 +12,15 @@ module LoginMacros
12 12 end
13 13  
14 14 visit new_user_session_path
15   - fill_in "Email", :with => @user.email
16   - fill_in "Password", :with => "123456"
  15 + fill_in "user_email", :with => @user.email
  16 + fill_in "user_password", :with => "123456"
17 17 click_button "Sign in"
18 18 end
19 19  
20 20 def login_with(user)
21 21 visit new_user_session_path
22   - fill_in "Email", :with => user.email
23   - fill_in "Password", :with => "123456"
  22 + fill_in "user_email", :with => user.email
  23 + fill_in "user_password", :with => "123456"
24 24 click_button "Sign in"
25 25 end
26 26  
... ...
vendor/assets/stylesheets/jquery-ui/jquery-ui.css
... ... @@ -445,7 +445,7 @@ button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra pad
445 445 * http://docs.jquery.com/UI/Dialog#theming
446 446 */
447 447 .ui-dialog { position: absolute; padding: 0; width: 300px; overflow: hidden; }
448   -.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #333; color:#eaeaea }
  448 +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; background: #F7F7F7; color:#555; }
449 449 .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0;}
450 450 .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; background:#eaeaea}
451 451 .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
... ...