I have a Hyperstack component like this:
render do
LI(class: class_names, title: conflicts || '',
data: { toggle: :tooltip, placement: 'auto left', container: :body }) do
DIV(class: 'row paper-row') do
DIV(class: 'col-sm-12 text-left') do
P(class: 'medium-weight', id: 'tp_envelopes') { params.envelope.name }
end
end
end.on(:click) { select_envelope }
end
I want the on(:click) handler to be conditional if the conflicts
method returns a non-nil value.
I also wonder how I can test this in hyperspec/capaybara ... i.e. how do I check to see if an html element responds to a :click event?