github.com/MontFerret/ferret@v0.18.0/e2e/tests/static/doc/cookies/override_default.fqlx (about)

     1  LET url = @lab.cdn.static + "/api/ts"
     2  LET page = DOCUMENT(url, {
     3      driver: "http_cookies",
     4      cookies: [
     5          {
     6              name: "Single_cookie",
     7              value: "Foo"
     8          },
     9          {
    10              name: "Multi_set_cookie",
    11              value: "Bar"
    12          }
    13      ]
    14  })
    15  
    16  LET el = ELEMENT(page, "#cookies")
    17  LET actual = (
    18      FOR c IN JSON_PARSE(el.innerText)
    19          SORT c.Name
    20          RETURN c
    21  )
    22  
    23  LET expected = {
    24      "Single_cookie": "Foo",
    25      "Multi_set_cookie": "Bar",
    26  }
    27  
    28  RETURN T::EQ({
    29      "Single_cookie": actual[1].Value,
    30      "Multi_set_cookie": actual[0].Value,
    31  }, expected)