Sha256: 078cdc222a3d53b63c9ec740cc5a86b8744f10a270a207a93853c694f9072fbb

Contents?: true

Size: 1 KB

Versions: 7

Compression:

Stored size: 1 KB

Contents

Around '@site_title' do |scenario, block|
  previous_site_title = ActiveAdmin.application.site_title
  previous_site_title_link = ActiveAdmin.application.site_title_link
  previous_site_title_image = ActiveAdmin.application.site_title_image

  begin
    block.call
  ensure
    ActiveAdmin.application.site_title = previous_site_title
    ActiveAdmin.application.site_title_link = previous_site_title_link
    ActiveAdmin.application.site_title_image = previous_site_title_image
  end
end

Then /^I should see the site title "([^"]*)"$/ do |title|
  expect(page).to have_css 'h1#site_title', text: title
end

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

Then /^I should see the site title image "([^"]*)"$/ do |image|
  img = page.find('h1#site_title img')
  expect(img[:src]).to eq(image)
end

Then /^I should see the site title image linked to "([^"]*)"$/ do |url|
  link = page.find('h1#site_title a')
  expect(link[:href]).to eq(url)
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
activeadmin-rails-1.7.1 features/step_definitions/site_title_steps.rb
activeadmin-rails-1.7.0 features/step_definitions/site_title_steps.rb
activeadmin-rb-1.6.0 features/step_definitions/site_title_steps.rb
activeadmin-rb-1.5.2 features/step_definitions/site_title_steps.rb
activeadmin-rb-1.5.1 features/step_definitions/site_title_steps.rb
activeadmin-rb-1.5.0 features/step_definitions/site_title_steps.rb
activeadmin-rb-1.4.0 features/step_definitions/site_title_steps.rb