Row selectors ignore the value of the first header
jparr opened this issue · comments
Meta
Capybara Version: 3.40.0
Expected Behavior
have_table('Caption', with_rows: [{'this does not matter' => 'cell value'}]
should only match when the header matches the key passed.
have_selector(:table_row, 'this does not matter' => 'Thomas')
should only match when the header matches the key passed.
Actual Behavior
both selectors ignore the text of the header when it is in the first column
Steps to reproduce
I wrote some tests here: jparr@03e2f75
Both matchers do some previous sibling counting to verify the position of the header and cell which resolve to zero for the first column when there is a match and zero when there is no match.