title: Adding Cookies in Protractor for testing AngularJS
body: <p>I'm having trouble doing a very simple adding &amp; getting cookie test in Protractor for Angularjs. This is the test block:</p>
  
  <pre><code>describe("Homepage", function () {
      var ptor;
  
      beforeEach(function () {
          ptor = protractor.getInstance();
          browser.get('/');
          ptor.manage().addCookie("test", "testValue");
      });
  
  
      it('should have cookie with name test and value textValue', function () {
          ptor.manage().getCookie("test").then(function(data){
              expect(data.value).toBe("testValue");
          });
  
      });
  });
  </code></pre>
  
  <p>This test fails and says data is null. If I print <code>getCookies()</code> it'll print all the cookies but the test cookie will not be in there. Would really appreciate some help on this! Thanks!</p>