mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-13 17:10:06 +00:00
[refactor] Rename queueIndex variables to reflect job.priority usage (#9258)
## Summary Rename `lastHistoryQueueIndex` → `lastJobHistoryPriority` and `currentQueueIndex` → `currentJobPriority` to reflect that these variables now read `job.priority` directly. ## Changes - **queueStore.ts**: `lastHistoryQueueIndex` → `lastJobHistoryPriority` - **JobDetailsPopover.vue**: `currentQueueIndex` → `currentJobPriority` - **queueStore.test.ts**: Updated references and test descriptions Fixes #9246 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9258-refactor-Rename-queueIndex-variables-to-reflect-job-priority-usage-3136d73d36508126989dd464f7dad9a1) by [Unito](https://www.unito.io)
This commit is contained in:
committed by
GitHub
parent
1c3984a178
commit
54b710b239
@@ -271,7 +271,7 @@ describe('useQueueStore', () => {
|
||||
expect(store.tasks).toEqual([])
|
||||
expect(store.flatTasks).toEqual([])
|
||||
expect(store.hasPendingTasks).toBe(false)
|
||||
expect(store.lastHistoryQueueIndex).toBe(-1)
|
||||
expect(store.lastJobHistoryPriority).toBe(-1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -686,7 +686,7 @@ describe('useQueueStore', () => {
|
||||
expect(store.hasPendingTasks).toBe(false)
|
||||
})
|
||||
|
||||
it('lastHistoryQueueIndex should return highest queue index', async () => {
|
||||
it('lastJobHistoryPriority should return highest job priority', async () => {
|
||||
const hist1 = createHistoryJob(10, 'hist-1')
|
||||
const hist2 = createHistoryJob(25, 'hist-2')
|
||||
const hist3 = createHistoryJob(15, 'hist-3')
|
||||
@@ -695,15 +695,15 @@ describe('useQueueStore', () => {
|
||||
mockGetHistory.mockResolvedValue([hist1, hist2, hist3])
|
||||
|
||||
await store.update()
|
||||
expect(store.lastHistoryQueueIndex).toBe(25)
|
||||
expect(store.lastJobHistoryPriority).toBe(25)
|
||||
})
|
||||
|
||||
it('lastHistoryQueueIndex should be -1 when no history', async () => {
|
||||
it('lastJobHistoryPriority should be -1 when no history', async () => {
|
||||
mockGetQueue.mockResolvedValue({ Running: [], Pending: [] })
|
||||
mockGetHistory.mockResolvedValue([])
|
||||
|
||||
await store.update()
|
||||
expect(store.lastHistoryQueueIndex).toBe(-1)
|
||||
expect(store.lastJobHistoryPriority).toBe(-1)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user