In Cypress, set a token in localStorage before test

后端 未结 5 2062
滥情空心
滥情空心 2021-01-31 15:35

I want to login and set a localStorage token on the client (specifically jwt)

How can I accomplish this using cy.request, as suggested in the C

5条回答
  •  灰色年华
    2021-01-31 16:14

    I have spent so many hours on this and finally I can safely conclude that it will never work for OAuth requests.

    It may work for local server but not when you getting token for authentication.

提交回复
热议问题