diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-08-02 14:42:57 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-08-02 15:21:34 +0200 |
commit | 650312580f330bdf43cce4fb91d9fd721ed115f0 (patch) | |
tree | fac713e8ba6a7bd83a8066d44a81c76d44622481 /cypress.d.ts | |
parent | 9bf42fc3bf70bb7587af30e4a98089fdc46fa579 (diff) | |
download | nextcloud-server-650312580f330bdf43cce4fb91d9fd721ed115f0.tar.gz nextcloud-server-650312580f330bdf43cce4fb91d9fd721ed115f0.zip |
fix(cypress): Really mock the initial state instead of trying to stub a module
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'cypress.d.ts')
-rw-r--r-- | cypress.d.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cypress.d.ts b/cypress.d.ts index 7283e5819ab..7dc9a3bde23 100644 --- a/cypress.d.ts +++ b/cypress.d.ts @@ -29,6 +29,21 @@ declare global { namespace Cypress { interface Chainable { mount: typeof mount; + /** + * Mock an initial state for component testing + * + * @param app App name of the initial state + * @param key Key of the initial state + * @param value The mocked value of the initial state + */ + mockInitialState: (app: string, key: string, value: any) => void + /** + * Unmock all initial states or one defined by app and key + * + * @param app app name of the inital state + * @param key the key of the the initial state + */ + unmockInitialState: (app?: string, key?: string) => void } } } |