Fixes and simplifications
This commit is contained in:
@@ -4,4 +4,4 @@ App.ButtonCloseListComponent = Ember.Component.extend
|
||||
classNameBindings: ['content.active:show:hide']
|
||||
tagName: 'button'
|
||||
click: (e)->
|
||||
@get('targetObject').modal 'close_list', model: @get('content')
|
||||
@modal 'close_list', model: @get('content')
|
||||
|
||||
@@ -32,7 +32,7 @@ App.MenuProductComponent = Ember.Component.extend
|
||||
if product.get('isNew')
|
||||
product.deleteRecord()
|
||||
else
|
||||
@get('targetObject').modal 'confirm',
|
||||
@modal 'confirm',
|
||||
model: product
|
||||
title_path: 'product.destroy_confirmation'
|
||||
ok: -> product.destroyRecord()
|
||||
|
||||
@@ -29,6 +29,6 @@ App.SectionAreaComponent = Ember.Component.extend DragNDrop.Draggable,
|
||||
position_y: position.top / dpm
|
||||
click: ->
|
||||
return unless @get('targetObject.editmode')
|
||||
@get('targetObject').modal 'section_area',
|
||||
@modal 'section_area',
|
||||
title_path: 'section_area.modal.title'
|
||||
model: @get('section_area')
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
ComponentExtensions = Ember.Mixin.create
|
||||
modal: (name, options={})->
|
||||
target = App.__container__.lookup('route:application')
|
||||
target.send "openModal", name, options
|
||||
|
||||
Ember.Component.reopen ComponentExtensions
|
||||
@@ -30,9 +30,11 @@ Feature: Supplier section view
|
||||
When the list is marked as in need of payment
|
||||
Then the section table should be marked as in need of payment
|
||||
|
||||
And I wait 0.5 seconds
|
||||
And I wait 1 seconds
|
||||
|
||||
When I click on the close list button in the section table table popup
|
||||
# Reopen the table menu
|
||||
When I click on section table as a supplier
|
||||
And I click on the close list button in the section table table popup
|
||||
And confirm the supplier close list modal
|
||||
And I wait 1 second
|
||||
Then the section table should not have any active list markings anymore
|
||||
|
||||
@@ -59,10 +59,9 @@ end
|
||||
|
||||
step "I click on the close list button in the section table table popup" do
|
||||
# first click on the table to open the table actions popup
|
||||
table = page.find(".section-table-#{@table.id}")
|
||||
table.click
|
||||
#table = page.find(".section-table-#{@table.id}")
|
||||
# now click the close list button inside the table actions popup
|
||||
page.find(".section-table-#{@table.id} .table-actions .close-list-button").click
|
||||
js_click ".section-table-#{@table.id} .table-actions .close-list-button"
|
||||
end
|
||||
|
||||
step "the section table should not have any active list markings anymore" do
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ Devise.stretches = 1
|
||||
#Capybara.javascript_driver = :webkit
|
||||
#Capybara.javascript_driver = :poltergeist
|
||||
Capybara.javascript_driver = :selenium
|
||||
Capybara.default_wait_time = 3 # ember needs more time than the default of 2
|
||||
Capybara.default_wait_time = 5 # ember needs more time than the default of 2
|
||||
Capybara::Screenshot.webkit_options = { width: 1024, height: 768 }
|
||||
WebMock.disable_net_connect!(allow_localhost: true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user