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