1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/e2e/tests/dynamic/doc/headers/set.fql
Tim Voronov 11bf8c365a
Fixed headers (#348)
* Fixed headers

* Added e2e for static pages
2019-08-04 17:25:47 -04:00

20 lines
492 B
Plaintext

LET url = @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 EXPECT(expected, {
"Access-Control-Allow-Origin": actual["Access-Control-Allow-Origin"],
"X-Request-Id": actual["X-Request-Id"]
})