Sha256: 67a41584a9582439d182aba8eed5114e54927883f8497019732a1f49168a0380

Contents?: true

Size: 1.15 KB

Versions: 5

Compression:

Stored size: 1.15 KB

Contents

require 'acceptance_helper'

context 'On the page /two_associations when two associations referring to the same model are joined' do
  describe "with the help of :table_alias WiceGrid", :type => :request, :js => true do
    before :each do
      visit '/two_associations'
    end

    it "allows to filter the two associations independantly" do
      fill_in('grid_f_companies_name', :with => 'MNU')

      find(:css, '#grid_submit_grid_icon').click

      within '.pagination_status' do
        expect(page).to have_content('1-2 / 2')
      end

      fill_in('grid_f_suppliers_projects_name', :with => 'Coders')

      find(:css, '#grid_submit_grid_icon').click

      within '.pagination_status' do
        expect(page).to have_content('1-1 / 1')
      end

      fill_in('grid_f_companies_name', :with => '')

      find(:css, '#grid_submit_grid_icon').click

      within '.pagination_status' do
        expect(page).to have_content('1-2 / 2')
      end

      fill_in('grid_f_companies_name', :with => 'foo')

      find(:css, '#grid_submit_grid_icon').click

      within '.pagination_status' do
        expect(page).to have_content('0')
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
wice_grid-7.1.4 spec/features/two_associations_spec.rb
wice_grid-7.1.3 spec/features/two_associations_spec.rb
wice_grid-7.1.2 spec/features/two_associations_spec.rb
wice_grid-7.1.1 spec/features/two_associations_spec.rb
wice_grid-7.1.0 spec/features/two_associations_spec.rb