+
+
+
+
+
+
+ {pendingOption?.name
+ ?? active.groupName
+ ?? active.userName
+ ?? formatMessage(messages.titleStaff)}
+
+
+ {available.map(option => (
+
+ ))}
+
+
+
+ {showUserNameInput && (
+
+
+
+
+ )}
+
+ );
+}
diff --git a/shell/header/course-bar/masquerade/masquerade-widget/MasqueradeWidgetOption.test.tsx b/shell/header/course-bar/masquerade/masquerade-widget/MasqueradeWidgetOption.test.tsx
new file mode 100644
index 00000000..6a36a85c
--- /dev/null
+++ b/shell/header/course-bar/masquerade/masquerade-widget/MasqueradeWidgetOption.test.tsx
@@ -0,0 +1,96 @@
+import '@testing-library/jest-dom';
+import { render, screen } from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+
+import { MasqueradeWidgetOption } from './MasqueradeWidgetOption';
+import { MasqueradeContext } from '../MasqueradeContext';
+import type { MasqueradeState } from '../hooks';
+import type { ActiveMasqueradeData, MasqueradeOption } from '../data/api';
+
+const defaultActive: ActiveMasqueradeData = {
+ groupId: null,
+ role: 'staff',
+ userName: null,
+ userPartitionId: null,
+ groupName: null,
+};
+
+function buildContextValue(
+ overrides: Partial