Work with Document Cookies in Tests with Puppeteer

Share this video with your friends

Send Tweet

In this lesson we are going to test that a cookie is saved to the document whenever our login form is submitted. Then we will also learn how to set cookies from within our tests.

Viktor Soroka
Viktor Soroka
~ 6 years ago

Nice course. One thing I personally did not like is that test at the end of the video is not quite reasonable. Yes, the 'JWT' cookie was set, but if later the check for that cookie will be removed in the source code the test does not react on it in any way. And it is up to the developer to remember and to delete that cookie set in the test code. I this case another test should be written to prove that behaiour I think.