projectdx/kookaburra — Issue #3: Too much code complexity?
Author: jeroenvandijk
Created: 2012-02-27 13:27:16+00:00
State: open

First off, I want to say that I like the ideas of Kookaburra and I'm happy that you guys started this project. However I'm having difficulties understanding the code and I think it is too complex for what it should do.

I'm currently trying to get Kookaburra running in a new project. However, I'm doing something wrong. Normally when I come across such a problem, I look at the source code of a gem to understand what I'm doing wrong and how I can fix it. So that's what I did with Kookaburra.

Unfortunately, the levels of indirection and metaprogramming make it hard to understand how it should work. I'll probably find out how things work if I spend enough time, but I just wanted to try it out so I'm not sure if I want to invest that time.

I wonder why all this complexity is necessary. To name a few things I would use delegating instead of using mixins for `has_browser`, `has_strategies`, and `has_ui_component`. Another thing I would be more careful with is the `class_eval` and `define_method` it seems to corrupt the stacktrace. To illustrate this the error I get is:

ArgumentError:
wrong number of arguments (1 for 0)
./spec/features/dashboard/accounts.feature:6
# ./spec/support/kookaburra_drivers/ui_driver.rb:10:in `sign_in'

And I'm just following the Readme example.

With all that said, I hope you guys grow this library into something great! Thanks for the work!