feat(discord): make /newsession identical to Telegram wizard
PR Checks / test-and-build (pull_request) Successful in 30m45s
PR Checks / test-and-build (pull_request) Successful in 30m45s
- Remove legacy DiscordNewSessionCommand/Handler and their tests. - Rename /newsession-wizard to /newsession. - Add shared pool capacity step before Format/Location. - Render Format and Location in Discord wizard; Location uses a modal. - Propagate Format, JoinLink and LocationAddress in BuildCommand. - Publish created sessions through existing IPlatformMessenger pipeline. - Update README, version bump to 3.11.1, sync compose/deploy/NavMenu.
This commit is contained in:
@@ -56,6 +56,29 @@ public sealed class DiscordWizardStepCapacityRenderTests
|
||||
.Select(b => b.Label ?? string.Empty)
|
||||
.ToList();
|
||||
|
||||
[Fact]
|
||||
public void RenderFormat_ContainsOnlineAndOfflineButtons()
|
||||
{
|
||||
var draft = new WizardDraft { Step = WizardStepNames.Format };
|
||||
var render = DiscordWizardStep.Render(draft, new WizardPayload());
|
||||
|
||||
var labels = ExtractButtonLabels(render);
|
||||
Assert.Contains(labels, l => l.Contains("Online", System.StringComparison.Ordinal));
|
||||
Assert.Contains(labels, l => l.Contains("Offline", System.StringComparison.Ordinal));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(WizardSessionFormat.Online, "🔗 Ссылка")]
|
||||
[InlineData(WizardSessionFormat.Offline, "📍 Адрес")]
|
||||
public void RenderLocation_ForFormat_OpensModalAndShowsPrompt(WizardSessionFormat format, string expectedTitle)
|
||||
{
|
||||
var draft = new WizardDraft { Step = WizardStepNames.Location };
|
||||
var render = DiscordWizardStep.Render(draft, new WizardPayload { Format = format });
|
||||
|
||||
Assert.Equal(expectedTitle, render.EmbedTitle);
|
||||
Assert.Equal(WizardStepNames.Location, render.OpenModalStep);
|
||||
}
|
||||
|
||||
private static System.Collections.Generic.List<ButtonProperties> ExtractButtons(
|
||||
DiscordWizardStep.DiscordWizardRender render) =>
|
||||
render.Components
|
||||
|
||||
Reference in New Issue
Block a user