mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-20 16:10:00 +01:00
centred the "New notifications will appear here" text and also fixed class for notifications entry on navbar
This commit is contained in:
parent
c8b02bbf50
commit
13bdbaa430
2 changed files with 6 additions and 7 deletions
|
@ -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)
|
- notifications = Notification.for(current_user).limit(4)
|
||||||
%li.dropdown.hidden-xs
|
%li.dropdown.hidden-xs
|
||||||
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
|
%a.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
|
||||||
|
@ -6,7 +6,7 @@
|
||||||
%span.badge= notification_count
|
%span.badge= notification_count
|
||||||
%ul.dropdown-menu.notification--dropdown
|
%ul.dropdown-menu.notification--dropdown
|
||||||
- if notifications.count == 0
|
- if notifications.count == 0
|
||||||
%p New notifications will appear here.
|
%li.centre.text-muted New notifications will appear here.
|
||||||
- else
|
- else
|
||||||
- notifications.each do |notification|
|
- notifications.each do |notification|
|
||||||
%li{class: (notification.new? ? 'list-group-item-warning' : '')}
|
%li{class: (notification.new? ? 'list-group-item-warning' : '')}
|
||||||
|
|
|
@ -60,7 +60,6 @@ feature "Inbox", :devise do
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
||||||
end
|
end
|
||||||
|
|
||||||
=begin
|
|
||||||
# Scenario: User deletes a question
|
# Scenario: User deletes a question
|
||||||
# Given I am signed in
|
# Given I am signed in
|
||||||
# When I visit the inbox
|
# When I visit the inbox
|
||||||
|
@ -84,7 +83,7 @@ feature "Inbox", :devise do
|
||||||
page.find('.sweet-alert').click_button 'Delete'
|
page.find('.sweet-alert').click_button 'Delete'
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
|
|
||||||
visit root_path
|
login_as me, scope: :user
|
||||||
visit inbox_path
|
visit inbox_path
|
||||||
expect(page).not_to have_text(question.content)
|
expect(page).not_to have_text(question.content)
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
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?')
|
expect(page).to have_text('Really delete 5 questions?')
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_1.png"), full: true
|
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'
|
page.find('.sweet-alert').click_button 'Delete'
|
||||||
wait_for_ajax
|
wait_for_ajax
|
||||||
|
|
||||||
visit root_path
|
puts me.inbox.all
|
||||||
|
|
||||||
|
login_as me, scope: :user
|
||||||
visit inbox_path
|
visit inbox_path
|
||||||
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
page.driver.render Rails.root.join("tmp/#{Time.now.to_i}_2.png"), full: true
|
||||||
expect(page).not_to have_text('Answer'.upcase)
|
expect(page).not_to have_text('Answer'.upcase)
|
||||||
end
|
end
|
||||||
=end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue