fix: E2E test reliability — wizard auto-cancel + CI bot isolation#14
Open
fix: E2E test reliability — wizard auto-cancel + CI bot isolation#14
Conversation
When a wizard is active and the user sends a different command (not /cancel), the wizard is now cancelled and the command is processed normally. Previously, the command text was sent to the wizard as input, causing cascading failures in E2E tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Separate CI environment file to avoid bot token collision between local development and CI runs. Also adds MAIN_CHAT_ID to .env.test for parameterized group chat configuration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Read group chat ID from MAIN_CHAT_ID environment variable in seed.ts and E2E fixtures, falling back to the existing default. This allows CI to use a different group chat than local development. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Swap .env.test with .env.ci before starting services so CI uses its own bot credentials. Add concurrency group to ensure only one E2E job runs at a time, preventing bot token conflicts between parallel PR runs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CI Squash Bot (@ci_belgrade_squash_bot) on test server: - Bot token for CI-only long polling - Group "CI Racket Science" for announcements - Log chat "Dev Squash Bot Logger" (shared) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bot crashed in CI because admin hadn't /started the CI bot yet. Wrap setMyCommands for admin scope in try-catch so it logs a warning instead of crashing. Also parameterize admin_id via ADMIN_ID env var. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bot responses in Docker on GitHub Actions are slower than local. Use CI env var to apply a 3x multiplier to all E2E timeouts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ocal dev - E2E job runs inside mcr.microsoft.com/playwright container (no browser install) - Bot runs directly via tsx instead of Docker Compose in CI - Add Dockerfile.dev for local dev with pre-installed production deps - Replace docs/DEPLOYMENT.md with comprehensive docs/CI-CD.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3986873 to
36457c2
Compare
3x (6s) was not enough for Telegram test server in GHA environment. 5x gives 10s for bot responses and 50s for page loads. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Health check passed before Telegram connection was established. Now bot.init() completes first, ensuring bot is ready when /health returns ok. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
/health now returns 200 only after bot.start() onStart fires, ensuring the bot is actually receiving Telegram messages before E2E tests begin. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previous CI runs leave unconfirmed updates in Telegram. When a new bot instance starts, it processes all stale updates (old commands from prior runs), flooding the chat and causing E2E test timeouts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- navigateToChat() now uses sidebar click when already on Telegram (reliable mid-session navigation vs unreliable hash + reload) - finalize/unfinalize test: navigate to group chat after announcing - cancel/restore test: navigate to group chat after announcing Both tests were looking for announcements and inline buttons in the bot DM, but these only exist in the group chat. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@ci_belgrade_squash_boton test server with its own group "CI Racket Science", preventing long-polling token collisionsMAIN_CHAT_IDenv var in seed and E2E fixturesTest plan
.env.test(unchanged)🤖 Generated with Claude Code