Sha256: 64015cf11c21e4fae8ec68a4442d2aa081d32173ed2adbefb01d45539357962a

Contents?: true

Size: 955 Bytes

Versions: 11

Compression:

Stored size: 955 Bytes

Contents

When /^I visit the first profile$/ do
  doc = Nokogiri::HTML(response_body)
  link_text = doc.search('div#profiles ul a').first['href']

  visit(link_text)
end

Then /^I should see a list of graphs$/ do
  doc = Nokogiri::HTML(response_body)
  doc.search('div#profile div.graph').size.should > 0
end

Then /^I should see a list of profiles$/ do
  doc = Nokogiri::HTML(response_body)
  doc.search('div#profiles ul li').size.should > 1
end

Then /^I should see a list of profiles sorted alphabetically$/ do
  doc = Nokogiri::HTML(response_body)
  profiles = doc.search('div#profiles ul li')
  profiles.size.should > 1

  unsorted = profiles.map { |p| p.text.strip }
  sorted = profiles.map { |p| p.text.strip }.sort

  unsorted.should == sorted
end

Then /^I should see a profile heading$/ do
  doc = Nokogiri::HTML(response_body)
  doc.search('div#profile h2#profile_name').size.should == 1
end

Then /^show me the page source$/ do
  puts response_body
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
visage-app-0.9.4 features/step_definitions/site_steps.rb
visage-app-0.9.3 features/step_definitions/site_steps.rb
visage-app-0.9.2 features/step_definitions/site_steps.rb
visage-app-0.9.1 features/step_definitions/site_steps.rb
visage-app-0.9.0.pre2 features/step_definitions/site_steps.rb
visage-app-0.9.0 features/step_definitions/site_steps.rb
visage-app-0.9.0.pre1 features/step_definitions/site_steps.rb
visage-app-0.3.3 features/step_definitions/site_steps.rb
visage-app-0.3.2 features/step_definitions/site_steps.rb
visage-app-0.3.1 features/step_definitions/site_steps.rb
visage-app-0.3.0 features/step_definitions/site_steps.rb