/
githubmirror
/
code-server
Обзор
Документация
Войти
/
githubmirror
/
code-server
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v4.131.0
test/e2e/uploads.test.ts
56 строк
2 KB
YONGJAE LEE (이용재)
fix: re-enable skipped Heart tests and make non-asserting checks assert (#7845)
16 июн 2026, 20:58
Не верифицирован
16 июн 2026, 20:58
7dfd685
Код
Авторство
О чём код?
import { promises as fs } from "fs" import * as path from "path" import { clean } from "../utils/helpers" import { describe, test, expect } from "./baseFixture" describe("Uploads (enabled)", ["--disable-workspace-trust"], {}, () => { const testName = "uploads-enabled" test.beforeAll(async () => { await clean(testName) }) test("should see the 'Upload...' option", async ({ codeServerPage }) => { // Setup const workspaceDir = await codeServerPage.workspaceDir const tmpDirPath = path.join(workspaceDir, "test-directory") await fs.mkdir(tmpDirPath) // Action await codeServerPage.openContextMenu('span:has-text("test-directory")') await expect(codeServerPage.page.locator("text=Upload...")).toBeVisible() }) test("should see the 'Show Local' button on Open File", async ({ codeServerPage }) => { // Action await codeServerPage.navigateMenus(["File", "Open File..."]) await codeServerPage.page.waitForSelector(".quick-input-widget") await expect(codeServerPage.page.locator("text=Show Local")).toBeVisible() }) }) describe("Uploads (disabled)", ["--disable-workspace-trust", "--disable-file-uploads"], {}, () => { const testName = "uploads-disabled" test.beforeAll(async () => { await clean(testName) }) test("should not see the 'Upload...' option", async ({ codeServerPage }) => { // Setup const workspaceDir = await codeServerPage.workspaceDir const tmpDirPath = path.join(workspaceDir, "test-directory") await fs.mkdir(tmpDirPath) // Action await codeServerPage.openContextMenu('span:has-text("test-directory")') await expect(codeServerPage.page.locator("text=Upload...")).not.toBeVisible() }) test("should not see the 'Show Local' button on Open File", async ({ codeServerPage }) => { // Action await codeServerPage.navigateMenus(["File", "Open File..."]) await codeServerPage.page.waitForSelector(".quick-input-widget") await expect(codeServerPage.page.locator("text=Show Local")).not.toBeVisible() }) })