-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Save_and_open_page / "Show me the page" doesn't include CSS from Rails 3.1 asset pipeline #485
Comments
I believe there is an issue with javascript as well. |
I couldn't get the workaround linked to above to work for me. Also, taking a look at the code in that gist, I didn't like the way it worked; it was copying all CSS assets to the capybara tmp directory, and it wasn't doing anything for javascripts or images. So, I created a patch that adds full asset pipeline support (I think), see #500. |
it makes me cry |
It's really problem. I can't debug tests in my project. |
+1 |
Fix it please... |
+1. It's really needed! |
I'm not the maintainer, but ... If your entire team is needing this fixed, why don't you guys get one of you hacking on the source and see if you can come up with a fix? Even if it's not polished, sending a pull request as a discussion starter might be the best way to move this forward (as Jonas tends to be quite a busy guy). |
I agree with joliss. Also, I wonder if it's "really needed"? To my mind it's a quick visual debugging tool; we're testing dom elements not how they are decorated. E.g. "whoops, forgot to log in". Getting the right styling in the dumped html file seems like a luxury. |
It's absolutely needed - often tests fail and you need to see at a glance On Tue, Nov 1, 2011 at 11:45 AM, Nicholas Rutherford <
|
While I agree that it's easier I don't agree that it's needed, given that this feature hasn't worked for a far greater period of time than it has. The main benefit is being able to see the page, styled or not, and fire up the browser's dom inspector. Still, as mentioned, I'm sure it'd be a welcome patch. |
@joliss, I have a pull request already submitted, see #500. @nruth, I think that it is needed. Capybara comes into play when we're testing content rendered with our views, and at least half the time (for me anyway), it's with js turned on. If I have an action that hides content, and then I have a test that says If my javascript and stylesheets (and images) don't work, then the page often isn't anything near what's actually seen in the app. In other words, |
Related: #609 |
+1 on JangoSteve's comment "save_and_open_page is useless for Rails 3.1 apps using the asset pipeline, which I'm guessing will become more and more relavent as a sizable portion of capybara's users migrate in that direction" I just made the jump from 3.0 to 3.2 and ran into same issue. |
+1 |
As I explained on #609, the asset rewriting has got to go. See my comment there for further explanation why I am closing this. |
I just wanted to say, that if you can't/don't want to specify javascript:(function(){document.getElementsByTagName('link')[0].href='http://localhost:3000/assets/application.css'})(); It's a bit hacky, but you can use it any rails app. |
I worked around it by including the following gist in an initializer, so it only triggers in the cucumber or test environments.
https://gist.github.com/1144277
Is there an easier or more standard way to get the asset pipeline css to show up?
I have Launchy 2.0.5.
Thanks!
The text was updated successfully, but these errors were encountered: