From 41b0afff4b372d5b1a5798481a9f1a1cc221d40f Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Wed, 28 Oct 2026 10:20:15 +0100 Subject: [PATCH] test: expect the organisation lock note on a theme mode the admin locked --- .../__tests__/appearance-settings-color-mode.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/settings/__tests__/appearance-settings-color-mode.test.tsx b/components/settings/__tests__/appearance-settings-color-mode.test.tsx index a3a71ee52..c1044f2e4 100644 --- a/components/settings/__tests__/appearance-settings-color-mode.test.tsx +++ b/components/settings/__tests__/appearance-settings-color-mode.test.tsx @@ -28,11 +28,11 @@ beforeEach(() => { describe('appearance settings color mode (#1280)', () => { it('shows the mode as managed while the theme policy locks it', () => { usePolicyStore.setState({ policy: { ...DEFAULT_POLICY, themePolicy: { ...DEFAULT_THEME_POLICY, lockColorMode: true } } }); - expect(within(renderModeItem()).getByLabelText('Managed by administrator')).toBeInTheDocument(); + expect(within(renderModeItem()).getByText('settings.org_locked')).toBeInTheDocument(); }); it('leaves the mode to the user otherwise, even with a default', () => { usePolicyStore.setState({ policy: { ...DEFAULT_POLICY, themePolicy: { ...DEFAULT_THEME_POLICY, defaultColorMode: 'light' } } }); - expect(within(renderModeItem()).queryByLabelText('Managed by administrator')).toBeNull(); + expect(within(renderModeItem()).queryByText('settings.org_locked')).toBeNull(); }); });