Cookie Steps

Cookie state assertions. Useful for tracking, consent, and session checks PM and Compliance teams care about.

Step phrasings in this group

The book sidebar lists each individual step page under this group.

Then a cookie with the name "session_id" should exist

Assert that a cookie with the exact name exists in the browser context.

Then a cookie with the name "lang" and the value "en" should exist

Assert that a cookie with the exact name AND exact value exists.

Then a cookie with the name "session_id" and a value containing "abc" should exist

Assert a cookie with the exact name has a value containing a substring.

Then a cookie with a name containing "session" should exist

Assert a cookie whose name contains a substring exists.

Then a cookie with a name containing "session" and the value "active" should exist

Assert a cookie whose name contains a substring has the exact value.

Then a cookie with a name containing "session" and a value containing "active" should exist

Assert a cookie whose name contains substring A has a value containing substring B.

Then a cookie with the name "session_id" should not exist

Assert a cookie with the exact name does NOT exist.

Then a cookie with the name "lang" and the value "fr" should not exist

Assert a cookie with the exact name+value does NOT exist.

Then a cookie with the name "preferences" and a value containing "lightmode" should not exist

Assert a cookie with the exact name does not contain a substring in its value.

Then a cookie with a name containing "old_" should not exist

Assert no cookie name contains a substring.

Then a cookie with a name containing "session" and the value "expired" should not exist

Assert no cookie name+value pair (with partial name) matches.

Then a cookie with a name containing "session" and a value containing "old" should not exist

Assert no cookie partial-name + partial-value pair matches.

Back to all step groups