summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/application/application.session.actions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/support/application/application.session.actions.ts')
-rw-r--r--vid-webpack-master/cypress/support/application/application.session.actions.ts21
1 files changed, 21 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/support/application/application.session.actions.ts b/vid-webpack-master/cypress/support/application/application.session.actions.ts
new file mode 100644
index 00000000..490016bf
--- /dev/null
+++ b/vid-webpack-master/cypress/support/application/application.session.actions.ts
@@ -0,0 +1,21 @@
+declare namespace Cypress {
+ interface Chainable {
+ setReduxState : typeof setReduxState;
+ }
+}
+
+/**********************************
+ Type to input with id some text
+ *********************************/
+function setReduxState(state?: string) : void {
+ cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/basicRedux.json').then((res) => {
+ cy.window().then((win) => {
+ win.sessionStorage.setItem('reduxState', JSON.stringify(state ? state : res));
+ });
+ });
+}
+
+
+
+Cypress.Commands.add('setReduxState', setReduxState);
+