---
Test
---
By default http test ignores 'Set-Cookie' headers (i.e. cookies received are not sent with subsequent requests).

|script     |http test                        |
|get from   |${URL_THAT_SENDS_COOKIES}        |
|check      |response status|200              |
|show       |response headers                 |
|note       |By default cookies are not stored|
|check      |cookie value   |!-ClientId-!|null|
|$setCookie=|response header|Set-Cookie       |

|script|list fixture                     |
|check |size of |$setCookie|>1           |
|show  |value at|2         |in|$setCookie|

By setting 'store cookies' to 'true' we can ensure cookies are stored, and sent with subsequent requests.

|script           |http test                                               |
|set store cookies|true                                                    |
|get from         |${URL_THAT_SENDS_COOKIES}                               |
|check            |response status|200                                     |
|show             |response headers                                        |
|show             |cookie values                                           |
|check not        |cookie value   |!-ClientId-!|null                       |
|get from         |${URL_THAT_SENDS_COOKIES}                               |
|check            |response status|200                                     |
|show             |response headers                                        |
|show             |cookie values                                           |
|check not        |cookie value   |!-ClientId-!|null                       |
|clear cookies                                                             |
|get from         |${URL_THAT_SENDS_COOKIES}                               |
|check            |response status|200                                     |
|show             |response headers                                        |
|show             |cookie values                                           |
|check not        |cookie         |!-ClientId-!|value    |null             |
|check            |cookie         |!-ClientId-!|domain   |outlook.live.com |
|check            |cookie         |!-ClientId-!|path     |/                |
|ensure           |cookie         |!-ClientId-!|is persistent              |
|ensure           |cookie         |!-ClientId-!|is secure                  |
|reject           |cookie         |!-ClientId-!|is http only               |
|check            |cookie         |!-ClientId-!|attribute|HTTPOnly    |!--!|
|check            |cookie         |!-ClientId-!|attribute|doesNotExist|null|

If we set 'store cookies' to 'false' cookies are no longer stored.

|script                                             |
|set store cookies|false                            |
|get from         |${URL_THAT_SENDS_COOKIES}        |
|check            |response status|200              |
|show             |response headers                 |
|check            |cookie value   |!-ClientId-!|null|

