Top Level Namespace

Defined Under Namespace

Modules: Bard

Instance Method Summary collapse

Instance Method Details

#find_input_tag_field(label) ⇒ Object



76
77
78
# File 'lib/bard/tag_field/cucumber.rb', line 76

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

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



84
85
86
87
88
# File 'lib/bard/tag_field/cucumber.rb', line 84

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



80
81
82
# File 'lib/bard/tag_field/cucumber.rb', line 80

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