timreganporter

timreganporter

Agile Web Development with Rails 6 - more system tests need correcting (Iteration H2)

On Iteration H2, we run systems tests for the first time. There are instructions to fix products_test.rb but there are a number of other places to fix. After the fix in the book, the tests still generate 2 failures and 5 errors (at least for me – but I’m pretty sure I haven’t deviated from the book and all of the other tests (controllers and models) run find and my application seems to behave fine in the development environment).

Most of the problems seem to stem from the functionality that is no longer the default from scaffolding.

  • Carts test generates 2 errors in looking for “Back.”
  • Carts test generates a failure looking for the default cart destroyed message.
  • Line items test generates an error in creating a line item (“couldn’t find Product without an ID”).
  • Orders test has 2 errors for updating, one because it is unable to find pay type that is not disabled and one because the button doesn’t say “Update Order”
  • Orders test errors in creating (Unable to find Address) – I assume that’s because the cart is empty and doesn’t display the form.

Most of these tests (with the exception of outdated nav and messaging in the carts test) are for functionality that doesn’t match what we need and those tests can be commented out.

Popular Prag Prog topics Top

New
Razor54672
The answer to 3rd Problem of Chapter 5 (Making Choices) of “Practical Programming, Third Edition” seems incorrect in the given answer ke...
New
simonpeter
When I try the command to create a pair of migration files I get an error. user=> (create-migration "guestbook") Execution error (Ill...
New
mikecargal
Title: Hands-on Rust: question about get_component (page 295) (feel free to respond. “You dug you’re own hole… good luck”) I have somet...
New
leba0495
Hello! Thanks for the great book. I was attempting the Trie (chap 17) exercises and for number 4 the solution provided for the autocorre...
New
AndyDavis3416
@noelrappin Running the webpack dev server, I receive the following warning: ERROR in tsconfig.json TS18003: No inputs were found in c...
New
digitalbias
Title: Build a Weather Station with Elixir and Nerves: Problem connecting to Postgres with Grafana on (page 64) If you follow the defau...
New
adamwoolhether
Is there any place where we can discuss the solutions to some of the exercises? I can figure most of them out, but am having trouble with...
New
Keton
When running the program in chapter 8, “Implementing Combat”, the printout Health before attack was never printed so I assumed something ...
New
dtonhofer
@parrt In the context of Chapter 4.3, the grammar Java.g4, meant to parse Java 6 compilation units, no longer passes ANTLR (currently 4....
New

Other popular topics Top

AstonJ
If it’s a mechanical keyboard, which switches do you have? Would you recommend it? Why? What will your next keyboard be? Pics always w...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
New
AstonJ
Inspired by this post from @Carter, which languages, frameworks or other tech or tools do you think is killing it right now? :upside_down...
New
Rainer
Not sure if following fits exactly this thread, or if we should have a hobby thread… For many years I’m designing and building model air...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
AstonJ
Saw this on TikTok of all places! :lol: Anyone heard of them before? Lite:
New
AstonJ
We’ve talked about his book briefly here but it is quickly becoming obsolete - so he’s decided to create a series of 7 podcasts, the firs...
New
AstonJ
Chris Seaton, the creator of TruffleRuby has died. It appears from suicide :cry: He left this note on Twitter on the weekend: And one...
New
First poster: bot
Large Language Models like ChatGPT say The Darnedest Things. The Errors They MakeWhy We Need to Document Them, and What We Have Decided ...
New

Latest in PragProg

View all threads ❯