Sha256: 792f46f6191f25fa6f5212811006c0b64d1fb36f88cf319f3033a5eca53fccb6

Contents?: true

Size: 1.28 KB

Versions: 8

Compression:

Stored size: 1.28 KB

Contents

Then /^I should see the scope "([^"]*)"$/ do |name|
  step %{I should see "#{name}" within ".scopes"}
end

Then /^I should not see the scope "([^"]*)"$/ do |name|
  step %{I should not see "#{name}" within ".scopes"}
end

Then /^I should see the scope "([^"]*)" selected$/ do |name|
  step %{I should see "#{name}" within ".scopes .selected"}
end

Then /^I should see the scope "([^"]*)" not selected$/ do |name|
  step %{I should see the scope "#{name}"}
  page.should_not have_css('.scopes .selected', :text => name)
end

Then /^I should see the scope "([^"]*)" with the count (\d+)$/ do |name, count|
  step %{I should see "#{count}" within ".scopes .#{name.gsub(" ", "").underscore.downcase} .count"}
end

Then /^I should see the scope "([^"]*)" with no count$/ do |name|
  page.should have_css(".scopes .#{name.gsub(" ", "").underscore.downcase}")
  page.should_not have_css(".scopes .#{name.gsub(" ", "").underscore.downcase} .count")
end

Then /^I should see (\d+) ([\w]*) in the table$/ do |count, resource_type|
  begin
    page.should have_css("table##{resource_type} tr > td:first", :count => count.to_i)
  rescue
    current_count = 0
    
    all("table##{resource_type} tr > td:first").each { current_count += 1 }

    raise "There were #{current_count} rows in the table not #{count}"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
activeadmin-0.5.1 features/step_definitions/index_scope_steps.rb
activeadmin-0.5.0 features/step_definitions/index_scope_steps.rb
activeadmin-0.5.0.pre1 features/step_definitions/index_scope_steps.rb
activeadmin-0.5.0.pre features/step_definitions/index_scope_steps.rb
activeadmin-0.4.4 features/step_definitions/index_scope_steps.rb
activeadmin-0.4.3 features/step_definitions/index_scope_steps.rb
activeadmin-0.4.2 features/step_definitions/index_scope_steps.rb
activeadmin-0.4.1 features/step_definitions/index_scope_steps.rb