Files
kandev/apps/web/e2e/tests/ssh/lsp-unsupported-executor.spec.ts
T
Corey Fogg d4742089fc feat(web): add manual file upload and download to the Files panel (#3292)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
2026-09-03 08:07:13 +00:00

54 lines
2.0 KiB
TypeScript

import { test, expect } from "../../fixtures/ssh-test-base";
import {
createKotlinTask,
openDesktopFile,
openLspStatus,
performLspAction,
} from "../lsp/lsp-e2e-helpers";
test.describe("SSH LSP boundary", () => {
test.describe.configure({ timeout: 180_000 });
test("explains that language servers are unsupported on SSH tasks", async ({
testPage,
apiClient,
seedData,
backend,
}) => {
const task = await createKotlinTask(testPage, apiClient, seedData, backend, {
title: "SSH Kotlin LSP Boundary",
executorProfileId: seedData.sshExecutorProfileId,
repositoryDirectory: "e2e-ssh-repo",
push: true,
});
const remoteFilePath = `Remote-${task.taskId}.kt`;
// The SSH fixture's file:// origin belongs to the backend host and is not
// reachable from the remote container. Create the Kotlin file through the
// real workspace WebSocket so the assertion exercises the SSH task host.
await task.session.clickTab("Files");
const directNewFile = testPage.getByRole("button", { name: "New file" });
if (await directNewFile.isVisible().catch(() => false)) {
await directNewFile.click();
} else {
await testPage.getByTestId("files-create-menu").click();
await testPage.getByRole("menuitem", { name: "New file" }).click();
}
const fileNameInput = testPage.getByPlaceholder("filename...");
await expect(fileNameInput).toBeVisible();
await fileNameInput.fill(remoteFilePath);
await fileNameInput.press("Enter");
await openDesktopFile(testPage, task.session, remoteFilePath);
const statusButton = testPage.locator('[data-testid="lsp-status-button"]:visible');
await performLspAction(testPage, "start");
await expect(statusButton).toHaveAttribute("data-lsp-state", "unavailable", {
timeout: 15_000,
});
await expect(await openLspStatus(testPage)).toContainText(
/language servers are not supported by this task executor/i,
);
await expect(testPage.getByText(/Install kotlin-lsp on the task host/)).toHaveCount(0);
});
});