From f5e7c2bdfcc67aa120cb3c72b19f611d9e10375f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 18 Apr 2026 01:39:06 +0000 Subject: [PATCH] fix(test): resolve CrowdSec card title lookup in Security test mock The Security component renders the CrowdSec card title using the nested translation key 'security.crowdsec.title', but the test mock only had the flat key 'security.crowdsec'. The mock fallback returns the key string itself when a lookup misses, causing getByText('CrowdSec') to find nothing. Added 'security.crowdsec.title' to the securityTranslations map so the mock resolves to the expected 'CrowdSec' string, matching the component's actual t() call and allowing the title assertion to pass. --- frontend/src/pages/__tests__/Security.functional.test.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/pages/__tests__/Security.functional.test.tsx b/frontend/src/pages/__tests__/Security.functional.test.tsx index bb385492..1b0a87c9 100644 --- a/frontend/src/pages/__tests__/Security.functional.test.tsx +++ b/frontend/src/pages/__tests__/Security.functional.test.tsx @@ -73,6 +73,7 @@ const securityTranslations: Record = { 'security.waf': 'WAF', 'security.rate': 'Rate', 'security.crowdsec': 'CrowdSec', + 'security.crowdsec.title': 'CrowdSec', 'security.crowdsecDescription': 'IP Reputation', 'security.crowdsecProtects': 'Blocks known attackers, botnets, and malicious IPs', 'security.crowdsecDisabledDescription': 'Enable to block known malicious IPs',