Skip to content

Commit

Permalink
indicates building? on homepage [integrity#24 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
sr committed Sep 20, 2008
1 parent 8541813 commit ca560b1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Binary file added lib/integrity/ui/public/spinner.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/integrity/ui/views/home.haml
Expand Up @@ -8,7 +8,7 @@
- else
%ul#projects
- @projects.each do |project|
%li{ :class => cycle("even", "odd") }
%li{ :class => cycle("even", "odd") + (project.building? ? ' building' : '') }
%a{ :href => project_url(project) }&= project.name
%p#new
%a{ :href => "/new" } Add a new project
5 changes: 4 additions & 1 deletion lib/integrity/ui/views/integrity.sass
Expand Up @@ -200,12 +200,15 @@ a
:border-bottom = 1px solid !rule_color
&.odd
:background = !content_bg - #080808
&.building
:background transparent url(/spinner.gif) no-repeat scroll right
a
:font-size 2em
:padding .25em
:line-height 1.2
:font-weight bold
:display block


#previous_builds
li
Expand Down Expand Up @@ -325,4 +328,4 @@ a
:color #666
:text-align right
strong
:font-weight bold
:font-weight bold
9 changes: 7 additions & 2 deletions spec/ui_spec.rb
Expand Up @@ -82,8 +82,8 @@ def provide_valid_credentials!

describe "with available projects" do
before do
@project_1 = stub("project", :name => "The 1st Project", :permalink => "the-1st-project")
@project_2 = stub("project", :name => "The 2nd Project", :permalink => "the-2nd-project")
@project_1 = stub("project", :name => "The 1st Project", :permalink => "the-1st-project", :building? => true)
@project_2 = stub("project", :name => "The 2nd Project", :permalink => "the-2nd-project", :building? => false)
Project.stub!(:all).and_return([@project_1, @project_2])
end

Expand All @@ -110,6 +110,11 @@ def provide_valid_credentials!
end
end

it 'should mark projects being built as such' do
get_it '/'
body.should have_tag('#projects li[@class~="building"]', :count => 1)
end

it "should have a link to add a new project" do
get_it "/"
body.should have_tag("#new a[@href=/new]", /add a new project/i)
Expand Down

0 comments on commit ca560b1

Please sign in to comment.