Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spree Upgrade] Changing distributor and OC in the Edit Orders page (3 broken specs) #3103

Closed
luisramos0 opened this issue Nov 21, 2018 · 2 comments
Assignees

Comments

@luisramos0
Copy link
Contributor

Expected behaviour: if an order is not complete, the order edit page should let manager change the distributor and the OC.

Related broken specs:

  3) 
    As an administrator
    I want to manage orders
 displays error when incorrect distribution for products is chosen
     Failure/Error: targetted_select2(value, options)
     
     Capybara::ElementNotFound:
       Unable to find visible css "#s2id_order_distributor_id"
     # ./spec/support/request/web_helper.rb:163:in `select2_select'
     # ./spec/features/admin/orders_spec.rb:116:in `block (2 levels) in <top (required)>'

  4) 
    As an administrator
    I want to manage orders
 can't change distributor or order cycle once order has been finalized
     Failure/Error: expect(page).to have_selector 'p', text: "Distributor: #{@order.distributor.name}"
       expected to find visible css "p" with text "Distributor: Enterprise 25" but there were no matches
     # ./spec/features/admin/orders_spec.rb:144:in `block (2 levels) in <top (required)>'

@luisramos0 luisramos0 changed the title [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (2 broken tests) [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (1 broken test) Dec 21, 2018
@luisramos0
Copy link
Contributor Author

luisramos0 commented Dec 21, 2018

there are 4 related errors now:

 2) 
    As an administrator
    I want to manage orders
 displays error when incorrect distribution for products is chosen
     Failure/Error: targetted_select2(value, options)
     
     Capybara::ElementNotFound:
       Unable to find visible css "#s2id_order_distributor_id"
     # ./spec/support/request/web_helper.rb:163:in `select2_select'
     # ./spec/features/admin/orders_spec.rb:116:in `block (2 levels) in <top (required)>'

rspec ./spec/features/admin/orders_spec.rb:48 # 
    As an administrator
    I want to manage orders
 creating an order with distributor and order cycle

 1) 
    As an administrator
    I want to manage orders
 creating an order with distributor and order cycle
     Failure/Error: expect(page).to have_selector 'h1', text: 'Customer Details'
       expected to find visible css "h1" with text "Customer Details" but there were no matches. Also found "Order # R784016120", which matched the selector but not all filters.
     # ./spec/features/admin/orders_spec.rb:81:in `block (2 levels) in <top (required)>'


rspec ./spec/features/admin/orders_spec.rb:315 # 
    As an administrator
    I want to manage orders
 as an enterprise manager creating an order with distributor and order cycle

 5) 
    As an administrator
    I want to manage orders
 as an enterprise manager creating an order with distributor and order cycle
     Failure/Error: expect(page).to have_select2 'order_distributor_id', with_options: [distributor1.name]
       expected to find select2 #order_distributor_id with {:with_options=>["Enterprise 33"]}
     # ./spec/features/admin/orders_spec.rb:325:in `block (3 levels) in <top (required)>'


rspec ./spec/features/admin/orders_spec.rb:229 # 
    As an administrator
    I want to manage orders
 as an enterprise manager viewing the edit page shows a list of line_items


 6) 
    As an administrator
    I want to manage orders
 as an enterprise manager viewing the edit page shows a list of line_items
     Failure/Error: expect(page).to have_selector "td.item-price", text: item.single_display_amount
       expected to find visible css "td.item-price" with text #<Spree::Money:0x0055e630ddb898 @money=#<Money fractional:1000 currency:AUD>, @options={:with_currency=>false, :symbol_position=>:before, :no_cents=>false, :decimal_mark=>".", :thousands_separator=>",", :currency=>"AUD"}> within #<Capybara::Node::Element tag="tbody" path="//HTML[1]/BODY[1]/DIV[1]/DIV[1]/DIV[4]/DIV[1]/DIV[1]/DIV[1]/DIV[2]/DIV[2]/DIV[1]/DIV[1]/FORM[1]/FIELDSET[1]/TABLE[1]/TBODY[1]"> but there were no matches
     # ./spec/features/admin/orders_spec.rb:233:in `block (6 levels) in <top (required)>'
     # ./spec/features/admin/orders_spec.rb:231:in `block (5 levels) in <top (required)>'
     # ./spec/features/admin/orders_spec.rb:230:in `block (4 levels) in <top (required)>'

@luisramos0 luisramos0 changed the title [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (1 broken test) [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (4 broken test) Dec 21, 2018
@luisramos0
Copy link
Contributor Author

After PR 3286, these are the 3 errors related to OC and distributor:

  1) 
    As an administrator
    I want to manage orders
 creating an order with distributor and order cycle
     Failure/Error: expect(page).to have_selector 'h1', text: 'Customer Details'
       expected to find visible css "h1" with text "Customer Details" but there were no matches. Also found "Order # R268713701", which matched the selector but not all filters.
     # ./spec/features/admin/orders_spec.rb:81:in `block (2 levels) in <top (required)>'

  2) 
    As an administrator
    I want to manage orders
 displays error when incorrect distribution for products is chosen
     Failure/Error: targetted_select2(value, options)
     
     Capybara::ElementNotFound:
       Unable to find visible css "#s2id_order_distributor_id"
     # ./spec/support/request/web_helper.rb:163:in `select2_select'
     # ./spec/features/admin/orders_spec.rb:116:in `block (2 levels) in <top (required)>'

 5) 
    As an administrator
    I want to manage orders
 as an enterprise manager creating an order with distributor and order cycle
     Failure/Error: expect(page).to have_selector 'td', text: product.name
       expected to find visible css "td" with text "Product #29 - 516" but there were no matches. Also found "Subtotal :", "$0.00", "", "TOTAL ORDER :", "$0.00", "", which matched the selector but not all filters.
     # ./spec/features/admin/orders_spec.rb:327:in `block (3 levels) in <top (required)>'

@luisramos0 luisramos0 changed the title [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (4 broken test) [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (3 broken test) Jan 8, 2019
@luisramos0 luisramos0 changed the title [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (3 broken test) [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (1 broken test) Jan 31, 2019
@luisramos0 luisramos0 changed the title [Spree Upgrade][Admin/Orders/Edit] Edit Orders page is not showing distributor and OC (1 broken test) [Spree Upgrade][Admin/Orders/Edit] Changing distributor and OC in the Edit Orders page (1 broken test) Feb 1, 2019
@luisramos0 luisramos0 changed the title [Spree Upgrade][Admin/Orders/Edit] Changing distributor and OC in the Edit Orders page (1 broken test) [Spree Upgrade] Changing distributor and OC in the Edit Orders page (1 broken test) Feb 1, 2019
@luisramos0 luisramos0 self-assigned this Feb 1, 2019
@luisramos0 luisramos0 changed the title [Spree Upgrade] Changing distributor and OC in the Edit Orders page (1 broken test) [Spree Upgrade] Changing distributor and OC in the Edit Orders page (3 broken specs) Feb 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant