This repository has been archived by the owner on Jul 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 349
Show story ID in story edit form and hover #219
Open
marnen
wants to merge
12
commits into
fulcrum-agile:master
Choose a base branch
from
marnen:show-story-id
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f2c6ec2
Merge remote-tracking branch 'origin/master'
marnen 916864e
Add ID to expanded story display. [#204]
marnen 0fbb119
Don't show ID for new, unsaved story. [#204]
marnen 3936624
All these specs use project, so let's just put it in a let! block. [#…
marnen a0cc566
Actually, we don't even need the let!, since we're always calling pro…
marnen 3f019c1
Remove whitespace, minor cleanup. [#204]
marnen 7614648
We don't need a let block for a single spec.
marnen 2d673f3
Add ID to hover balloon. [#204]
marnen 698f9a0
Use 'do' syntax for multiline block.
marnen 0087e1e
Use I18n. [#204]
marnen 406fc1e
Add missing end tag. [#204]
marnen 413b914
Clean up a bit. [#204][#219]
marnen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,22 @@ | ||
require 'spec_helper' | ||
|
||
describe "Stories" do | ||
|
||
before(:each) do | ||
sign_in user | ||
end | ||
|
||
let(:user) { | ||
let(:user) do | ||
FactoryGirl.create :user, :email => '[email protected]', | ||
:password => 'password' | ||
} | ||
end | ||
|
||
let(:project) do | ||
FactoryGirl.create :project, :name => 'Test Project', | ||
:users => [user] | ||
end | ||
|
||
describe "full story life cycle" do | ||
|
||
before do | ||
project | ||
end | ||
before(:each) do | ||
sign_in user | ||
end | ||
|
||
it "steps through the full story life cycle", :js => true do | ||
describe "full story life cycle" do | ||
it "steps through the full story life cycle", js: true do | ||
visit project_path(project) | ||
|
||
click_on 'Add story' | ||
|
@@ -45,23 +39,45 @@ | |
end | ||
|
||
find('#in_progress .story.accepted .story-title').should have_content('New story') | ||
|
||
end | ||
|
||
end | ||
|
||
describe "delete a story" do | ||
describe 'ID display', js: true do | ||
context 'saved story' do | ||
let!(:story) { FactoryGirl.create :story, project: project, title: 'My Fantastic Story', requested_by: user } | ||
let(:story_div) { "#story-#{story.id}" } | ||
|
||
let(:story) { | ||
FactoryGirl.create(:story, :title => 'Delete Me', :project => project, | ||
:requested_by => user) | ||
} | ||
before(:each) { visit project_path project } | ||
|
||
before do | ||
story | ||
it 'shows the story ID in the expanded tile' do | ||
within(story_div) do | ||
find('*', text: story.title).click | ||
page.should have_selector('.story-id', text: "ID: #{story.id}") | ||
end | ||
end | ||
|
||
it 'shows the story ID in the hover balloon' do | ||
find(story_div).find('.popover-activate').hover | ||
page.should have_selector('.popover .content', text: "ID: #{story.id}") | ||
end | ||
end | ||
|
||
context 'unsaved story', js: true do | ||
it 'does not show the story id in the expanded tile' do | ||
visit project_path project | ||
click_on 'Add story' | ||
within '.story.editing' do | ||
page.should_not have_text 'ID:' | ||
end | ||
end | ||
end | ||
end | ||
|
||
describe "delete a story" do | ||
it "deletes the story", :js => true do | ||
story = FactoryGirl.create(:story, :title => 'Delete Me', :project => project, | ||
:requested_by => user) | ||
|
||
visit project_path(project) | ||
|
||
within(story_selector(story)) do | ||
|
@@ -71,17 +87,11 @@ | |
|
||
page.should_not have_css(story_selector(story)) | ||
end | ||
|
||
end | ||
|
||
describe "show and hide columns" do | ||
|
||
before do | ||
project | ||
Capybara.ignore_hidden_elements = true | ||
end | ||
|
||
it "hides and shows the columns", :js => true do | ||
Capybara.ignore_hidden_elements = true | ||
|
||
visit project_path(project) | ||
|
||
|
@@ -113,13 +123,11 @@ | |
click_link 'Close' | ||
end | ||
page.should_not have_css(selector) | ||
|
||
end | ||
end | ||
end | ||
|
||
def story_selector(story) | ||
"#story-#{story.id}" | ||
end | ||
|
||
end |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marnen suggest to use
#
instead ofID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been ages since I did this, but I assume I did this because I was basically copying Pivotal Tracker's terminology. Also, "ID" can stand alone as a word, whereas "#" can't. Looking at the UI again, though, perhaps "#6" would work well.