thankful-pizza-16453
03/24/2023, 5:36 PMenough-truck-68085
03/24/2023, 6:25 PMcy.session in a custom login command if you haven't already.
Then create some helpers that make your API calls to setup the state of your application using cy.request.
That way when you visit the application you are in the state you need to be in.
I drafted some pseudo code of maybe what this would look like for you but it's just one interpretation.
I'd be happy to discuss further if you have other questions.enough-truck-68085
03/24/2023, 6:26 PMthankful-pizza-16453
03/25/2023, 4:58 PMthankful-pizza-16453
03/25/2023, 6:08 PMenough-truck-68085
03/25/2023, 10:57 PMdispatchOnboardingInfo or whatever.
You are more than welcome to use it if it helps. Does that answer your question?
```
* Action that dispatches redux actions to the redux store
* @param {Object} action redux store action
*/
Cypress.Commands.add('dispatch', (action) => {
Cypress.log({
name: 'dispatchReduxAction',
});
cy.window().its('store').invoke('dispatch', action);
});