1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/e2e/tests/dynamic/element/siblings/prev.fql
Tim Voronov 01088247e2
Added support of Element.nextElementSibling and Element.previousEleme… (#569)
* Added support of Element.nextElementSibling and Element.previousElementSibling

* Fixed linting issues

* Removed reedundant logger use
2020-11-13 21:48:00 -05:00

12 lines
349 B
Plaintext

LET doc = DOCUMENT(@lab.cdn.dynamic + "/#/lists", { driver:"cdp" })
LET current = ELEMENT(doc, '[data-index="1"]')
T::NOT::NONE(current)
LET prev = current.previousElementSibling
T::NOT::NONE(prev)
LET currentIdx = TO_INT(current.attributes['data-index'])
LET prevIdx = TO_INT(prev.attributes['data-index'])
T::LT(prevIdx, currentIdx)
RETURN NONE