These are chat archives for dareid/chakram

22nd
Jan 2016
Kayode Atobatele
@atobatele
Jan 22 2016 02:56
I am trying to pass the cookie I received from an earlier post to a get method. Somehow it is not working. Is there an example anywhere that will 1. Login 2. use the returned cookie to access other pages in the same domain.
Daniel Reid
@dareid
Jan 22 2016 08:50
@atobatele There are some cookie tests available at https://github.com/dareid/chakram/blob/master/test/assertions/cookie.js. Let me know if they do not help.
@Shplorf I will think about this further, but maybe a promise in the describe scope, which stores the result of the previous it? Ideally though, the tests should not rely on any other tests. So ideally in each test case the whole test should be performed, if there are multiple variations, each should be tested from scratch.
Kayode Atobatele
@atobatele
Jan 22 2016 21:43
@dareid The cookie examples is not exactly my solution. I am looking for an example where there is a login with credentials, i.e. username and password and then afterwards visiting a page on the site
I am able to get a 200 statusCode for the login when I do a post but then I am not able to successfully pass the sessionid back to the GET for moving to a different page after login
Daniel Reid
@dareid
Jan 22 2016 21:48
Would u be able to share some code snippets showing ur calls?