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

Cartify::OrderItemsController#create is missing a template for this request format and variant #42

Open
raptorf1 opened this issue May 3, 2019 · 1 comment

Comments

@raptorf1
Copy link
Member

raptorf1 commented May 3, 2019

Problem

  • Week 5 of the bootcamp
  • SlowFood challenge - Kimchi Team
  • Feature: Visitor can add to order
  • PR [WIP] request where you can view the code is here

Installed cartify gem according to instructions.
Configured cartify gem according to instructions.
Used cartify method add_to_cart and shop_icon_quantity in our code.
Although when we launch the rails server we see everything working as expected, during the cucumber test to click the "Add" link we are thrown the error of the title.

Story

As a visitor,
In order to select products I want to buy
I would like to be able to add products to an order

Spec

When I click "Add" link on "Pizza"

When("I click {string} link on {string}") do |element, product_name|
  product = Product.find_by(name: product_name)
  within("#product_#{product.id}") do
    click_on element
  end
end

Screenshots

  • bundle exec cucumber without Javascript enabled
    without javascript

  • bundle exec cucumber witht Javascript enabled & chrome driver version 2.33 (the default when we did the installation)
    with javascript version 2-33 of chrome driver

  • bundle exec cucumber witht Javascript enabled & chrome driver version 2.42 (the one Faraz put on the demo video)
    with javascript version 2-42 of chrome driver

  • binding.pry at the point of the non passing step
    binding-pry

How did you try to solve the problem?

  • Searched on the internet without finding anything specific
  • Looked at official cartify GitHub with no luck
  • Tried to move the div to different places in case it did any difference
  • Tried to move the shop_icon_quantity outside the NavBar in case it did any difference
  • Watched the relevant videos of Faraz & Thomas
  • Removed the "Pizza" from the cucumber step but still it cannot click the link
@tochman
Copy link
Member

tochman commented Jul 8, 2019

I would argue that this error is caused using a driver that does NOT activate JavaScript. Please try to install Selenium/Chrome and run your tests.

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

2 participants