test(frontend): mock getLiveCapability and align rollback timeout

Stub GroupsView live capability API in unit tests and expect the longer
system rollback request timeout; refresh pnpm-lock after dependency resolve.
This commit is contained in:
IanShaw027 committed 2026-08-08 08:48:38 +08:00
1 parent 6345b048d1
commit 85fb776151
4 files changed
+724 -735

No files matched your search

@@ -41,7 +41,11 @@ describe('admin system rollback API', () => {
const result = await rollback('0.1.146')
expect(post).toHaveBeenCalledWith('/admin/system/rollback', { version: '0.1.146' })
expect(post).toHaveBeenCalledWith(
'/admin/system/rollback',
{ version: '0.1.146' },
{ timeout: 15 * 60 * 1000 }
)
expect(result.need_restart).toBe(true)
})
@@ -50,6 +54,10 @@ describe('admin system rollback API', () => {
await rollback()
expect(post).toHaveBeenCalledWith('/admin/system/rollback', undefined)
expect(post).toHaveBeenCalledWith(
'/admin/system/rollback',
undefined,
{ timeout: 15 * 60 * 1000 }
)
})
})