Sha256: a7f1b18972b796d167713f8e397438dce06875d196afeb3497d7ff6fb5fbde27
Contents?: true
Size: 820 Bytes
Versions: 7
Compression:
Stored size: 820 Bytes
Contents
Given /^catalogues tree exists:$/ do |table| @tree = table.hashes @tree.each do |attrs| parent = Catalogue.where(name: attrs['parent_name']).first FactoryGirl.create(:catalogue, name: attrs['title'], parent: parent) end end Then /^I should see \w+ tree$/ do within 'ol.sortable_tree' do @tree.each do |attrs| page.should have_link(attrs['title']) if attrs['parent_name'].present? find_link(attrs['title']).first(:xpath, './/../../../../div/a', text: attrs['parent_name']).should_not be_nil end end end end # buggy drug & drop in selenium When /^I drag "(.*?)" to "(.*?)"$/ do |node_name, parent_name| node = first(:xpath, "//a[contains(., '#{node_name}')]/../i") parent = first(:xpath, "//a[contains(., '#{parent_name}')]/../../ol") node.drag_to(parent) end
Version data entries
7 entries across 7 versions & 1 rubygems