When writing UI tests its often useful to reset the browser to a clean state.
Cypress has commands for clearing cookies cy.clearCookies(), and also resetting local storage, cy.clearLocalStorage().
However there isn't a command for clearing session storage. Add a custom cypress command more info.
Add to cypress/support/commands.js (or .ts if typescript)
Then in cypress/support/index.js (or .ts if typescript)
Then our final finished function is