From 6707a2850cf827e432a40970ed856d1e97db155d Mon Sep 17 00:00:00 2001 From: Toutsu Date: Mon, 15 Jun 2026 10:55:59 +0300 Subject: [PATCH] fix(list-sessions): clarify manager action button labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /listsessions buttons for owners/co-GMs only showed emoji + date, so it was unclear what each button did. Add explicit verb labels: - ❌ Отменить - ⏰ Перенести - ⬆️ С ожидания - 🗑 Удалить Update the renderer test to assert the new labels. --- .../Sessions/ListSessions/SessionListMessageRenderer.cs | 6 +++--- .../ListSessions/SessionListMessageRendererTests.cs | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/GmRelay.Bot/Features/Sessions/ListSessions/SessionListMessageRenderer.cs b/src/GmRelay.Bot/Features/Sessions/ListSessions/SessionListMessageRenderer.cs index 7501604..de3fe78 100644 --- a/src/GmRelay.Bot/Features/Sessions/ListSessions/SessionListMessageRenderer.cs +++ b/src/GmRelay.Bot/Features/Sessions/ListSessions/SessionListMessageRenderer.cs @@ -36,19 +36,19 @@ internal static class SessionListMessageRenderer actions.Add(new PlatformMessageAction( $"cancel_session:{session.Id}", - $"❌ {dateTitle}", + $"❌ Отменить {dateTitle}", $"cancel_session:{session.Id}")); actions.Add(new PlatformMessageAction( $"reschedule_session:{session.Id}", - $"⏰ {dateTitle}", + $"⏰ Перенести {dateTitle}", $"reschedule_session:{session.Id}")); if (SessionCapacityRules.CanPromoteWaitlistedPlayer(session.MaxPlayers, session.PlayerCount, session.WaitlistCount)) { actions.Add(new PlatformMessageAction( $"promote_waitlist:{session.Id}", - $"⬆️ Из ожидания {dateTitle}", + $"⬆️ С ожидания {dateTitle}", $"promote_waitlist:{session.Id}")); } diff --git a/tests/GmRelay.Bot.Tests/Features/Sessions/ListSessions/SessionListMessageRendererTests.cs b/tests/GmRelay.Bot.Tests/Features/Sessions/ListSessions/SessionListMessageRendererTests.cs index d0a3d8d..fb1db49 100644 --- a/tests/GmRelay.Bot.Tests/Features/Sessions/ListSessions/SessionListMessageRendererTests.cs +++ b/tests/GmRelay.Bot.Tests/Features/Sessions/ListSessions/SessionListMessageRendererTests.cs @@ -32,6 +32,12 @@ public sealed class SessionListMessageRendererTests Assert.Contains(actions, a => a.Payload == $"reschedule_session:{sessionId}"); Assert.Contains(actions, a => a.Payload == $"promote_waitlist:{sessionId}"); Assert.Contains(actions, a => a.Payload == $"delete_session:{sessionId}"); + + var shortDate = new DateTime(2026, 5, 7, 16, 30, 0, DateTimeKind.Utc).FormatMoscowShort(); + Assert.Contains(actions, a => a.Text == $"❌ Отменить {shortDate}"); + Assert.Contains(actions, a => a.Text == $"⏰ Перенести {shortDate}"); + Assert.Contains(actions, a => a.Text == $"⬆️ С ожидания {shortDate}"); + Assert.Contains(actions, a => a.Text == $"🗑 Удалить {shortDate}"); } [Fact]