Sha256: 4bf3a7d0abdfecf1d1269ed2c2e4f1e0408f025f71d91f400936b7f6486dac28

Contents?: true

Size: 887 Bytes

Versions: 18

Compression:

Stored size: 887 Bytes

Contents

require 'spec_helper'

RSpec.feature "Multi select", type: :feature do
  scenario "Selecting all", js: true do
    Employee.create name: 'E1', section: 'ABC', admin: true, vegan: false
    Employee.create name: 'E2', section: 'QNP', admin: false, vegan: false
    visit employees_path
    find('.selection-toggle-all').click
    find('.actions-button').click

    page.should have_selector ".optional-input-activator-container.section.inactive"
    page.should_not have_selector ".optional-attribute-container.section" # hidden
    page.should have_selector ".optional-attribute-container.admin.inactive"
    page.should have_selector ".optional-attribute-container.vegan.active"

    # Activate admin, and see that they all become false
    find('.admin .optional-boolean-activator-toggle').click
    find('[name="commit"]').click

    Employee.pluck(:admin).should be_none

  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
record_collection-0.10.4 spec/features/multi_select_spec.rb
record_collection-0.10.3 spec/features/multi_select_spec.rb
record_collection-0.10.2 spec/features/multi_select_spec.rb
record_collection-0.10.1 spec/features/multi_select_spec.rb
record_collection-0.10.0 spec/features/multi_select_spec.rb
record_collection-0.9.2 spec/features/multi_select_spec.rb
record_collection-0.9.1 spec/features/multi_select_spec.rb
record_collection-0.9.0 spec/features/multi_select_spec.rb
record_collection-0.8.3 spec/features/multi_select_spec.rb
record_collection-0.8.2 spec/features/multi_select_spec.rb
record_collection-0.8.1 spec/features/multi_select_spec.rb
record_collection-0.7.5 spec/features/multi_select_spec.rb
record_collection-0.7.4 spec/features/multi_select_spec.rb
record_collection-0.7.3 spec/features/multi_select_spec.rb
record_collection-0.7.2 spec/features/multi_select_spec.rb
record_collection-0.7.1 spec/features/multi_select_spec.rb
record_collection-0.7.0 spec/features/multi_select_spec.rb
record_collection-0.6.1 spec/features/multi_select_spec.rb