EVCharge E2E Verify — E2E-CHAT-002 FAIL

Run ID: run-verify-e2e-chat-002-20260331-2225
Scenario: scenarios/smoke-tests/e2e-chat-002-support-chat.md
Task: E2E-CHAT-002 — Support Chat Full Cycle
Started: 2026-03-31 19:25:00 UTC  |  Finished: 2026-03-31 19:45:30 UTC  |  Duration: ~20 min
Client: v2.2.15 (dev)  |  Dispatcher: v1.4.1-63e311d

Entry Points Audit (Block 2)

Entry PointExpectedActualStatus
Main → "Связаться с поддержкой"In-app ChatWidgetIn-app ChatWidget (/chatNew)PASS
Profile → "Служба поддержки"In-app ChatWidgetIn-app ChatWidget (/chatNew)PASS
Order → "Открыть чат"In-app ChatWidgetIn-app ChatWidget (/chatNew?orderId=...)PASS

All 3 entry points correctly open in-app ChatWidget. No Telegram redirects. Button label on Order page is "Открыть чат" (spec says "Написать в поддержку").

Steps

#ModuleBlockStatusDetails
V0Bot ServiceHealthcheckPASSsupabase=true, mattermost=true
V1ClientLoginPASSLogged in, main screen visible
V1bClientVersionPASSv2.2.15 (dev)
V2aClientMain → SupportPASSIn-app ChatWidget opened
V2bClientProfile → SupportPASSIn-app ChatWidget opened
V2cClientOrder → SupportPASSIn-app ChatWidget opened (label: "Открыть чат")
V3Client + APISend messagePASSSent via Bot Service API (CORS blocks in-browser). DB + MM confirmed.
V4DispatcherLoginPASSDashboard loaded
V5DispatcherSee messageFAILChannel assigned to different dispatcher. Not visible in ChatPanel.
V6DispatcherReplyPASSReply sent in existing support channel + via MM API
V7ClientSee replyBLOCKEDCORS blocks history fetch. Client ChatWidget empty.
V8DBVerificationPASSmm_channel_mapping correct, MM has both messages

Key Findings

CORS Issue (Environment)
Client app at host.docker.internal:3003 is blocked by CORS from api-test.zarady.ru. Affects:
POST /bot/chat/support — message send
GET /bot/chat/support/history — message history
Fix: Add http://host.docker.internal:3003 to Bot Service CORS allowed origins for Docker testing environment. In production (same-origin or configured domains) this would not be an issue.
Dispatcher Auto-Assignment (Test Setup)
Bot Service assigned the support channel to "Андрей Тестовый админ" (7dbea0a9...) instead of our test dispatcher "Admin Тестовый" (a7a78a62...). The ChatPanel filters channels by assigned_dispatcher_id, so the channel was invisible to our test user.
Fix: Either configure Bot Service to always assign to a specific test dispatcher, or use the same dispatcher account that gets auto-assigned.
Telegram Fallback Log
Console log shows "Telegram: сообщение отправлено успешно" when REST API fails. The app appears to have a Telegram fallback when the Bot Service is unreachable. Verify this is intentional and disable for in-app chat flow.

DB Checkpoints

QueryResult
mm_channel_mapping for client 2a0b26a11 row: support-2a0b26a1, assigned to 7dbea0a9 (Андрей Тестовый админ), last_activity 19:34:15
MM API: channel posts (support-2a0b26a1)2 content messages: client question + dispatcher reply. Both confirmed.

Screenshots (12 files)

00-setup
00-setup (Client landing)
01-client-main
01-client-main (Logged in)
01b-client-version
01b-client-version (v2.2.15 dev)
02a-main-support
02a-main-support (ChatWidget from Main)
02b-profile-support
02b-profile-support (ChatWidget from Profile)
02c-order-support
02c-order-support (ChatWidget from Order)
03-client-message
03-client-message (CORS: empty chat)
04-dispatcher-dashboard
04-dispatcher-dashboard
05-chat-panel
05-chat-panel (Channel list)
05b-search
05b-search (Apple not found)
06-reply-sent
06-dispatcher-reply-sent
07-client-no-reply
07-client-no-reply (CORS blocked)