mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
31 lines
587 B
Plaintext
31 lines
587 B
Plaintext
|
LET url = @static + "/api/ts"
|
||
|
LET page = DOCUMENT(url, {
|
||
|
driver: "cdp_cookies",
|
||
|
cookies: [
|
||
|
{
|
||
|
name: "Single_cookie",
|
||
|
value: "Foo"
|
||
|
},
|
||
|
{
|
||
|
name: "Multi_set_cookie",
|
||
|
value: "Bar"
|
||
|
}
|
||
|
]
|
||
|
})
|
||
|
|
||
|
LET el = ELEMENT(page, "#cookies")
|
||
|
LET actual = (
|
||
|
FOR c IN JSON_PARSE(el.innerText)
|
||
|
SORT c.Name
|
||
|
RETURN c
|
||
|
)
|
||
|
|
||
|
LET expected = {
|
||
|
"Single_cookie": "Foo",
|
||
|
"Multi_set_cookie": "Bar",
|
||
|
}
|
||
|
|
||
|
RETURN EXPECT(expected, {
|
||
|
"Single_cookie": actual[1].Value,
|
||
|
"Multi_set_cookie": actual[0].Value,
|
||
|
})
|