Client side table management for supplier sections
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
moduleForModel 'section', 'Section model',
|
||||
needs: ['model:section', 'model:table', 'model:section-area', 'model:section-element', 'model:list']
|
||||
|
||||
test "arrange_tables_in_grid", ->
|
||||
section = @subject
|
||||
width: 20
|
||||
height: 13
|
||||
Ember.run ->
|
||||
table6 = section.store.createRecord 'table', number: 6, section: section
|
||||
table1 = section.store.createRecord 'table', number: 1, section: section
|
||||
table19 = section.store.createRecord 'table', number: 19, section: section
|
||||
|
||||
section.invoke 'arrange_tables_in_grid'
|
||||
|
||||
equal table1.get('position_y'), 2.85
|
||||
equal table6.get('position_y'), 2.85
|
||||
equal table19.get('position_y'), 9.35
|
||||
|
||||
equal table1.get('position_x'), 4.6
|
||||
equal table6.get('position_x'), 14.6
|
||||
equal table19.get('position_x'), 4.6
|
||||
|
||||
Reference in New Issue
Block a user