mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
Refactor global schedules with mobile-responsive UI and backend optimizations (#167)
* ralph: ralph-global-schedules-dashboard completed after 2 iterations * Refactor global schedules with mobile-responsive UI and backend optimizations
This commit is contained in:
1 parent
ba15fb31e4
commit
f18bcbbf3e
10 files changed
+721
-1
No files matched your search
@@ -231,4 +231,23 @@ describe('Schedule Routes', () => {
|
||||
timezone: 'America/New_York',
|
||||
}))
|
||||
})
|
||||
|
||||
it('lists all schedules across all repos', async () => {
|
||||
mocks.scheduleService.listAllJobsWithRepos.mockReturnValue([
|
||||
{ id: 1, name: 'Job 1', repoName: 'Repo A', repoPath: '/path/a', repoUrl: 'https://repo-a' },
|
||||
{ id: 2, name: 'Job 2', repoName: 'Repo B', repoPath: '/path/b', repoUrl: 'https://repo-b' },
|
||||
])
|
||||
|
||||
const response = await app.request('/repos/42/schedules/all')
|
||||
const body = await response.json() as { jobs: Array<{ id: number; name: string; repoName: string }> }
|
||||
|
||||
expect(response.status).toBe(200)
|
||||
expect(body.jobs).toHaveLength(2)
|
||||
expect(body.jobs[0]).toEqual(expect.objectContaining({
|
||||
id: 1,
|
||||
name: 'Job 1',
|
||||
repoName: 'Repo A',
|
||||
}))
|
||||
expect(mocks.scheduleService.listAllJobsWithRepos).toHaveBeenCalled()
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user