mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
11bf8c365a
* Fixed headers * Added e2e for static pages
20 lines
492 B
Plaintext
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"]
|
|
}) |