title: setLocalStorage is not working on cypress test
body: <p>I have a problem with token.</p>
  <p>I have loginCommand.</p>
  <pre><code>Cypress.Commands.add('login', (user, password) =&gt; {
    cy.request('POST', `${Cypress.env('API')}/auth/login`, {
      email: Cypress.env(user),
      password: Cypress.env(password),
    })
      .its('body')
      .then(res =&gt; {
        cy.log('res:', res);
        cy.setLocalStorage('token', res.token);
      });
  });
  </code></pre>
  <p>I am trying to add new offer. And this is the test case.</p>
  <pre><code>it('can create an projectOffer C232 C233 C234 C235 C236', () =&gt; {
    //cy.seed(token);
    cy.fixture('offerA').as('offerA');
    cy.login('testEmail', 'testPwd');
    cy.visit(base);
    const customerRef = `create offer test ${new Date().toISOString()}`;
    cy.fixture('offerA').then(offerA =&gt; {
      cy.createOffer(offerA, customerRef);
    });
  });
  </code></pre>
  <p>and also this is the related part of my code.</p>
  <pre><code>Cypress.Commands.add('createOffer', (offer, offerName) =&gt; {
    cy.get('[data-testid=app-toolbar-item]').click();
  </code></pre>
  <p>The error is</p>
  <blockquote>
  <p>[data-testid=app-toolbar-item], but never found it.</p>
  </blockquote>
  <p>In the application tab I see that my token is not there</p>
  <p>What can I do for fixing this?</p>