From 8524a7f74655177f19352b39b3cd5a87caaed018 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 23 Jul 2026 13:56:12 -0400 Subject: [PATCH] test(sms-e2e): valid Twilio SID fixture so the create path passes (Gitea #29) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TestAccountSid was 'ACtest123' (AC + 6 chars). The management create path validates the Account SID against ^AC[0-9a-fA-F]{32}$ (ManagementActor.cs:2205, added 2026-07-10, commit 40088a21) while the fixture predates the guard (2026-06-19) — so the create was rejected and the config-card + secret-non-leak assertions have been red/inert since. Use AC + 32 hex (AC00000000000000000000000000000001) so the create succeeds and the downstream Auth-Token-non-leak assertion actually runs again. Unit-level RepositoryCoverageTests keep their short SIDs — they construct SmsConfiguration directly and never hit the validated path. --- .../Notifications/SmsNotificationE2ETests.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/SmsNotificationE2ETests.cs b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/SmsNotificationE2ETests.cs index 61b53bad..1db08449 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/SmsNotificationE2ETests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests/Notifications/SmsNotificationE2ETests.cs @@ -24,7 +24,7 @@ namespace ZB.MOM.WW.ScadaBridge.CentralUI.PlaywrightTests.Notifications; /// /// /// -/// Idempotency: the SMS-config fact uses a STABLE Account SID (ACtest123) and probes +/// Idempotency: the SMS-config fact uses a STABLE Account SID (AC000…0001) and probes /// notification sms list first — if a prior run already created it, the fact SKIPS the /// create and verifies the existing row instead (the page exposes no delete verb — neither UI /// nor CLI — so we never create a second copy we could not clean up; the render-crash + @@ -41,7 +41,9 @@ public class SmsNotificationE2ETests // Stable test fixture values. The Account SID is stable (not random) so reruns find the // prior config via 'notification sms list' and skip re-creation — the SMS config page has // no delete verb, so a unique-per-run SID would leak a config on every run. - private const string TestAccountSid = "ACtest123"; + // Must match the ManagementActor create guard ^AC[0-9a-fA-F]{32}$ (added 2026-07-10) or + // the create is rejected and the config-card / secret-non-leak assertions never run. + private const string TestAccountSid = "AC00000000000000000000000000000001"; private const string TestFromNumber = "+15551230000"; // The Auth Token VALUE that must NEVER be echoed back to the page (presence flag only). private const string TestAuthTokenValue = "e2e-secret-token-xyz";