mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
* feat(app): expose archive for every workspace Workspace actions now archive one workspace by id. The daemon remains responsible for backing-specific cleanup, including removing a managed worktree only after its final workspace is archived. * refactor(app): clarify archive descriptor name * fix(app): preserve workspace archive safety * fix(app): allow archive without upstream * refactor(app): remove stale archive callback * test(app): cover workspace archive ownership
27 lines
1.0 KiB
TypeScript
27 lines
1.0 KiB
TypeScript
import { existsSync } from "node:fs";
|
|
import { expect, test } from "./fixtures";
|
|
import { gotoAppShell } from "./helpers/app";
|
|
import { seedWorkspace } from "./helpers/seed-client";
|
|
import { expectWorkspaceAbsentFromSidebar, selectWorkspaceInSidebar } from "./helpers/sidebar";
|
|
import { waitForSidebarHydration } from "./helpers/workspace-ui";
|
|
|
|
test.describe("Workspace archive shortcut", () => {
|
|
test("archives the selected workspace without removing its local checkout", async ({ page }) => {
|
|
const workspace = await seedWorkspace({ repoPrefix: "archive-shortcut-" });
|
|
|
|
try {
|
|
await gotoAppShell(page);
|
|
await waitForSidebarHydration(page);
|
|
await selectWorkspaceInSidebar(page, workspace.workspaceId);
|
|
|
|
const modifier = process.platform === "darwin" ? "Meta" : "Control";
|
|
await page.keyboard.press(`${modifier}+Shift+Backspace`);
|
|
|
|
await expectWorkspaceAbsentFromSidebar(page, workspace.workspaceId);
|
|
expect(existsSync(workspace.repoPath)).toBe(true);
|
|
} finally {
|
|
await workspace.cleanup();
|
|
}
|
|
});
|
|
});
|