fix(SPA): activity list saves pagination too
This commit is contained in:
1 parent
9d9453c1b3
commit
c41e6dbca5
5 files changed
+193
-4
No files matched your search
@@ -28,6 +28,7 @@ export interface MountOptions extends ActivityApiMock {
|
||||
role?: string
|
||||
desktop?: boolean
|
||||
verified?: boolean
|
||||
path?: string
|
||||
}
|
||||
|
||||
export interface RecordedCall {
|
||||
@@ -69,7 +70,7 @@ export function callsTo(path: string) {
|
||||
}
|
||||
|
||||
export async function mountActivity(options: MountOptions = {}) {
|
||||
const { desktop = true, verified = true } = options
|
||||
const { desktop = true, verified = true, path = '/activity' } = options
|
||||
const role = 'role' in options ? options.role : 'owner'
|
||||
const api: ActivityApiMock = {
|
||||
list: () => pageOf(activityItems),
|
||||
@@ -126,7 +127,7 @@ export async function mountActivity(options: MountOptions = {}) {
|
||||
requestBlob,
|
||||
} as unknown as ReturnType<typeof useApi>)
|
||||
|
||||
await router.push('/activity')
|
||||
await router.push(path)
|
||||
harness.wrapper = mount(ActivityView, {
|
||||
attachTo: document.body,
|
||||
global: { plugins: [router, uiPlugin] },
|
||||
|
||||
Reference in new issue
Block a user