1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/e2e/tests/doc_wait_attr_d.fql

18 lines
493 B
Plaintext
Raw Normal View History

LET url = @dynamic + "?redirect=/events"
LET doc = DOCUMENT(url, true)
LET selector = "#wait-class-btn"
LET attrName = "data-ferret-x"
LET attrVal = "foobar"
WAIT_ELEMENT(doc, "#page-events")
LET el = ELEMENT(doc, selector)
LET prev = el.attributes
ATTR_SET(el, attrName, attrVal)
WAIT_ATTR(doc, selector, attrName, attrVal, 30000)
//WAIT_ATTR(el, attrName, attrVal)
LET curr = el.attributes
RETURN prev[attrName] == NONE && curr[attrName] == attrVal ? "" : "attributes should be updated"