Skip to content

Commit c81e52d

Browse files
committed
Fix theme-toggle tests;
1 parent ef0e18c commit c81e52d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

frontend/__tests__/components/theme-toggle.test.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('ThemeToggle', () => {
3232

3333
expect(screen.getByRole('button', { name: /light theme/i })).toBeInTheDocument();
3434
expect(screen.getByRole('button', { name: /dark theme/i })).toBeInTheDocument();
35-
expect(screen.getByRole('button', { name: /system theme/i })).toBeInTheDocument();
35+
expect(screen.getByRole('button', { name: /auto theme/i })).toBeInTheDocument();
3636
});
3737

3838
it('renders correctly with dark theme', () => {
@@ -58,7 +58,7 @@ describe('ThemeToggle', () => {
5858
</ThemeProvider>
5959
);
6060

61-
const systemButton = screen.getByRole('button', { name: /system theme/i });
61+
const systemButton = screen.getByRole('button', { name: /auto theme/i });
6262
expect(systemButton).toBeInTheDocument();
6363
expect(systemButton).toHaveClass('bg-primary');
6464
});
@@ -96,7 +96,7 @@ describe('ThemeToggle', () => {
9696
</ThemeProvider>
9797
);
9898

99-
const systemButton = screen.getByRole('button', { name: /system theme/i });
99+
const systemButton = screen.getByRole('button', { name: /auto theme/i });
100100
fireEvent.click(systemButton);
101101

102102
expect(mockSetTheme).toHaveBeenCalledWith('system');
@@ -130,7 +130,7 @@ describe('ThemeToggle', () => {
130130

131131
expect(screen.getByLabelText('Light theme')).toBeInTheDocument();
132132
expect(screen.getByLabelText('Dark theme')).toBeInTheDocument();
133-
expect(screen.getByLabelText('System theme')).toBeInTheDocument();
133+
expect(screen.getByLabelText('Auto theme')).toBeInTheDocument();
134134
});
135135

136136
it('has proper title attributes for tooltips', () => {
@@ -142,7 +142,7 @@ describe('ThemeToggle', () => {
142142

143143
expect(screen.getByTitle('Switch to light theme')).toBeInTheDocument();
144144
expect(screen.getByTitle('Switch to dark theme')).toBeInTheDocument();
145-
expect(screen.getByTitle('Switch to system theme')).toBeInTheDocument();
145+
expect(screen.getByTitle('Switch to auto theme')).toBeInTheDocument();
146146
});
147147

148148
it('handles rapid theme switching', async () => {
@@ -189,7 +189,7 @@ describe('ThemeToggle', () => {
189189

190190
// When theme is 'system', it should use systemTheme
191191
// This affects which button is active
192-
const systemButton = screen.getByRole('button', { name: /system theme/i });
192+
const systemButton = screen.getByRole('button', { name: /auto theme/i });
193193
expect(systemButton).toHaveClass('bg-primary');
194194
});
195195
});

0 commit comments

Comments
 (0)