fix list section link by normalizing
This commit is contained in:
@@ -8,8 +8,8 @@ td.status-icons
|
||||
|
|
||||
span.icon.needs-payment
|
||||
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.currency.total_list_amount {{currency view.content.total}}
|
||||
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.actions
|
||||
/ if view.content.needs_help
|
||||
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
|
||||
td= view.content.display
|
||||
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.actions
|
||||
if view.content.placed
|
||||
|
||||
@@ -3,7 +3,12 @@ root.Qsupplier=
|
||||
watch_events: ->
|
||||
faye = new Faye.Client(event_host)
|
||||
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 e.data
|
||||
<% end %>
|
||||
|
||||
@@ -75,11 +75,12 @@ Feature: Supplier main board
|
||||
@javascript
|
||||
Scenario: Update table number and section if table changes
|
||||
Given there is an active list and order
|
||||
And there is another section with table
|
||||
And I am signed in as supplier
|
||||
# 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
|
||||
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
|
||||
And the supplier main board section name should be updated to the new section
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
step 'there is a section' do
|
||||
@section ||= create :section, supplier: @supplier
|
||||
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
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
|
||||
@@ -18,4 +18,8 @@ module SpecEmberHelpers
|
||||
def js_path
|
||||
page.evaluate_script 'location.pathname + location.hash'
|
||||
end
|
||||
|
||||
def faye_log
|
||||
page.evaluate_script(%|window.faye_log|)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user