Skip to content

Commit

Permalink
Fixing failing specs (specially feature specs for removing the projec…
Browse files Browse the repository at this point in the history
…t title)
  • Loading branch information
akitaonrails committed Aug 26, 2016
1 parent 06cf548 commit e7876a5
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 13 deletions.
8 changes: 4 additions & 4 deletions app/assets/javascripts/templates/story.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div class="state-actions estimates">
<form>
<% _.each(story.point_values(), function(value) { %>
<span class="estimate input" data-value="<%= value %>">
<% if (value == 0) { %>[]<% } else { %>
<% if (value > 0) { %>
<span class="estimate input" data-value="<%= value %>" id="estimate-<%= value %>">
<%= Array(value + 1).join("|") %>
<% } %>
</span>
</span>
<% } %>
<% }); %>
</form>
</div>
Expand Down
13 changes: 12 additions & 1 deletion app/assets/javascripts/templates/story_hover.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<div class="small">
<span class="icons">
<span class="icon icons-<%= story.get('story_type') %>"></span>
<% if (story.get('story_type') == 'feature') { %>
<span class="fa-icon-overlay">
<i class="fa fa-star"></i>
<i class="fa fa-star-o"></i>
</span>
<% } %>
<% if (story.get('story_type') == 'chore') { %>
<i class="fa fa-cog"></i>
<% } %>
<% if (story.get('story_type') == 'bug') { %>
<i class="fa fa-bug"></i>
<% } %>
<span class="text"><%= story.get('story_type') %></span>
<% if (story.get('estimated')) { %>
<span class="estimate estimate_<%= story.get('estimate') %>"><%= story.get('estimate') %></span>
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<ul class="nav navbar-nav navbar-left">
<li>
<%= link_to t('fulcrum'), root_path %>
<%= link_to t('fulcrum'), root_path %>
</li>
</ul>

Expand Down
2 changes: 1 addition & 1 deletion spec/features/logins_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
click_button 'Sign in'

expect(page).to have_selector('#title_bar', :text => 'New Project')
expect(page).to have_selector('#primary-nav', :text => '[email protected]')
expect(page).to have_selector('.navbar-right', :text => 'User 89')
end

end
Expand Down
3 changes: 0 additions & 3 deletions spec/features/projects_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
click_on 'Test Project'
end

expect(page).to have_selector('h1', :text => 'Test Project')
expect(page).not_to have_selector('h1', :text => 'Archived Project')
end

Expand All @@ -45,7 +44,6 @@
fill_in 'Name', :with => 'New Project'
click_on 'Create Project'

expect(page).to have_selector('h1', :text => 'New Project')
expect(current_path).to eq(project_path(Project.find_by_name('New Project')))
end

Expand All @@ -71,7 +69,6 @@
fill_in 'Name', :with => 'New Project Name'
click_on 'Update Project'

expect(page).to have_selector('h1', :text => 'New Project Name')
expect(current_path).to eq(project_path(project))
end

Expand Down
2 changes: 1 addition & 1 deletion spec/features/stories_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# Estimate the story
within('#chilly_bin .story') do
click_on '1'
find('#estimate-1').trigger 'click'
click_on 'start'
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe("Fulcrum.ColumnVisibilityButtonView", function() {
});

it("should set its class from the ColumnView id", function() {
expect(this.view.render().$el.attr('class')).toEqual('hide_' + this.columnView.id);
expect(this.view.render().$el.attr('class')).toEqual('hide_' + this.columnView.id + " btn btn-default");
});

describe('toggle', function() {
Expand Down
2 changes: 1 addition & 1 deletion spec/javascripts/views/story_view_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ describe('Fulcrum.StoryView', function() {
]
);

var ev = { target: { value : '1' } };
var ev = { target: { attributes : { 'data-value' : { value : 1 } } } };
this.view.estimate(ev);

expect(this.view.saveInProgress).toBeTruthy();
Expand Down

0 comments on commit e7876a5

Please sign in to comment.