-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Modify Full Integration Test Structure to allow for multiple tests th… #926
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
…at start new tasks Add test for mode switching functionality
|
src/test/suite/index.ts
Outdated
| // Create the mocha test | ||
| const mocha = new Mocha({ | ||
| ui: "tdd", | ||
| timeout: 600000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timeout increased to 600000 (10 min). Consider adding a comment explaining why such a long timeout is needed, to aid future maintainers.
mrubens
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Description
PROBLEM: Creating a new vscode test file and running the full suite was causing issues because the second test that tried to create new API, Provider, Extension, and Panel objects was crashing due to mismatches within VS Code. Attempts to dispose panels or restart the extension was causing the test run to fail. Also VS Code tests did not allow for the destruction and reconstruction of VS Code unlike how a Cypress or Selenium tests starts a new browser and driver for each test.
The VS Code test runner appears to only be able to start VS Code once
Solution: Restructuring full integration tests so that each test reuses the same Api, Provider, Extension, and Panel objects.
Each test is now able to start a new task using the global API, Provider, Extension, and Panel objects. Each test is able to set the settings needed for the test and start a new task.
With this PR, we are now able to add more VS Code tests in a coherent and standard structure.
Also included in this pr is mode switching test and verifies given the proper instructions, Roo Code can switch between the default modes as needed.
Test Procedure
Test runs locally.
Type of Change
Pre-flight Checklist
npm test) and code is formatted and linted (npm run format && npm run lint)npm run changeset(required for user-facing changes)Screenshots
n/a
Additional Notes
Important
Restructures VS Code integration tests to reuse global objects, adds new tests for mode switching and task handling, and updates test configuration.
Api,Provider,Extension, andPanelobjects, preventing crashes when creating new objects.runTest.tsto manage test execution.extension.test.tstosuite/extension.test.ts.modes.test.tsto verify mode switching functionality.task.test.tsto test prompt and response handling.package.jsonto changetest:integrationscript to userunTest.js.@types/globand updates@types/mochaindevDependencies.This description was created by
for 4170479. It will automatically update as commits are pushed.