I'm running into an issue where the following test case is failing when, based on the documentation for the has and hasNot functions, it should be passing. The following is the test case itself and after is the relevant console log.
> Table
> colindex on tr
> is not added for a non contiguous heading list
▼ Query.fromHtml
<table aria-colcount="5" aria-rowcount="1">
<thead>
<tr>
<th aria-colindex="1">
label
</th>
<th aria-colindex="3">
label
</th>
<th aria-colindex="5">
label
</th>
</tr>
</thead>
<tbody>
<tr aria-rowindex="2">
</tr>
</tbody>
</table>
▼ Query.find [ tag "thead" ]
1) <thead>
<tr>
<th aria-colindex="1">
label
</th>
<th aria-colindex="3">
label
</th>
<th aria-colindex="5">
label
</th>
</tr>
</thead>
▼ Query.find [ tag "tr" ]
1) <tr>
<th aria-colindex="1">
label
</th>
<th aria-colindex="3">
label
</th>
<th aria-colindex="5">
label
</th>
</tr>
▼ Query.hasNot [ attribute "aria-colindex" "1" ]
> has not attribute "aria-colindex" "1"
My thought is that this would pass because the tr tag does not have a aria-colindex attribute. This is a similar case shown in the documentation for the package, but is not executing as expected. After playing with it a bit I figure out that it was due to the fact that there was a child th element that did have a aria-colindex="1" which makes the test fail. The only way I've been able to get around this issue is to modify the table's structure to not include the child th tags, but this is not ideal.
I'm kind of asking 2 questions here which is
Is this functionality expected?
If it is, than how would you recommend testing for an attribute to not be on an element?
I'm running into an issue where the following test case is failing when, based on the documentation for the
has
andhasNot
functions, it should be passing. The following is the test case itself and after is the relevant console log.My thought is that this would pass because the
tr
tag does not have aaria-colindex
attribute. This is a similar case shown in the documentation for the package, but is not executing as expected. After playing with it a bit I figure out that it was due to the fact that there was a childth
element that did have aaria-colindex="1"
which makes the test fail. The only way I've been able to get around this issue is to modify the table's structure to not include the childth
tags, but this is not ideal.I'm kind of asking 2 questions here which is