Greenification of the specs
This commit is contained in:
+3
-4
@@ -1,7 +1,6 @@
|
|||||||
App.OrdersDisplayController = Ember.Controller.extend
|
App.OrdersDisplayController = Ember.Controller.extend
|
||||||
active_section: null
|
sections: Ember.computed -> @store.peekAll('section')
|
||||||
sections: (-> @store.peekAll('section') ).property()
|
orders: Ember.computed 'model.[]', 'globals.active_section.id', ->
|
||||||
orders: Ember.computed 'model.[]', 'active_section.id', ->
|
|
||||||
orders = @get('model').filterBy('needs_supplier_attention')
|
orders = @get('model').filterBy('needs_supplier_attention')
|
||||||
orders = orders.filterBy('section.id', id) if id = @get('active_section.id')
|
orders = orders.filterBy('list.section.id', id) if id = @get('globals.active_section.id')
|
||||||
orders.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first :-) Customer happyness
|
orders.sortBy('created_at') # Not reversed, oldest on top, start with oldest order first :-) Customer happyness
|
||||||
@@ -15,7 +15,7 @@ App.Router.map ->
|
|||||||
@route 'employees'
|
@route 'employees'
|
||||||
@route 'employee', path: '/employees/:employee_id'
|
@route 'employee', path: '/employees/:employee_id'
|
||||||
@route 'page', path: 'pages/:page_id'
|
@route 'page', path: 'pages/:page_id'
|
||||||
@route 'orders_display' # chromecast etc
|
@route 'orders-display' # chromecast etc
|
||||||
@route 'menu'
|
@route 'menu'
|
||||||
@route 'settings'
|
@route 'settings'
|
||||||
@route 'schedule'
|
@route 'schedule'
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
= sections-header active_section=section
|
= sections-header active_section=globals.active_section
|
||||||
table.table
|
table.table
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
+1
-1
@@ -4,6 +4,6 @@ require 'active_support/all'
|
|||||||
# rm log/test.log && rm -rf tmp/capybara/* && ./bin/test_prepare && touch public/user/cordova.js && rspec spec/acceptance/users/sign_up.feature:15
|
# rm log/test.log && rm -rf tmp/capybara/* && ./bin/test_prepare && touch public/user/cordova.js && rspec spec/acceptance/users/sign_up.feature:15
|
||||||
mozo_user_path = ENV['MOZO_USER_PATH'] || Pathname.new(File.expand_path('../../../mozo-user', __FILE__))
|
mozo_user_path = ENV['MOZO_USER_PATH'] || Pathname.new(File.expand_path('../../../mozo-user', __FILE__))
|
||||||
Dir.chdir mozo_user_path do
|
Dir.chdir mozo_user_path do
|
||||||
`ember build --output-path=../mozo/public/user/ --environment=testexport` # not production, because then the production servers will be queried
|
`ember build --output-path=../backend/public/user/ --environment=testexport` # not production, because then the production servers will be queried
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ Feature: Getting product information during an order
|
|||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
And I am on the user homepage
|
And I am on the user homepage
|
||||||
When the user scans a table QR code
|
When the user scans a table QR code
|
||||||
|
And the users clicks on the product category "Beer" title
|
||||||
And the user clicks on the more info button for the product with name 'Heineken beer'
|
And the user clicks on the more info button for the product with name 'Heineken beer'
|
||||||
Then the user page should have product information 'Brewed in Amsterdam'
|
Then the user page should have product information 'Brewed in Amsterdam'
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ Feature: Ordering a product as a user
|
|||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
And I am on the user homepage
|
And I am on the user homepage
|
||||||
When the user scans a table QR code
|
When the user scans a table QR code
|
||||||
|
And the users clicks on the product category "Beer" title
|
||||||
And the user clicks on the order 'Heineken beer' twice
|
And the user clicks on the order 'Heineken beer' twice
|
||||||
Then the user order 'Heineken beer' should be in the order list with price
|
Then the user order 'Heineken beer' should be in the order list with price
|
||||||
And the user order total should not be visible for only one order
|
And the user order total should not be visible for only one order
|
||||||
|
And the users clicks on the product category "Lunch" title
|
||||||
When the user clicks on the order product button 'Apple pie'
|
When the user clicks on the order product button 'Apple pie'
|
||||||
Then the user order total should be visible with the correct total price
|
Then the user order total should be visible with the correct total price
|
||||||
When the user clicks on the user order button
|
When the user clicks on the user order button
|
||||||
@@ -31,6 +33,7 @@ Feature: Ordering a product as a user
|
|||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
And I am on the user homepage
|
And I am on the user homepage
|
||||||
When the user scans a table QR code
|
When the user scans a table QR code
|
||||||
|
And the users clicks on the product category "Beer" title
|
||||||
And the user clicks on the order product button 'Australian beer'
|
And the user clicks on the order product button 'Australian beer'
|
||||||
And the user selects the product variant 'Without foam'
|
And the user selects the product variant 'Without foam'
|
||||||
Then the user order 'Australian beer' with variant 'Without foam' should be in the order list
|
Then the user order 'Australian beer' with variant 'Without foam' should be in the order list
|
||||||
@@ -42,7 +45,9 @@ Feature: Ordering a product as a user
|
|||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
And I am on the user homepage
|
And I am on the user homepage
|
||||||
When the user scans a table QR code
|
When the user scans a table QR code
|
||||||
|
And the users clicks on the product category "Beer" title
|
||||||
And the user clicks on the order 'Heineken beer' twice
|
And the user clicks on the order 'Heineken beer' twice
|
||||||
|
And the users clicks on the product category "Lunch" title
|
||||||
And the user clicks on the order product button 'Apple pie'
|
And the user clicks on the order product button 'Apple pie'
|
||||||
And the user clicks on the clear order for the last order button
|
And the user clicks on the clear order for the last order button
|
||||||
And the user clicks on the clear order for the last order button
|
And the user clicks on the clear order for the last order button
|
||||||
@@ -64,5 +69,5 @@ Feature: Ordering a product as a user
|
|||||||
And the user clicks on the lists link in the side menu
|
And the user clicks on the lists link in the side menu
|
||||||
And the user opens the side menu again
|
And the user opens the side menu again
|
||||||
And the user clicks on the order products link in the side menu
|
And the user clicks on the order products link in the side menu
|
||||||
Then the user page contains the product category beer
|
Then the user page contains the product category "Beer"
|
||||||
And the user should see the products listed for the active list
|
And the user should see the products listed for the active list
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ Feature:
|
|||||||
And there is a table
|
And there is a table
|
||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
When the user is on the order products page
|
When the user is on the order products page
|
||||||
Then the user page contains the product category lunch
|
Then the user page contains the product category "Lunch"
|
||||||
When the product category lunch is not visible today
|
When the product category lunch is not visible today
|
||||||
And I reload the page
|
And I reload the page
|
||||||
Then the user page contains the product category beer
|
Then the user page contains the product category "Beer"
|
||||||
And the user page does not contain the product category lunch
|
And the user page does not contain the product category "Lunch"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: Product category visibility by minute when inside the range
|
Scenario: Product category visibility by minute when inside the range
|
||||||
@@ -19,11 +19,11 @@ Feature:
|
|||||||
And there is a table
|
And there is a table
|
||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
When the user is on the order products page
|
When the user is on the order products page
|
||||||
Then the user page contains the product category lunch
|
Then the user page contains the product category "Lunch"
|
||||||
When the product category lunch is visible at this time
|
When the product category lunch is visible at this time
|
||||||
And I reload the page
|
And I reload the page
|
||||||
Then the user page contains the product category beer
|
Then the user page contains the product category "Beer"
|
||||||
And the user page contains the product category lunch
|
And the user page contains the product category "Lunch"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: Product category visibility by minute when category is visible after now
|
Scenario: Product category visibility by minute when category is visible after now
|
||||||
@@ -31,11 +31,11 @@ Feature:
|
|||||||
And there is a table
|
And there is a table
|
||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
When the user is on the order products page
|
When the user is on the order products page
|
||||||
Then the user page contains the product category lunch
|
Then the user page contains the product category "Lunch"
|
||||||
When the product category lunch is visible later than now
|
When the product category lunch is visible later than now
|
||||||
And I reload the page
|
And I reload the page
|
||||||
Then the user page contains the product category beer
|
Then the user page contains the product category "Beer"
|
||||||
And the user page does not contain the product category lunch
|
And the user page does not contain the product category "Lunch"
|
||||||
|
|
||||||
@javascript
|
@javascript
|
||||||
Scenario: Product category visibility by minute when category is visible before now
|
Scenario: Product category visibility by minute when category is visible before now
|
||||||
@@ -43,8 +43,8 @@ Feature:
|
|||||||
And there is a table
|
And there is a table
|
||||||
And I am signed in as a user
|
And I am signed in as a user
|
||||||
When the user is on the order products page
|
When the user is on the order products page
|
||||||
Then the user page contains the product category lunch
|
Then the user page contains the product category "Lunch"
|
||||||
When the product category lunch is visible earlyer than now
|
When the product category lunch is visible earlyer than now
|
||||||
And I reload the page
|
And I reload the page
|
||||||
Then the user page contains the product category beer
|
Then the user page contains the product category "Beer"
|
||||||
And the user page does not contain the product category lunch
|
And the user page does not contain the product category "Lunch"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Feature: Submitting contact form
|
Feature: Submitting contact form
|
||||||
Scenario: Website visitor submits contact form
|
Scenario: Website visitor submits contact form
|
||||||
Given there are standard website pages
|
Given there are standard website pages
|
||||||
When I visit '/contact'
|
When I visit '/en/contact'
|
||||||
And I fill in the website contact form
|
And I fill in the website contact form
|
||||||
And I submit the website contact form
|
And I submit the website contact form
|
||||||
Then I should be redirected to the homepage
|
Then I should be redirected to the homepage
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ end
|
|||||||
|
|
||||||
step "the supplier main board table number should be updated to the new table number" do
|
step "the supplier main board table number should be updated to the new table number" do
|
||||||
expect( find(".list-row-#{@list.id} .table-number").text ).to eq "# 65"
|
expect( find(".list-row-#{@list.id} .table-number").text ).to eq "# 65"
|
||||||
expect( find(".order-row-#{@list.orders.first.id} .table-number").text ).to eq "65"
|
expect( find(".order-row-#{@list.orders.first.id} .table-number").text ).to eq "# 65"
|
||||||
end
|
end
|
||||||
|
|
||||||
step "the supplier main board section name should be updated to the new section" do
|
step "the supplier main board section name should be updated to the new section" do
|
||||||
|
|||||||
@@ -14,8 +14,9 @@ step "the user indicates in the popup that he wants to change the table" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
step "the user should see the supplier menu having the other table as base" do
|
step "the user should see the supplier menu having the other table as base" do
|
||||||
#route_should_be 'user#list_products'
|
ember_route_should_be '/active-list'
|
||||||
page.should have_content 'Apple pie'
|
product_order = @list.orders.first.product_orders.first
|
||||||
|
page.should have_content "#{product_order.quantity} x #{product_order.product_name}"
|
||||||
all('.table-number').map(&:text).uniq.should == ["# #{@other_table.number.to_s}"]
|
all('.table-number').map(&:text).uniq.should == ["# #{@other_table.number.to_s}"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ step "the user clicks on the submit feedback button" do
|
|||||||
end
|
end
|
||||||
|
|
||||||
step "the user should see the feedback submitted message" do
|
step "the user should see the feedback submitted message" do
|
||||||
page.should have_content 'Thank you for your feedback'
|
#page.should have_content 'Thank you for your feedback'
|
||||||
|
page.should have_content 'Dank je voor het meedenken'
|
||||||
end
|
end
|
||||||
|
|
||||||
step "a user feedback should be created containing the feedback" do
|
step "a user feedback should be created containing the feedback" do
|
||||||
|
|||||||
@@ -140,12 +140,12 @@ step "the user has an active list with a/an :order_status order" do |order_statu
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
step "the user page contains the product category lunch" do
|
step "the user page contains the product category :product_category_name" do |product_category_name|
|
||||||
js_text("#product-category-#{@category_lunch.id} .product_category-title").should include @category_lunch.name
|
product_category = ProductCategory.find_by_name(product_category_name)
|
||||||
|
js_text("#product-category-#{product_category.id} .product_category-title").should include product_category.name
|
||||||
end
|
end
|
||||||
step "the user page contains the product category beer" do
|
|
||||||
js_text("#product-category-#{@category_beer.id} .product_category-title").should include @category_beer.name
|
step "the user page does not contain the product category :product_category_name" do |product_category_name|
|
||||||
end
|
product_category = ProductCategory.find_by_name(product_category_name)
|
||||||
step "the user page does not contain the product category lunch" do
|
page.should_not have_selector "#product-category-#{product_category.id} .product_category-title"
|
||||||
page.should_not have_selector "#product-category-#{@category_lunch.id} .product_category-title"
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
|
||||||
|
step "the users clicks on the product category :product_category_name title" do |product_category_name|
|
||||||
|
product_category = ProductCategory.find_by_name product_category_name
|
||||||
|
js_click "#product-category-#{product_category.id} .product_category-title"
|
||||||
|
end
|
||||||
@@ -9,8 +9,8 @@ describe User do
|
|||||||
user.supplier_name.should == 'Benji setup'
|
user.supplier_name.should == 'Benji setup'
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'falls back to unkown if not present' do
|
it 'falls back to unknown if not present' do
|
||||||
user.supplier_name.should == I18n.t('supplier.user.unkown_name')
|
user.supplier_name.should == I18n.t('supplier.user.unknown_name')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ Release todos:
|
|||||||
- Printer paperclip 5 minute setup story
|
- Printer paperclip 5 minute setup story
|
||||||
- Maybe responsive supplier dashboard
|
- Maybe responsive supplier dashboard
|
||||||
- facebook api integration on homepage share picture and js
|
- facebook api integration on homepage share picture and js
|
||||||
|
- Signup explanation better and link to current supplier when already
|
||||||
|
signed in
|
||||||
|
|
||||||
Supplier
|
Supplier
|
||||||
--------
|
--------
|
||||||
|
|||||||
Reference in New Issue
Block a user