Skip to content

Commit c05de92

Browse files
authored
test: wait for local model usage flags to load (tinyhumansai#1643)
Co-authored-by: honor2030 <19909783+honor2030@users.noreply.github.com>
1 parent bfcf398 commit c05de92

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎app/src/components/settings/panels/__tests__/LocalModelPanel.test.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,9 @@ describe('LocalModelPanel — usage flags', () => {
217217
const embeddingsLabel = await screen.findByText('Embeddings');
218218
const checkbox = embeddingsLabel.closest('label')?.querySelector('input[type="checkbox"]');
219219
expect(checkbox).toBeTruthy();
220-
expect(checkbox as HTMLInputElement).not.toBeDisabled();
220+
await waitFor(() => {
221+
expect(checkbox as HTMLInputElement).not.toBeDisabled();
222+
});
221223
fireEvent.click(checkbox as HTMLInputElement);
222224

223225
await waitFor(() => {

0 commit comments

Comments
 (0)