malclocke/fulcrum — pull request #219 by marnen (2014-03-02 19:15:37+00:00)
Title: Show story ID in story edit form and hover

This displays the story ID in the edit form and hover balloon. Note that this pull request currently has a problem: `spec/features/stories_spec.rb:64` passes if run by itself, but fails if any other specs are run with it. I'd appreciate suggestions on how to resolve this, because I've tried everything I can think of. (I suspect that part of the problem is the way Capybara interacts with Firefox, so perhaps I'll try running it headless with capybara-webkit and see if that works.)

This simple addition was surprisingly hard to make. Impediments I noticed:
* It was surprisingly hard to change the HTML in the edit form, because it's all generated programmatically in `story_view.js`. It should probably be rendered in an ERb or EJS template instead, like the hover text.
* Likewise, because the hover text is in an EJS template, I basically needed to make the same change twice in two different ways. I suspect moving the edit form into EJS would help reduce duplication.
* The "feature specs" that we have really aren't feature specs—that is, there's little in the way of automated tests that actually specify the application's UI. I'd like to write some Cucumber stories to fix that.