centred the "New notifications will appear here" text and also fixed class for notifications entry on navbar

This commit is contained in:
nilsding 2015-01-26 17:53:23 +01:00
parent c8b02bbf50
commit 13bdbaa430
2 changed files with 6 additions and 7 deletions

View File

@ -1,4 +1,4 @@
.visible-xs= nav_entry "Notifications", notifications_path, badge: notification_count
= nav_entry "Notifications", notifications_path, badge: notification_count, class: 'visible-xs'
- notifications = Notification.for(current_user).limit(4)
%li.dropdown.hidden-xs
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
@ -6,7 +6,7 @@
%span.badge= notification_count
%ul.dropdown-menu.notification--dropdown
- if notifications.count == 0
%p New notifications will appear here.
%li.centre.text-muted New notifications will appear here.
- else
- notifications.each do |notification|
%li{class: (notification.new? ? 'list-group-item-warning' : '')}

View File

@ -60,7 +60,6 @@ feature "Inbox", :devise do
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
end
=begin
# Scenario: User deletes a question
# Given I am signed in
# When I visit the inbox
@ -84,7 +83,7 @@ feature "Inbox", :devise do
page.find('.sweet-alert').click_button 'Delete'
wait_for_ajax
visit root_path
login_as me, scope: :user
visit inbox_path
expect(page).not_to have_text(question.content)
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
@ -111,14 +110,14 @@ feature "Inbox", :devise do
expect(page).to have_text('Really delete 5 questions?')
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_1.png"), full: true
# this apparently doesn't get triggered :(
page.find('.sweet-alert').click_button 'Delete'
wait_for_ajax
visit root_path
puts me.inbox.all
login_as me, scope: :user
visit inbox_path
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
expect(page).not_to have_text('Answer'.upcase)
end
=end
end