refactor and move to selenium

This commit is contained in:
2015-01-21 18:23:47 +01:00
parent c688f0353b
commit 9a8c364d38
24 changed files with 174 additions and 116 deletions
@@ -0,0 +1,15 @@
each product_category in active_product_categories
.product-category-container
if orderProducts
h4 OderProducts
if product_category.products
h4.product_category-title{action "toggleProductCategory" product_category}
if product_category.collapsed
span.icon.collapsed
else
span.icon
= product_category.name
unless product_category.collapsed
ul.product_category-products
each product in product_category.products
= menu-product product=product orderProducts=orderProducts
@@ -0,0 +1,12 @@
if product.description
button.show-product-description{action "showProductDescription" product}
span
else
span.no-product-description
if orderProducts
a{action "addProduct" product}= product.name
button.add-product-to-list{action "addProduct" product}
span
else
span= product.name
span.product-price.currency=currency product.price
@@ -12,41 +12,7 @@
else
button.join-table-button{action "joinOccupiedTable"}=t 'join_request.requestor.join_this_table'
if tableCanTakeOrders
.large-6.columns
each product_category in supplier.product_categories
.product-category-container
if product_category.products
h4.product_category-title{action "toggleProductCategory" product_category}
if product_category.collapsed
span.icon.collapsed
else
span.icon
= product_category.name
unless product_category.collapsed
ul.product_category-products
each product in product_category.products
li class="order-product-#{unbound product.id}"
if product.description
button.show-product-description{action "showProductDescription" product}
span
else
span.no-product-description
a{action "addProduct" product}= product.name
button.add-product-to-list{action "addProduct" product}
span
span.product-price.currency=currency product.price
.large-6.columns= menu-product-categories product_categories=supplier.product_categories orderProducts=true
.large-6.columns= render 'product_orders'
else
.large12
each product_category in supplier.product_categories
if product_category.products
.product_category-container
h4.product-category-title= product_category.name
ul.product_category-products
each product in product_category.products
li class="order-product-#{unbound product.id}"
if product.description
button.show-product-description{action "showProductDescription" product}
span
span= product.name
span.right.currency=currency product.price
.large12= menu-product-categories product_categories=supplier.product_categories orderProducts=false