Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

test: remove low-value theme and copy suites (#36140)

OrcaWin85522e89b83f
diff --git a/config/scripts/ci-shard-timings.json b/config/scripts/ci-shard-timings.json
index 5c107ce8d31..507f3de2451 100644
--- a/config/scripts/ci-shard-timings.json
+++ b/config/scripts/ci-shard-timings.json
@@ -7764,7 +7764,6 @@
"src/renderer/src/components/feature-wall/agents-orchestration/UsageAccountsCard.test.tsx": 644,
"src/renderer/src/components/feature-wall/browser-animated-visual-sequence.test.ts": 42,
"src/renderer/src/components/feature-wall/feature-wall-animation-visibility.test.tsx": 592,
- "src/renderer/src/components/feature-wall/feature-wall-setup-checklist-localized-copy.test.ts": 578,
"src/renderer/src/components/feature-wall/feature-wall-setup-progress.test.ts": 62,
"src/renderer/src/components/feature-wall/use-feature-wall-completion.test.ts": 47,
"src/renderer/src/components/feature-wall/use-feature-wall-tour-telemetry.test.ts": 31,
diff --git a/mobile/src/source-control/hosted-review-copy.test.ts b/mobile/src/source-control/hosted-review-copy.test.ts
deleted file mode 100644
index 37ae9c842b9..00000000000
--- a/mobile/src/source-control/hosted-review-copy.test.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { describe, expect, it } from 'vitest'
-import { hostedReviewCopy } from './hosted-review-copy'
-
-describe('hostedReviewCopy', () => {
- it('uses Merge Request labels for GitLab', () => {
- expect(hostedReviewCopy('gitlab')).toEqual({
- shortLabel: 'MR',
- reviewLabel: 'merge request',
- titleLabel: 'Merge Request'
- })
- })
-
- it('uses Pull Request labels for GitHub and other providers and undefined', () => {
- const pr = { shortLabel: 'PR', reviewLabel: 'pull request', titleLabel: 'Pull Request' }
- expect(hostedReviewCopy('github')).toEqual(pr)
- expect(hostedReviewCopy('bitbucket')).toEqual(pr)
- expect(hostedReviewCopy(undefined)).toEqual(pr)
- })
-})
diff --git a/mobile/src/theme/mobile-theme-module-scope.test.ts b/mobile/src/theme/mobile-theme-module-scope.test.ts
deleted file mode 100644
index ca4c45bd4f6..00000000000
--- a/mobile/src/theme/mobile-theme-module-scope.test.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { readFileSync, readdirSync } from 'node:fs'
-import { fileURLToPath } from 'node:url'
-import { join, relative } from 'node:path'
-import ts from 'typescript-api'
-import { describe, expect, it } from 'vitest'
-
-const mobileRoot = fileURLToPath(new URL('../..', import.meta.url))
-const scannedDirectories = ['src', 'app', 'web-entry']
-const paletteObjects = new Set(['colors'])
-// The terminal background is the same in both palettes.
-const schemeIndependentKeys = new Set(['terminalBg'])
-
-function sourceFiles(directory: string): string[] {
- return readdirSync(directory, { withFileTypes: true }).flatMap((entry) => {
- const path = join(directory, entry.name)
- if (entry.isDirectory()) {
- return entry.name === 'node_modules' ? [] : sourceFiles(path)
- }
- return /\.tsx?$/.test(entry.name) &&
- !/\.test\.tsx?$/.test(entry.name) &&
- !entry.name.endsWith('.generated.ts')
- ? [path]
- : []
- })
-}
-
-// Palette reads that run while a module loads, outside any function, keep the scheme the app started in.
-function moduleScopePaletteReads(path: string): string[] {
- const source = readFileSync(path, 'utf8')
- const sourceFile = ts.createSourceFile(path, source, ts.ScriptTarget.Latest, true)
- const reads: string[] = []
- const visit = (node: ts.Node): void => {
- if (ts.isFunctionLike(node) || ts.isClassLike(node)) {
- return
- }
- if (
- ts.isPropertyAccessExpression(node) &&
- ts.isIdentifier(node.expression) &&
- paletteObjects.has(node.expression.text) &&
- !schemeIndependentKeys.has(node.name.text)
- ) {
- const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart())
- reads.push(`${relative(mobileRoot, path)}:${line + 1} ${node.getText()}`)
- }
- // Spreading a themed stylesheet copies the scheme current at load.
- if (
- (ts.isSpreadAssignment(node) || ts.isSpreadElement(node)) &&
- ((ts.isIdentifier(node.expression) && /[sS]tyles$/.test(node.expression.text)) ||
- (ts.isCallExpression(node.expression) &&
- ts.isIdentifier(node.expression.expression) &&
- node.expression.expression.text.startsWith('themedStyle')))
- ) {
- const { line } = sourceFile.getLineAndCharacterOfPosition(node.getStart())
- reads.push(`${relative(mobileRoot, path)}:${line + 1} ${node.getText()}`)
- }
- ts.forEachChild(node, visit)
- }
- ts.forEachChild(sourceFile, visit)
- return reads
-}
-
-describe('mobile theme module scope', () => {
- it('reads palette colors and themed styles only while rendering or inside themedStyles', () => {
- const reads = scannedDirectories
- .flatMap((directory) => sourceFiles(join(mobileRoot, directory)))
- .flatMap(moduleScopePaletteReads)
- expect(reads).toEqual([])
- })
-})
diff --git a/mobile/src/transport/mobile-connection-path-label.test.ts b/mobile/src/transport/mobile-connection-path-label.test.ts
deleted file mode 100644
index e65842a8869..00000000000
--- a/mobile/src/transport/mobile-connection-path-label.test.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { describe, expect, it } from 'vitest'
-import { mobileConnectionPathLabel } from './mobile-connection-path-label'
-
-describe('mobile connection path label', () => {
- it('distinguishes LAN, Tailscale, and the relay without exposing transport errors', () => {
- expect(mobileConnectionPathLabel('lan')).toBe('Direct · LAN')
- expect(mobileConnectionPathLabel('tailscale')).toBe('Direct · Tailscale')
- expect(mobileConnectionPathLabel('relay')).toBe('Orca Relay')
- })
-})
diff --git a/src/renderer/src/components/feature-wall/feature-wall-setup-checklist-localized-copy.test.ts b/src/renderer/src/components/feature-wall/feature-wall-setup-checklist-localized-copy.test.ts
deleted file mode 100644
index d081c82a3e9..00000000000
--- a/src/renderer/src/components/feature-wall/feature-wall-setup-checklist-localized-copy.test.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { describe, expect, it } from 'vitest'
-
-import { FEATURE_WALL_SETUP_STEPS } from '../../../../shared/feature-wall-setup-steps'
-import { getLocalizedFeatureWallSetupChecklistCopy } from './feature-wall-setup-checklist-localized-copy'
-
-import { i18n } from '../../i18n/i18n'
-
-describe('feature-wall-setup-checklist-localized-copy', () => {
- it.each(['ja', 'ko'])(
- 'resolves every checklist step through the %s runtime catalog',
- async (locale) => {
- try {
- await i18n.changeLanguage(locale)
- for (const step of FEATURE_WALL_SETUP_STEPS) {
- const localized = getLocalizedFeatureWallSetupChecklistCopy(step)
- expect(localized.name, step.id).not.toBe(step.name)
- expect(localized.description, step.id).not.toBe(step.description)
- }
- } finally {
- await i18n.changeLanguage('en')
- }
- }
- )
-})