Comments (8)
Hi,
Do you still have this problem?
You may want to use the most updated version of akephalos:
https://github.com/Nerian/akephalos2
from akephalos.
Well, phhht!
Nevermind. In trying to debug further what is going on, I discovered that Capybara's mode doesn't get switched to javascript automatically when using the @akephalos
tag like it does with @selenium
. I thought it did. When I force @javascript
and set the driver to :akephelos
, the test (in the example project) passes. So it's either a problem with my project or the issue is much more complex than the simple example I posted.
The above is with akephalos 0.2.5, by the way. I did upgrade my project to akephelos2 and still see the same behavior, but given this new information, I don't think it should be considered an akephalos problem yet.
Sorry for the false alarm. Closing this issue now.
from akephalos.
@phillipkoebbe: I checked the code and it actually should do that. Try with require 'akephalos/cucumber'
and let me know how it goes :)
from akephalos.
According to this: https://github.com/jnicklas/capybara/blob/master/lib/capybara/cucumber.rb#L17 whenever you have a tag like @some_name
Capybara is going to check if there is a driver with some_name
as name and is going to set it as the current driver.
from akephalos.
I added require akephalos/cucumber
right after requiring akephalos, and it worked as expected. Thanks for that. I updated the example project to reflect the change.
On a related note, whereas the the sample project's tests now pass with akephalos 0.2.5, they don't with akephalos2 2.0.7. I get this:
When I click "Answer" # features/step_definitions/add_steps.rb:9
com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot call method "get" of null (http://127.0.0.1:52444/javascripts/application.js?1314045635#3) (NativeException)
./features/step_definitions/add_steps.rb:10:in `/^I click "([^"]*)"$/'
features/add.feature:18:in `When I click "Answer"'
where the step is simply
Given /^I click "([^"]*)"$/ do |button|
click_button button
end
I also noticed a couple of these failures in my real project when I ran it with akephalos2. I'm wondering if it has anything to do with the older versions of the software that I'm using (capybara 0.4.1.2, cucumber 0.10.2, cucumber-rails 0.3.2)? I would upgrade (would love to, actually), except that I'm still on rails 2.3.x with this project and newer versions of cucumber don't support it.
from akephalos.
Does this https://github.com/phillipkoebbe/akephalos-mootools reproduce that error? Can you add a gemfile so that I can test it with the exact gems that you have installed?
It is kind of weird that the tests pass on the old Akephalos. Probably I broke something :)
The code is failing here: https://github.com/phillipkoebbe/akephalos-mootools/blob/master/public/javascripts/application.js#L8
Which means that $('number-1')
is returning nil.
I look at: https://github.com/phillipkoebbe/akephalos-mootools/blob/master/app/views/home/index.html.erb#L1 and there it is. Should be found. Mmm this smells like a bug :)
I will try to reproduce the error.
Can you open an issue here please: https://github.com/Nerian/akephalos2/issues
from akephalos.
Yes, the sample project referenced above does illustrate the error. I have added a Gemfile and verified that it does work. I ran the project under Ruby 1.9.2-p180 in RVM. After creating a gemset and installing bundler, simply doing
bundle install
cucumber
ran the tests. The Gemfile uses akephalos-0.2.5 so you can see it passing, but there is a line for akephalos2-2.0.7 commented out and ready to use. I specified the specific gems and versions because some of the gems (cucumber and cucumber-rails I think) are a little loose with their dependencies and I was get versions of gherkin and other gems that were too new and caused problems. So I tried to specify all the dependencies explicitly before installing the primary gems.
New issue created: Nerian/akephalos2#20
from akephalos.
I know we closed this issue quite a while ago, but I finally discovered the original problem. In my application, I'm making an AJAX call and updating a tbody with the results. I originally thought that the request was not getting submitted, but I verified that it was. It turns out that the update in the browser never happens. However, if I change the update target to a div, it gets updated.
I upgraded to the latest akephalos2 (2.1.2 at the time) and tried again, but ran into the issue you hunted down previously [1]. I forced version 2.8 of HtmlUnit and still have the problem of the tbody not getting updated. At the moment, I don't know if it's a bug in HtmlUnit or a philosophy issue (meaning they don't think tbody should be the update target of an AJAX request). Since in works in the browser, I'm inclined to think it's a bug. Unfortunately, I don't really have time right now to dig into it any further, so I'm just going to change my HTML to use divs instead. I've been trying to get away from tables anyway, even when they are technically appropriate.
from akephalos.
Related Issues (20)
- encoding problem HOT 1
- Cucumber scenario fails with spork and akephalos HOT 3
- page.evaluate_script('window.history.back()') does nothing
- Spork compatible HOT 18
- No such file or directory - java (Errno::ENOENT) HOT 1
- javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated (NativeException) HOT 3
- Connection refused on AWS works fine locally on osx and Linux HOT 3
- 60 second startup time HOT 1
- Unix Domain Sockets
- com.gargoylesoftware.htmlunit.ScriptException: Unexpected exception occurred while parsing HTML snippet: Property 'http://cyberneko.org/html/properties/balance-tags/fragment-context-stack' is not recognized. HOT 2
- OutOfMemoryError error HOT 1
- Unable to click delete link with confirm prompt HOT 1
- How to replace `switch_to` HOT 2
- java.lang.OutOfMemoryError HOT 5
- POST variables end up as GET variables HOT 2
- random but specific crash HOT 8
- multiple submits to/from same page only submit the first time HOT 5
- Capybara 1.0 compatibility HOT 2
- dom tree leaves end up on the wrong branches HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akephalos.