jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

Fix capybara-webkit driver to use synchronize correctly #403

Closed ryanong closed 9 years ago

ryanong commented 9 years ago

apparently you have to raise an error not just return false

mikepack commented 9 years ago

Thanks Ryan. This code makes sense and I understand where you're going with it, but I don't understand the problem. What was your expected behavior and what didn't work correctly? There are no new test cases added, so I'm not sure what problem you're solving.

ryanong commented 9 years ago

Unfortunately the way this is tested ignores the actual capybara webkit code and would be quite difficult to actually do an integration test.

The problem is currently that the test will always return true no matter what because no error is raised. An error needs to be raised if the evaluated script is to be retried again.

mikepack commented 9 years ago

Got it. So, to clarify, you have a test that should fail, but is passing? This test is passing because the evaluation script does not rerun?

mikepack commented 9 years ago

Or, is the result of the test not being captured? It's neither passing nor failing. More like skipped. This is what I'd expect, not that the test actually passes.

ryanong commented 9 years ago

more like skipped. The functionality that would make this fail is stubbed out and would only really fail if we added a 5 second sleep of some sort.

mikepack commented 9 years ago

Thanks Ryan!