fix(editor): a sign-out with a dirty dialog is said at the next sign-in
This commit is contained in:
1 parent
7ecaf1998e
commit
28e298ac56
4 files changed
+178
-53
No files matched your search
@@ -105,6 +105,8 @@ export interface MountOptions {
|
||||
entries?: InitialEntry[]
|
||||
/** Called on every render with the router's navigate and location: Back, Forward, state. */
|
||||
probe?: (navigate: NavigateFunction, location: Location) => void
|
||||
/** The signed-in account's id (default: USER). */
|
||||
user?: string
|
||||
}
|
||||
|
||||
/** Hands the router to a test: MemoryRouter listens to no popstate, a test calls navigate(-1). */
|
||||
@@ -119,7 +121,7 @@ export function mountDraft(options: MountOptions = {}) {
|
||||
useLocaleStore.setState({ locale: 'fr' })
|
||||
useLeaveGuardStore.setState({ armed: false })
|
||||
useAuthStore.setState({
|
||||
user: { id: USER } as never,
|
||||
user: { id: options.user ?? USER } as never,
|
||||
catalogGrants: options.grants ?? [grant('sheet_editor')],
|
||||
catalogGrantsStatus: options.grantsStatus ?? 'ready',
|
||||
roles: options.roles ?? ['admin'],
|
||||
|
||||
Reference in new issue
Block a user