-
Notifications
You must be signed in to change notification settings - Fork 29
Fix browser test connectivity issues, add dynamic syntax highlighting, and comprehensive e2e test coverage #573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@copilot still got |
…vements Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
…handling Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
... Could you please provide more details about what issue you're still experiencing? Your comment appears to be cut off. I've verified that:
If you're still seeing specific error messages or connectivity issues, please share the complete error details so I can help resolve them. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot full error logs
|
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
... Added comprehensive language detection for the code editor! The editor now automatically detects file types and applies appropriate syntax highlighting. ✅ Supported formats with syntax highlighting:
✅ Features implemented:
The changes are in commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot fix failed e2e tests and add more e2e tests |
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Fixed all e2e test failures and added comprehensive test coverage! ✅ Issues resolved:
Added 8 comprehensive e2e tests covering:
Test results: The tests now reliably validate core functionality including the browser connectivity fixes and dynamic syntax highlighting features from commit Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
🎉 This PR is included in version 1.3.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR resolves the "Cannot run browser tests" issue by implementing robust server startup and connection handling improvements, adds dynamic language detection for the code editor with proper syntax highlighting, and establishes comprehensive e2e test coverage to prevent regressions.
Problem
Users were experiencing network errors when trying to run browser tests:
GET http://localhost:3333/css/chunk-vendors.cb8255ac.css net::ERR_CONNECTION_RESETGET http://localhost:2999/socket.io/?EIO=3&transport=polling&t=Pa5CRpf net::ERR_CONNECTION_REFUSEDAxiosError: Network Errorwhen fetching API dataAdditionally, the code editor lacked format detection, always treating files as JavaScript regardless of their actual type (.ts, .json, .feature, etc.), resulting in poor syntax highlighting and missing language-specific features.
The existing e2e tests were also failing due to configuration issues and brittle test patterns.
Root Cause
The original server startup lacked proper error handling and readiness checks, leading to race conditions where:
The code editor was hardcoded to use JavaScript syntax highlighting for all files, and the e2e tests had TypeScript compilation errors and unreliable element detection patterns.
Solution
Server Startup Reliability (
bin/codecept-ui.js)Frontend Connection Resilience (
src/main.js)/api/portsendpoint (3 attempts with exponential backoff)Dynamic Language Detection (
src/utils/languageDetection.js+ScenarioSource.vue)Supported Languages:
javascripttypescriptjsongherkinyamlhtmlmarkdownshell/bashComprehensive E2E Test Coverage
Error Messages
The PR provides clear, actionable error messages:
Testing
Screenshots
Working CodeceptUI with improved connection handling and syntax highlighting:
The browser console now shows successful port fetching and WebSocket connection establishment, eliminating the network errors reported in the original issue. The code editor now provides proper syntax highlighting, IntelliSense, and language-specific features for all supported file types while maintaining full backward compatibility. The comprehensive e2e test suite ensures these improvements remain stable and functional.
Fixes #572.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.