Sha256: 5b8b62ebbda6bd0c9748f5963654103b95110692a37ce46951168f2e5b8b2c5b

Contents?: true

Size: 1.28 KB

Versions: 12

Compression:

Stored size: 1.28 KB

Contents

# encoding: utf-8
require 'acceptance_helper'

describe 'custom_ordering with Procs WiceGrid', type: :request, js: true do
  context 'with no special param' do
    before :each do
      visit '/custom_ordering_with_proc'
    end

    it 'should be sorted alphabetically' do
      within 'div#grid.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
        expect(page).to have_content('Assigned')
      end

      within 'div#grid.wice-grid-container table.wice-grid thead' do
        click_on 'Status Name'
      end

      within 'div#grid.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
        expect(page).to have_content('Verified')
      end
    end
  end

  context 'with the sort by length param' do
    before :each do
      visit '/custom_ordering_with_proc?sort_by_length=1'
    end

    it 'should be sorted by length' do
      within 'div#grid.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
        expect(page).to have_content('New')
      end

      within 'div#grid.wice-grid-container table.wice-grid thead' do
        click_on 'Status Name'
      end

      within 'div#grid.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
        expect(page).to have_content('Duplicate')
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
wice_grid-6.1.3 spec/features/custom_ordering_with_proc_request_spec.rb
wice_grid-6.1.2 spec/features/custom_ordering_with_proc_request_spec.rb
wice_grid-6.1.1 spec/features/custom_ordering_with_proc_request_spec.rb
wice_grid-6.1.0 spec/features/custom_ordering_with_proc_request_spec.rb
pwice_grid-7.0.0 spec/features/custom_ordering_with_proc_request_spec.rb
pwice_grid-6.1.2 spec/features/custom_ordering_with_proc_request_spec.rb
pwice_grid-6.1.1 spec/features/custom_ordering_with_proc_request_spec.rb
pwice_grid-6.1.0 spec/features/custom_ordering_with_proc_request_spec.rb
pwice_grid-5.0.2 spec/features/custom_ordering_with_proc_request_spec.rb
pwice_grid-5.0.1 spec/features/custom_ordering_with_proc_request_spec.rb
pwice_grid-5.0.0 spec/features/custom_ordering_with_proc_request_spec.rb
wice_grid-4.1.0 spec/features/custom_ordering_with_proc_request_spec.rb