fix list section link by normalizing
This commit is contained in:
@@ -8,8 +8,8 @@ td.status-icons
|
|||||||
|
|
|
|
||||||
span.icon.needs-payment
|
span.icon.needs-payment
|
||||||
td.numeric.table_number: App.TableNumberWithInfoView contextBinding="view.content"
|
td.numeric.table_number: App.TableNumberWithInfoView contextBinding="view.content"
|
||||||
td.section_title: link-to 'section' view.content.section.id: span=view.content.section.title
|
td.section_title: link-to 'section' view.content.table.section.id: span=view.content.table.section.title
|
||||||
td.currency.total_list_amount {{currency view.content.total}}
|
td.currency.total_list_amount=currency view.content.total
|
||||||
td.actions
|
td.actions
|
||||||
/ if view.content.needs_help
|
/ if view.content.needs_help
|
||||||
button.mark_list_as_helped{ action "markListAsHelped" view.content.id}
|
button.mark_list_as_helped{ action "markListAsHelped" view.content.id}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ td.status-icons
|
|||||||
span.active-order.fa.fa-check.fa-lg
|
span.active-order.fa.fa-check.fa-lg
|
||||||
td= view.content.display
|
td= view.content.display
|
||||||
td.numeric.table_number: App.TableNumberWithInfoView contextBinding="view.content.list"
|
td.numeric.table_number: App.TableNumberWithInfoView contextBinding="view.content.list"
|
||||||
td.section_title: link-to 'section' view.content.list.section.id: span=view.content.list.section.title
|
td.section_title: link-to 'section' view.content.list.table.section.id: span=view.content.list.table.section.title
|
||||||
td.currency=currency view.content.total
|
td.currency=currency view.content.total
|
||||||
td.actions
|
td.actions
|
||||||
if view.content.placed
|
if view.content.placed
|
||||||
|
|||||||
@@ -3,7 +3,12 @@ root.Qsupplier=
|
|||||||
watch_events: ->
|
watch_events: ->
|
||||||
faye = new Faye.Client(event_host)
|
faye = new Faye.Client(event_host)
|
||||||
faye.subscribe "/supplier/#{supplier_object.id}", (e)=>
|
faye.subscribe "/supplier/#{supplier_object.id}", (e)=>
|
||||||
<% if Rails.env.development? %>
|
<% if Rails.env.test? %>
|
||||||
|
window.faye_log ||= []
|
||||||
|
faye_message = {}
|
||||||
|
faye_message[e.event] = e.data
|
||||||
|
faye_log.push faye_message
|
||||||
|
<% elsif Rails.env.development? %>
|
||||||
console.log "Event: #{e.event}"
|
console.log "Event: #{e.event}"
|
||||||
console.log e.data
|
console.log e.data
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -75,11 +75,12 @@ Feature: Supplier main board
|
|||||||
@javascript
|
@javascript
|
||||||
Scenario: Update table number and section if table changes
|
Scenario: Update table number and section if table changes
|
||||||
Given there is an active list and order
|
Given there is an active list and order
|
||||||
|
And there is another section with table
|
||||||
And I am signed in as supplier
|
And I am signed in as supplier
|
||||||
# wait until page is fully loaded
|
# wait until page is fully loaded
|
||||||
And I wait 2 seconds
|
And I wait 4 seconds
|
||||||
When the active list changes to another table in another section
|
When the active list changes to another table in another section
|
||||||
And I wait 1 second
|
And I wait 2 seconds
|
||||||
Then the supplier main board table number should be updated to the new table number
|
Then the supplier main board table number should be updated to the new table number
|
||||||
And the supplier main board section name should be updated to the new section
|
And the supplier main board section name should be updated to the new section
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
step 'there is a section' do
|
step 'there is a section' do
|
||||||
@section ||= create :section, supplier: @supplier
|
@section ||= create :section, supplier: @supplier
|
||||||
end
|
end
|
||||||
|
|
||||||
|
step "there is another section" do
|
||||||
|
@other_section = create :section, supplier: @supplier, title: 'New Section'
|
||||||
|
end
|
||||||
|
|
||||||
|
step "there is another section with table" do
|
||||||
|
step "there is another section"
|
||||||
|
@other_table = create :table, section: @other_section, supplier: @supplier, number: 65
|
||||||
|
end
|
||||||
|
|||||||
@@ -131,8 +131,6 @@ step "I click on the section main board section jumper" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
step "the active list changes to another table in another section" do
|
step "the active list changes to another table in another section" do
|
||||||
@other_section = create :section, supplier: @supplier, title: 'New Section'
|
|
||||||
@other_table = create :table, section: @other_section, supplier: @supplier, number: 65
|
|
||||||
@list.move_to_table! @other_table
|
@list.move_to_table! @other_table
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -18,4 +18,8 @@ module SpecEmberHelpers
|
|||||||
def js_path
|
def js_path
|
||||||
page.evaluate_script 'location.pathname + location.hash'
|
page.evaluate_script 'location.pathname + location.hash'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def faye_log
|
||||||
|
page.evaluate_script(%|window.faye_log|)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user