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

20 lines
499 B
Plaintext
Raw Normal View History

LET url = @lab.cdn.static + "/api/ts"
LET page = DOCUMENT(url, {
driver: "cdp",
headers: {
"Access-Control-Allow-Origin": "*",
"X-Request-Id": "foobar"
}
})
LET el = ELEMENT(page, "#headers")
LET actual = JSON_PARSE(el.innerText)
LET expected = {
"Access-Control-Allow-Origin": ["*"],
"X-Request-Id": ["foobar"]
}
RETURN T::EQ({
"Access-Control-Allow-Origin": actual["Access-Control-Allow-Origin"],
"X-Request-Id": actual["X-Request-Id"]
}, expected)