You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to override the Cypress.LocalStorage.clear. This gives me a typescript error that Cypress has no property LocalStorage.
I have /// <reference types="cypress" /> and all my other type management is working fine.
Desired behavior:
Was expecting to be able to override the LocalStorage.clear as described in docs to whitelist some keys that should not be cleared.
Steps to reproduce: (app code and test code)
I'm adding this to my support/commands.ts
constoldCypressLocalStorageClear=Cypress.LocalStorage.clearCypress.LocalStorage.clear=function(keys,ls,rs){// do something with the keys herecy.debug();if(keys){returnoldCypressLocalStorageClear.apply(this,arguments)}}
Versions
Mac OSX 10.13.6
cypress: ^3.1.5 (locked at 3.2.0)
The text was updated successfully, but these errors were encountered:
The code for this is done in cypress-io/cypress#4168, but has yet to be released.
We'll update this issue and reference the changelog when it's released.
Current behavior:
As per the docs at https://on.cypress.io/using-cypress-faq#How-do-I-preserve-cookies-localStorage-in-between-my-tests for
LocalStorage
which links to #461 (comment)I am trying to override the
Cypress.LocalStorage.clear
. This gives me a typescript error that Cypress has no propertyLocalStorage
.I have
/// <reference types="cypress" />
and all my other type management is working fine.Desired behavior:
Was expecting to be able to override the
LocalStorage.clear
as described in docs to whitelist some keys that should not be cleared.Steps to reproduce: (app code and test code)
I'm adding this to my
support/commands.ts
Versions
Mac OSX 10.13.6
cypress: ^3.1.5 (locked at 3.2.0)
The text was updated successfully, but these errors were encountered: