Top Level Namespace

Defined Under Namespace

Modules: Bard

Instance Method Summary collapse

Instance Method Details

#find_input_tag_field(label) ⇒ Object



65
66
67
# File 'lib/bard/tag_field/cucumber.rb', line 65

def find_input_tag_field(label)
  find("##{find("label", text: label)[:for]}")
end

#input_tag_field(actual, root, label: "Labels") ⇒ Object



73
74
75
76
77
# File 'lib/bard/tag_field/cucumber.rb', line 73

def input_tag_field actual, root, label: "Labels"
  index = actual.index { |row| row.first == "Description" }
  tags = input_tag_value(find_input_tag_field(label))
  actual.insert index, [label, tags.join(", ")]
end

#input_tag_value(field) ⇒ Object



69
70
71
# File 'lib/bard/tag_field/cucumber.rb', line 69

def input_tag_value(field)
  field.all("tag-option").map(&:text)
end