Skip to content

Commit

Permalink
test: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi committed Aug 14, 2024
1 parent ccc3050 commit 84142ec
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ describe('SettingsPersonalView', () => {
});

it('should commit the theme change after clicking save', async () => {
vi.spyOn(usersStore, 'updateUser').mockReturnValue(Promise.resolve());
const { getByPlaceholderText, findByText, getByTestId } = renderComponent({ pinia });
await waitAllPromises();

Expand All @@ -102,6 +103,9 @@ describe('SettingsPersonalView', () => {
await waitAllPromises();

getByTestId('save-settings-button').click();

await waitAllPromises();

expect(uiStore.theme).toBe('dark');
});
});
Expand Down

0 comments on commit 84142ec

Please sign in to comment.