From 66f45dec3e482ee8e94e1de709b013d483fb4792 Mon Sep 17 00:00:00 2001 From: OrcaWin Date: Sat, 14 Nov 2026 07:53:48 -0800 Subject: [PATCH] test: remove low-value mobile and frozen baseline checks (#42422) Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com> --- .../workspace-details-model.test.ts | 17 ------- .../catalog/structural-equality.test.ts | 11 ----- .../project-section-catalog.test.ts | 45 ------------------- .../workspace-view-settings.test.ts | 19 -------- .../cross-version-stopping.unit.test.ts | 7 --- 5 files changed, 99 deletions(-) delete mode 100644 mobile/src/worktree/project-sections/project-section-catalog.test.ts diff --git a/mobile/src/host-screen/workspace-actions/workspace-details-model.test.ts b/mobile/src/host-screen/workspace-actions/workspace-details-model.test.ts index 5621c26eb21..ea7ca220031 100644 --- a/mobile/src/host-screen/workspace-actions/workspace-details-model.test.ts +++ b/mobile/src/host-screen/workspace-actions/workspace-details-model.test.ts @@ -20,23 +20,6 @@ function row(overrides: Partial = {}): Worktree { } describe('buildWorkspaceDetailLinks', () => { - it("lists reviews first, then tasks in the host's order, as the desktop hover card does", () => { - const links = buildWorkspaceDetailLinks( - row({ - linkedItems: [ - { provider: 'jira', type: 'issue', number: 0, identifier: 'ORCA-4', title: 'Jira one' }, - { provider: 'linear', type: 'issue', number: 0, identifier: 'ENG-7' }, - { provider: 'github', type: 'issue', number: 3, title: 'Bug', url: 'https://x/3' } - ], - linkedPR: { number: 12, state: 'open' } - }) - ) - - expect(links.map((link) => link.label)).toEqual(['PR #12', 'ORCA-4', 'ENG-7', 'Issue #3']) - expect(links[0]).toMatchObject({ state: 'open' }) - expect(links[3]).toMatchObject({ title: 'Bug', url: 'https://x/3' }) - }) - it('enriches a linked entry for the same repo and PR', () => { const links = buildWorkspaceDetailLinks( row({ diff --git a/mobile/src/worktree/catalog/structural-equality.test.ts b/mobile/src/worktree/catalog/structural-equality.test.ts index 60f71307526..6e778b7e377 100644 --- a/mobile/src/worktree/catalog/structural-equality.test.ts +++ b/mobile/src/worktree/catalog/structural-equality.test.ts @@ -13,15 +13,4 @@ describe('areStructurallyEqual', () => { ).toBe(false) expect(areStructurallyEqual([1, 2], [1, 2, 3])).toBe(false) }) - - it('counts keys, so an added or removed key is a change even when undefined', () => { - expect(areStructurallyEqual({ a: 1 }, { a: 1, b: 2 })).toBe(false) - expect(areStructurallyEqual({ a: 1, b: undefined }, { a: 1 })).toBe(false) - expect(areStructurallyEqual({ a: 1 }, { b: 1 })).toBe(false) - }) - - it('does not equate an array with an object of the same entries', () => { - expect(areStructurallyEqual(['a'], { 0: 'a' })).toBe(false) - expect(areStructurallyEqual([], {})).toBe(false) - }) }) diff --git a/mobile/src/worktree/project-sections/project-section-catalog.test.ts b/mobile/src/worktree/project-sections/project-section-catalog.test.ts deleted file mode 100644 index e6bc2d6f1de..00000000000 --- a/mobile/src/worktree/project-sections/project-section-catalog.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { buildProjectSectionCatalog } from './project-section-catalog' -import type { ServedProjectSections } from '../../../../src/shared/project-section-catalog-schema' - -const uploaded = { type: 'image', src: 'data:image/png;base64,AAAA' } - -type ServedRepo = ServedProjectSections['repos'][number] - -function repo( - id: string, - executionHostId?: ServedRepo['executionHostId'], - repoIcon?: unknown -): ServedRepo { - return { - id, - displayName: 'orca', - path: `/repos/${id}`, - badgeColor: undefined, - addedAt: undefined, - connectionId: undefined, - executionHostId, - projectGroupId: undefined, - projectGroupOrder: undefined, - ...(repoIcon ? { repoIcon } : {}) - } -} - -describe('buildProjectSectionCatalog', () => { - it("restores an uploaded icon from the desktop's repo.list only for the same host's repo", () => { - const served: ServedProjectSections = { - repos: [repo('r1'), repo('r1', 'runtime:m4air')], - projects: [], - setups: [], - projectOrderBy: 'manual', - projectGroups: undefined - } - const catalog = buildProjectSectionCatalog( - served, - [repo('r1', undefined, uploaded)], - null, - 'manual' - ) - expect(catalog.repos.map((entry) => entry.repoIcon)).toEqual([uploaded, undefined]) - }) -}) diff --git a/mobile/src/worktree/workspace-list/workspace-view-settings.test.ts b/mobile/src/worktree/workspace-list/workspace-view-settings.test.ts index 385beb6aee2..0c9217edac7 100644 --- a/mobile/src/worktree/workspace-list/workspace-view-settings.test.ts +++ b/mobile/src/worktree/workspace-list/workspace-view-settings.test.ts @@ -75,25 +75,6 @@ describe('buildWorkspaceViewSettingsUpdate', () => { visibleWorkspaceHostIds: ['local', 'ssh:box'] }) }) - - it('sends every filter a full reset names, even ones the phone already thinks are off', () => { - const update = buildWorkspaceViewSettingsUpdate( - { filters: NO_WORKSPACE_ROW_FILTERS }, - apply(NO_WORKSPACE_ROW_FILTERS) - ) - expect(update).toEqual({ - hideSleepingWorkspaces: false, - alwaysShowDefaultBranchWorkspace: true, - hideDefaultBranchWorkspace: false, - hideAutomationGeneratedWorkspaces: false, - hideCliCreatedWorkspaces: false, - hideDetachedHeadWorkspaces: false, - hideWorkspacesFromOtherDevices: false, - filterRepoIds: [], - visibleWorkspaceHostIds: null, - workspaceHostScope: 'all' - }) - }) }) describe('card view settings', () => { diff --git a/tests/e2e/cross-version-wire/cross-version-stopping.unit.test.ts b/tests/e2e/cross-version-wire/cross-version-stopping.unit.test.ts index 31a34b9e680..f751b9d298c 100644 --- a/tests/e2e/cross-version-wire/cross-version-stopping.unit.test.ts +++ b/tests/e2e/cross-version-wire/cross-version-stopping.unit.test.ts @@ -143,13 +143,6 @@ beforeAll(async () => { }, SUITE_TIMEOUT_MS) describe('cross-version Stopping', () => { - it('an OLD desktop folds a new host summary into the plain working row it always drew', () => { - expect(oldBuild.fold(STOPPING_SUMMARY)).toEqual({ - state: 'working', - mainAgent: { state: 'working' } - }) - }) - it("an OLD phone reads a new host's row as working", () => { const row = publishRow(newBuild.host, { state: 'working',