Skip to content

NO-JIRA: browser tests should clean up terminal tabs after each run #3287

@jiridanek

Description

@jiridanek

Problem

The @codeserver use the terminal to run command test opens a terminal via focusTerminal() but never closes it. When running the test repeatedly (especially in CDP mode against a persistent browser), terminal tabs accumulate — each run adds a new one.

Expected behavior

The test should close the terminal it opened during teardown, leaving the code-server UI in the same state it was before the test.

Suggested fix

Add cleanup in the test's step or in a test.afterEach hook to close the terminal panel (e.g., via the Command Palette → "Terminal: Kill All Terminals" or similar).

Context

Observed during local development with connectCDP: 9222 where the browser persists between test runs. Not a problem in CI (fresh browser per run) but makes iterative local development noisy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions