blob: 490016bf6dd506dbe715cfa9a9c9b0eac0cec1c2 [file] [log] [blame]
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03001declare namespace Cypress {
2 interface Chainable {
3 setReduxState : typeof setReduxState;
4 }
5}
6
7/**********************************
8 Type to input with id some text
9 *********************************/
10function setReduxState(state?: string) : void {
11 cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/basicRedux.json').then((res) => {
12 cy.window().then((win) => {
13 win.sessionStorage.setItem('reduxState', JSON.stringify(state ? state : res));
14 });
15 });
16}
17
18
19
20Cypress.Commands.add('setReduxState', setReduxState);
21