All specs green, ember transition successful

This commit is contained in:
2014-06-27 14:52:18 +02:00
parent a5e8d38882
commit b5a68e9627
19 changed files with 100 additions and 14 deletions
+17
View File
@@ -0,0 +1,17 @@
module SpecEmberHelpers
def ember_store
h = page.evaluate_script <<-SCRIPT
$s = Qsupplier.App.__container__.lookup('controller:application').store;
JSON.stringify({
lists: $s.all('list').invoke('serialize'),
orders: $s.all('order').invoke('serialize'),
product_orders: $s.all('product_order').invoke('serialize'),
product_categories: $s.all('product_category').invoke('serialize'),
products: $s.all('product').invoke('serialize'),
sections: $s.all('section').invoke('serialize'),
tables: $s.all('table').invoke('serialize')
})
SCRIPT
JSON.parse(h)
end
end