Skip to content

Commit

Permalink
Site layout to aid navigation. Complete from-homepage site navigation…
Browse files Browse the repository at this point in the history
… scenario
  • Loading branch information
eee-c committed Jun 21, 2009
1 parent 6195de9 commit 62d5dbb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
19 changes: 15 additions & 4 deletions features/step_definitions/site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
end

Then /^the prominently displayed meals should include a thumbnail image$/ do
response.should have_selector("img", :count => 10)
response.should have_selector(".meals img", :count => 10)
end

Then /^the prominently displayed meals should include the recipe titles$/ do
Expand All @@ -106,15 +106,19 @@
click_link "Meal 0"
end

When /^I click the site logo$/ do
click_link "/"
end

Then /^I should see the meal page$/ do
response.should have_selector("h1",
:content => "Meal 0")
end

Then /^the Italian category should be highlighted$/ do
Then /^the (\w+) category should be highlighted$/ do |category|
response.should have_selector("a",
:class => "active",
:content => "Italian")
:content => category)
end

When /^I click on the recipe in the menu$/ do
Expand All @@ -125,14 +129,21 @@
click_link "Italian"
end

When /^I click the recipe link under the 6th meal$/ do
click_link "Recipe for Meal 5"
end

Then /^I should see the recipe page$/ do
response.should have_selector("h1",
:content => "Recipe for Meal 0")
:content => "Recipe for Meal ")
end

Then /^I should see 5 Italian recipes$/ do
# 5 result rows + 1 header row
response.should have_selector("tr",
:count => 6)
end

Then /^I should see the homepage$/ do
response.should have_selector(".meals h2", :count => 10)
end
Binary file added public/images/eee_corner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions views/layout.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
%html
%title= ["EEE Cooks", @title].compact.join(": ")
%body
#header
#eee-header-logo
%a{:href => "/"}
%img{:alt => "Home", :src => "/images/eee_corner.png"}

= yield

#footer

0 comments on commit 62d5dbb

Please sign in to comment.