-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Hello, I'm seeing the following error in a test:
▼ Query.findAll [ tag "svg" ]
1) <svg class="some-class-type-1 some-class-icon v-align-middle" height="20" width="20">
<circle cx="10" cy="10" fill="#fb8532" r="9" shape-rendering="geometricPrecision" stroke="black" stroke-width="0.5">
</circle>
</svg>
2) <svg class="some-class-type-2 some-class-icon v-align-middle" height="20" width="20">
<circle cx="10" cy="10" fill="#f66a0a" r="9" shape-rendering="geometricPrecision" stroke="black" stroke-width="0.5">
</circle>
</svg>
3) <svg class="some-class-type-0 some-class-icon v-align-middle" height="20" width="20">
<circle cx="10" cy="10" fill="#ffdf5d" r="9" shape-rendering="geometricPrecision" stroke="black" stroke-width="0.5">
</circle>
</svg>
▼ Query.index 0
1) <svg class="some-class-type-1 some-class-icon v-align-middle" height="20" width="20">
<circle cx="10" cy="10" fill="#fb8532" r="9" shape-rendering="geometricPrecision" stroke="black" stroke-width="0.5">
</circle>
</svg>
▼ Query.has [ class "some-class-type-1" ]
✗ has class "some-class-type-1"
as you can see Query.index 0 finds an svg with some-class-type-1, and I use a Query.has [ class "some-class-type-1" ]. However, it reports as not having that class some-class-type-1. AFAIK, this is a bug because Query.has is supposed to return a successful expectation if the Selector clauses given to it are true, which they seem to be in this case.
I'm providing the test code below:
model
|> view
|> Query.fromHtml
|> Query.findAll [ Selector.class "row" ]
|> Query.keep (Selector.tag "svg")
|> Expect.all
[ Query.index 0
>> Query.has [ Selector.class "some-class-type-1" ]
, Query.index 1
>> Query.has [ Selector.class "some-class-type-2"]
, Query.index 2
>> Query.has [ Selector.class "some-class-type-0"]
]
If there's any further information I can give please do tell.
Thank you
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels