Sha256: c9a595780499ebcaffcd100b3d56d37d05854ba9a2053092a60679c68061900b

Contents?: true

Size: 927 Bytes

Versions: 53

Compression:

Stored size: 927 Bytes

Contents

Feature: Index Scope To

  Viewing resource configs scoped to another object

  Background:
	Given 10 posts exist
	And a post with the title "Hello World" written by "John Doe" exists
	And a published post with the title "Hello World" written by "John Doe" exists
	Given an index configuration of:
	  """
	  ActiveAdmin.register Post do
		# Scope section to a specific author
		scope_to do
		  User.find_by_first_name_and_last_name("John", "Doe")
		end

		# Setup some scopes
        scope :all, :default => true
        scope :published do |posts|
          posts.where("published_at IS NOT NULL")
        end
	  end
	  """

  Scenario: Viewing the default scope counts
	When I am on the index page for posts
    Then I should see the scope "All" selected
    And I should see the scope "All" with the count 2
    And I should see 2 posts in the table

    When I follow "Published"
    Then I should see 1 posts in the table

Version data entries

53 entries across 53 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.136 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.135 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.134 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.133 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.132 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.131 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.129 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.128 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.126 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.125 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.124 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.123 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.118 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.116 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.114 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.113 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.111 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.109 vendor/deps/active_admin/features/index/index_scope_to.feature
lalala-4.0.0.dev.107 vendor/deps/active_admin/features/index/index_scope_to.feature