feat: improved testing#2377
Conversation
Greptile SummaryThis PR replaces the old terminal/ANSI-based test runner with a full in-editor dashboard UI (HTML/CSS, collapsible suite cards, live stats bar, progress bar) and adds two new test files — filesystem integration tests (
Confidence Score: 3/5The core runner rewrite works, but mock runners used in self-tests always inflate the global stats counters shown in the UI, so the displayed numbers are wrong every time the suite runs. The
Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant openTestRunnerTab
participant registerAllSuites
participant TestRunner
participant runTestsInternal
participant executeSuite
User->>openTestRunnerTab: trigger
openTestRunnerTab->>openTestRunnerTab: createTestRunnerContent() - build DOM
openTestRunnerTab->>registerAllSuites: registerAllSuites()
registerAllSuites->>registerAllSuites: "isRegistrationPass = true"
loop each testDefinition
registerAllSuites->>TestRunner: new TestRunner(name) - pushes to activeRunners
TestRunner->>TestRunner: runner.test() x N - increments stats.total
TestRunner->>TestRunner: runner.run(null) - returns immediately
end
registerAllSuites->>registerAllSuites: "isRegistrationPass = false"
openTestRunnerTab->>runTestsInternal: runTestsInternal()
runTestsInternal->>runTestsInternal: reset passed/failed/skipped to 0
loop each activeRunner
runTestsInternal->>executeSuite: runner.executeSuite(writeOutput)
executeSuite->>executeSuite: run tests, update suiteState + global stats
executeSuite->>executeSuite: updateUI() after each test
end
runTestsInternal->>openTestRunnerTab: "status = completed, updateUI()"
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User
participant openTestRunnerTab
participant registerAllSuites
participant TestRunner
participant runTestsInternal
participant executeSuite
User->>openTestRunnerTab: trigger
openTestRunnerTab->>openTestRunnerTab: createTestRunnerContent() - build DOM
openTestRunnerTab->>registerAllSuites: registerAllSuites()
registerAllSuites->>registerAllSuites: "isRegistrationPass = true"
loop each testDefinition
registerAllSuites->>TestRunner: new TestRunner(name) - pushes to activeRunners
TestRunner->>TestRunner: runner.test() x N - increments stats.total
TestRunner->>TestRunner: runner.run(null) - returns immediately
end
registerAllSuites->>registerAllSuites: "isRegistrationPass = false"
openTestRunnerTab->>runTestsInternal: runTestsInternal()
runTestsInternal->>runTestsInternal: reset passed/failed/skipped to 0
loop each activeRunner
runTestsInternal->>executeSuite: runner.executeSuite(writeOutput)
executeSuite->>executeSuite: run tests, update suiteState + global stats
executeSuite->>executeSuite: updateUI() after each test
end
runTestsInternal->>openTestRunnerTab: "status = completed, updateUI()"
|
No description provided.