Sha256: 126659d624215fd400701c91a1e859a847712eaa07666c1bb0d9a28d3ff763be

Contents?: true

Size: 1.75 KB

Versions: 5

Compression:

Stored size: 1.75 KB

Contents

@site_title
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 = "/admin"
    """
    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 the site title "My Great Site"

  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 = 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

5 entries across 5 versions & 1 rubygems

Version Path
activeadmin-rb-1.6.0 features/site_title.feature
activeadmin-rb-1.5.2 features/site_title.feature
activeadmin-rb-1.5.1 features/site_title.feature
activeadmin-rb-1.5.0 features/site_title.feature
activeadmin-rb-1.4.0 features/site_title.feature