Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
activeadmin / features / step_definitions / attribute_steps.rb
Size: Mime:
Then /^I should see the attribute "([^"]*)" with "([^"]*)"$/ do |title, value|
  elems = all ".attributes_table th:contains('#{title}') ~ td:contains('#{value}')"
  expect(elems.first).to_not be_nil, 'attribute missing'
end

Then /^I should see the attribute "([^"]*)" with a nicely formatted datetime$/ do |title|
  text = all(".attributes_table th:contains('#{title}') ~ td").first.text
  expect(text).to match /\w+ \d{1,2}, \d{4} \d{2}:\d{2}/
end

Then /^the attribute "([^"]*)" should be empty$/ do |title|
  elems = all ".attributes_table th:contains('#{title}') ~ td > span.empty"
  expect(elems.first).to_not be_nil, 'attribute not empty'
end

Then /^I should not see the attribute "([^"]*)"$/ do |title|
  expect(page).to_not have_css '.attributes_table th', text: title
end