Sha256: b7a8be4c16ec4ff606ae2ed1b51b85981b951f4d41627fbc4434829dfc72f118

Contents?: true

Size: 1.14 KB

Versions: 24

Compression:

Stored size: 1.14 KB

Contents

module CharacterSearchTest
 
  def search(factory_name, list_of_modules)
    test 'Search Item' do
      create_n_objects(3, factory_name)
      visit('/admin')
      wait_for_ajax
      # Select Module
      select_last_module_from_list(list_of_modules)
      wait_for_ajax
      find('div.search a.icon').click
      find('div.search input').set("#{@instances_of_class[0].title}\n")
      wait_for_ajax
      n = 1
      2.times do 
        assert_not page.has_content?(@instances_of_class[n].title)
        n += 1
      end
      assert page.has_content?(@instances_of_class[0].title)
    end
  end


  def search_and_close(factory_name, class_name, list_of_modules)
    test 'Search Item and Cancel (checking button "Cancel")' do
      create_n_objects(3, factory_name)
      visit('/admin')
      wait_for_ajax
      # Select Module
      select_last_module_from_list(list_of_modules)
      find('div.search a.icon').click
      find('div.search input').set("#{@instances_of_class[0].title}\n")
      wait_for_ajax
      find_link('Cancel').click
      class_name.each do |instance|
      assert page.has_content?(instance.title)
      end
    end
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
chr-0.5.8 test/support/chr/list_search.rb
chr-0.5.7 test/support/chr/list_search.rb
chr-0.5.6 test/support/chr/list_search.rb
chr-0.5.5 test/support/chr/list_search.rb
chr-0.5.4 test/support/chr/list_search.rb
chr-0.5.3 test/support/chr/list_search.rb
chr-0.5.1 test/support/chr/list_search.rb
chr-0.5.0 test/support/chr/list_search.rb
chr-0.4.25 test/support/chr/list_search.rb
chr-0.4.24 test/support/chr/list_search.rb
chr-0.4.23 test/support/chr/list_search.rb
chr-0.4.22 test/support/chr/list_search.rb
chr-0.4.21 test/support/chr/list_search.rb
chr-0.4.20 test/support/chr/list_search.rb
chr-0.4.19 test/support/chr/list_search.rb
chr-0.4.18 test/support/chr/list_search.rb
chr-0.4.17 test/support/chr/list_search.rb
chr-0.4.15 test/support/chr/list_search.rb
chr-0.4.14 test/support/chr/list_search.rb
chr-0.4.13 test/support/chr/list_search.rb