Sha256: 37833483f917caffaaff282fc2b7cdee886845005ba83e0d47524e3192c98eac

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

# encoding: utf-8
require 'acceptance_helper'

describe 'On the page /custom_filters2 with joined tables and custom filters WiceGrid', type: :feature, js: true do
  before :each do
    visit '/custom_filters2'
  end

  it 'shows all options' do
    expect(page).to have_select('grid_f_priorities_name', options: %w(-- Anecdotic High Low Normal Urgent))
    expect(page).to have_select('grid_f_status_id', options: %w(-- Assigned Cancelled Closed Duplicate New Postponed Resolved Started Verified))
    expect(page).to have_select('grid_f_project_id', options: ['--', 'Divine Firmware', 'Super Game', 'Ultimate Website'])
  end

  it 'allows to filter by custom filters' do
    first(:css, '.expand-multi-select-icon').click

    select('Normal', from: 'grid_f_priorities_name')
    select('Urgent', from: 'grid_f_priorities_name')

    select 'Duplicate', from: 'grid_f_status_id'

    select 'Ultimate Website', from: 'grid_f_project_id'

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

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