Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/test/issues/stateManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,17 @@ describe('StateManager branch behavior with useBranchForIssues setting', functio
credentialStore: { isAnyAuthenticated: () => true, getCurrentUser: async () => ({ login: 'testuser' }) },
} as any, mockContext);

(stateManager as any)._queries = [{ label: 'Test', query: 'is:open assignee:@me repo:owner/repo ', groupBy: [] }];

// Manually trigger the setIssueData flow
await (stateManager as any).setIssueData(mockFolderManager);

// Await the collection promise so setIssues completes
const collection = stateManager.getIssueCollection(mockUri);
const testQueryPromise = collection.get('Test');
assert.ok(testQueryPromise, 'Expected issue collection to contain the \'Test\' query label');
await testQueryPromise;

// If we get here without assertion failures in getIssues, the test passed
} finally {
vscode.workspace.getConfiguration = originalGetConfiguration;
Expand Down Expand Up @@ -251,6 +259,8 @@ describe('StateManager branch behavior with useBranchForIssues setting', functio
credentialStore: { isAnyAuthenticated: () => true, getCurrentUser: async () => ({ login: 'testuser' }) },
} as any, mockContext);

(sm as any)._queries = [{ label: 'Test', query: 'is:open repo:owner/repo', groupBy: [] }];

await (sm as any).setIssueData(mockFolderManager);

// Verify that the promises in issueCollection resolve (not reject)
Expand Down
Loading