diff --git a/frontend/src/components/HomeComponents/SetupGuide/__tests__/CopyableCode.test.tsx b/frontend/src/components/HomeComponents/SetupGuide/__tests__/CopyableCode.test.tsx
index b96a6175..19b6fd78 100644
--- a/frontend/src/components/HomeComponents/SetupGuide/__tests__/CopyableCode.test.tsx
+++ b/frontend/src/components/HomeComponents/SetupGuide/__tests__/CopyableCode.test.tsx
@@ -26,6 +26,24 @@ describe('CopyableCode', () => {
expect(screen.getByText(sampleText)).toBeInTheDocument();
expect(screen.getByTestId('copy-icon')).toBeInTheDocument();
});
+ it('toggles sensitive value visibility and masks the text', () => {
+ const sensitiveText = 'API_KEY 12345';
+
+ render(
+
+ );
+ expect(screen.getByText(sensitiveText)).toBeInTheDocument();
+ expect(screen.getByTestId('eye-off-icon')).toBeInTheDocument();
+ fireEvent.click(
+ screen.getByRole('button', { name: /hide sensitive value/i })
+ );
+ expect(screen.getByText('API_KEY •••••')).toBeInTheDocument();
+ expect(screen.getByTestId('eye-icon')).toBeInTheDocument();
+ });
it('copies text to clipboard and shows toast message', async () => {
render();