Sha256: 9ca63fa5ea57ebcf538febd0885ba35a3e32506551f199e453e895cd996a6bc9

Contents?: true

Size: 1.83 KB

Versions: 56

Compression:

Stored size: 1.83 KB

Contents

Feature: Site title

  As a developer
  In order to customize the site title
  I want to set it in the configuration

  Background:
    Given I am logged in

  Scenario: Set the site title and site title link
    Given a configuration of:
    """
      ActiveAdmin.application.site_title = "My Great Site"
      ActiveAdmin.application.site_title_link = "/"
    """
    When I am on the dashboard
    And I should see the site title "My Great Site"
    When I follow "My Great Site"
    Then I should see "Ruby on Rails: Welcome aboard"

  Scenario: Set the site title image
    Given a configuration of:
    """
      ActiveAdmin.application.site_title_image = "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
    """
    When I am on the dashboard
    And I should not see the site title "My Great Site"
    And I should see the site title image "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"

  Scenario: Set the site title image with link
    Given a configuration of:
    """
      ActiveAdmin.application.site_title_link = "http://www.google.com"
      ActiveAdmin.application.site_title_image = "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
    """
    When I am on the dashboard
    And I should see the site title image "http://railscasts.com/assets/episodes/stills/284-active-admin.png?1316476106"
    And I should see the site title image linked to "http://www.google.com"

  Scenario: Set the site title to a proc
    Given a configuration of:
    """
      ActiveAdmin.application.site_title_image = nil # Configuration is not reset between scenarios
      ActiveAdmin.application.site_title = proc { "Hello #{controller.current_admin_user.try(:email) || 'you!'}" }
    """
    When I am on the dashboard
    And I should see the site title "Hello admin@example.com"

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.116 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.114 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.113 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.111 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.109 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.107 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.94 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.92 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.90 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.84 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.80 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.79 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.78 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.77 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.74 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.73 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.72 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.71 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.66 vendor/deps/active_admin/features/site_title.feature
lalala-4.0.0.dev.65 vendor/deps/active_admin/features/site_title.feature