1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/e2e/tests/dynamic/doc/wait/no_style_all.fql
Tim Voronov 7eed93721c
Added support of computed styles (#570)
* Added support of computed styles

* Updated style updates

* Fixed linter issues

* Updated styles manipulation in static driver

* Updated e2e tests

* Updated methods

* Updated e2e tests

* Updated README
2020-11-20 20:09:21 -05:00

32 lines
687 B
Plaintext

LET url = @lab.cdn.dynamic + "?redirect=/events"
LET doc = DOCUMENT(url, true)
LET selector = "#wait-class-btn, #wait-class-random-btn"
WAIT_ELEMENT(doc, "#page-events")
LET n = (
FOR el IN ELEMENTS(doc, selector)
ATTR_SET(el, "style", "color: black")
RETURN NONE
)
WAIT_STYLE_ALL(doc, selector, "color", "rgb(0, 0, 0)", 10000)
LET n2 = (
FOR el IN ELEMENTS(doc, selector)
ATTR_SET(el, "style", "color: red")
RETURN NONE
)
WAIT_NO_STYLE_ALL(doc, selector, "color", "rgb(0, 0, 0)", 10000)
LET results = (
FOR el IN ELEMENTS(doc, selector)
RETURN el.style.color
)
T::EQ(results, ["rgb(255, 0, 0)","rgb(255, 0, 0)"])
RETURN NONE