mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-09 08:59:40 +02:00
feat(tiles): each tile header names its harness and model
The tile header is now `● [logo] name · model ..... ⋯ ⤢ ×` (owner request): - The logo is PR #532's `run-mode-dot <cliId>` slot, so the logos, the skins and the plain dot of an id without a logo stay single-sourced in styles.css. The id is data (a class and a catalog lookup), never a branch; the frontend id-branching guard now also scans constants.js, terminal-split.js and tile-grid.js (the one existing shell branch in tile-grid.js, the attach route, is allowlisted with its reason). - The model is the session's displayModel, as text in a data-i18n-skip span inside a box whose tooltip may translate. Unknown means the logo alone. - The logo's tooltip and accessible name say "<harness> · <model>", plus where a model the CLI did not report came from ("set at launch", "custom endpoint"; zh-CN patterns for both, the names pass through). The model's box is aria-hidden so a screen reader hears the model once. - One painter, _paintSessionHarness (terminal-split.js, shared with the split panes next), diffs against what it last wrote, never the DOM: an unchanged session writes nothing on a tab render. - On a narrow header the model gives way first, then the name: the name does not shrink at all and is capped at its box, since any shrink factor takes a subpixel from a name that fits and ellipsizes it. The chrome and zoom tests found header parts by child position; they now look them up by class, with every assertion kept (the rename tests had been passing against the new logo node by position). The i18n harvester files the logo's labels as harness and model names that must stay as they are. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
/**
|
||||
* @fileoverview Static guard: no NEW CLI-id branch in the two files PR B2 touched
|
||||
* (`session-ui.js`, `mobile-overview.js`), mirroring
|
||||
* (`session-ui.js`, `mobile-overview.js`), plus the files that draw a session
|
||||
* header's harness logo and model (`constants.js`, `terminal-split.js`,
|
||||
* `tile-grid.js`: the logo's `run-mode-dot <cliId>` class is the id as DATA),
|
||||
* mirroring
|
||||
* `test/cli-registry-no-id-branching.test.ts` for the backend registry.
|
||||
*
|
||||
* Deliberately scoped to ONLY these two files, not all of `src/web/public/`.
|
||||
@@ -21,7 +24,7 @@ import { fileURLToPath } from 'node:url';
|
||||
import { STOCK_CLIS } from '../src/config/cli-registry/stock.js';
|
||||
|
||||
const PUBLIC = fileURLToPath(new URL('../src/web/public/', import.meta.url));
|
||||
const SCANNED_FILES = ['session-ui.js', 'mobile-overview.js'];
|
||||
const SCANNED_FILES = ['session-ui.js', 'mobile-overview.js', 'constants.js', 'terminal-split.js', 'tile-grid.js'];
|
||||
|
||||
/**
|
||||
* Every currently-surviving branch, each with the COUNT of physical call
|
||||
@@ -90,6 +93,13 @@ const ALLOWED_BRANCHES: Record<string, { count: number; reason: string }> = {
|
||||
reason: 'display filter: the "CLIs found inside the container" summaries omit shell, which is not an agent CLI',
|
||||
},
|
||||
|
||||
// tile-grid.js: a tile's Attach re-attaches through the same route pair the
|
||||
// primary pane uses, and that pair is split by mode on the server side.
|
||||
"tile-grid.js::mode === 'shell'": {
|
||||
count: 1,
|
||||
reason: 'attach route: a shell session attaches through /shell, an agent through /interactive',
|
||||
},
|
||||
|
||||
// mobile-overview.js: shell is exempt from the isCliAvailable() gate the
|
||||
// same way the toolbar's #runModeMenu exempts it (shell needs no CLI).
|
||||
"mobile-overview.js::mode !== 'shell'": {
|
||||
@@ -177,7 +187,7 @@ function actualCounts(): Map<string, number> {
|
||||
return counts;
|
||||
}
|
||||
|
||||
describe('no NEW CLI-id branching in session-ui.js / mobile-overview.js (PR B2)', () => {
|
||||
describe('no NEW CLI-id branching in the scanned frontend files', () => {
|
||||
it('scans both files (sanity)', () => {
|
||||
// If this drops to zero the scanner or the file list drifted and every
|
||||
// assertion below would pass vacuously.
|
||||
|
||||
@@ -313,6 +313,8 @@ export function resetGridHarness() {
|
||||
rafCallbacks.length = 0;
|
||||
localStore.clear();
|
||||
windowStub.innerWidth = 2400;
|
||||
// The CLI catalog the server injects (labels for the harness logos); a test sets its own.
|
||||
delete windowStub.__codemanCliCatalog;
|
||||
section.children = [];
|
||||
main.className = 'main';
|
||||
// A split a test left open moved .terminal-wrap into its container.
|
||||
|
||||
+173
-14
@@ -1,6 +1,11 @@
|
||||
/**
|
||||
* @fileoverview A tile's header: `● name ......... ⋯ ⤢ ×`, and the tab marker.
|
||||
* @fileoverview A tile's header: `● [logo] name · model ..... ⋯ ⤢ ×`, and the tab marker.
|
||||
*
|
||||
* - The logo is PR #532's `run-mode-dot <cliId>` slot (the id is data); the
|
||||
* logo's tooltip and accessible name carry the harness and the model, with
|
||||
* where the model came from when the CLI did not report it. The model is
|
||||
* text (never markup, never translated), and an unknown model shows nothing.
|
||||
* An unchanged session writes nothing on a refresh.
|
||||
* - The dot uses the six-state classifier the tab rows and both home screens
|
||||
* share (`_sidebarRichRow`), with the existing `.home-sessions-dot--*`
|
||||
* classes; a `needs` tile gets the pulsing red border; hovering shows the
|
||||
@@ -18,7 +23,15 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
||||
import { FakeEl, FakeTile, makeGridApp, resetGridHarness, type GridApp, tileEl } from './mocks/tile-grid-vm.js';
|
||||
import {
|
||||
FakeEl,
|
||||
FakeTile,
|
||||
makeGridApp,
|
||||
resetGridHarness,
|
||||
type GridApp,
|
||||
tileEl,
|
||||
windowStub,
|
||||
} from './mocks/tile-grid-vm.js';
|
||||
|
||||
const IDS = ['s-a', 's-b', 's-c'];
|
||||
|
||||
@@ -39,8 +52,12 @@ function openGrid(): GridApp {
|
||||
}
|
||||
|
||||
const headerOf = (id: string) => tileEl(id).children[0];
|
||||
/** A header part by its class, wherever the header nests it. */
|
||||
const partOf = (id: string, cls: string) => headerOf(id).querySelector(`.${cls}`) as FakeEl;
|
||||
const buttonOf = (id: string, cls: string) =>
|
||||
headerOf(id).children[2].children.find((b) => b.className.includes(cls)) as FakeEl;
|
||||
partOf(id, 'tile-actions').children.find((b) => b.className.includes(cls)) as FakeEl;
|
||||
/** Where the name sits: the name itself, or the rename input in its place. */
|
||||
const nameSlotOf = (id: string) => partOf(id, 'tile-title').children[0];
|
||||
|
||||
beforeEach(() => {
|
||||
resetGridHarness();
|
||||
@@ -51,7 +68,7 @@ describe('the header', () => {
|
||||
const app = makeGridApp(IDS);
|
||||
app.sessions.get('s-b').name = '<b>Sessions</b>';
|
||||
app.openTileGrid(IDS);
|
||||
const name = headerOf('s-b').children[1];
|
||||
const name = partOf('s-b', 'tile-name');
|
||||
expect(name.textContent).toBe('<b>Sessions</b>');
|
||||
expect(name.getAttribute('data-i18n-skip')).toBe('');
|
||||
expect(name.children).toHaveLength(0);
|
||||
@@ -70,9 +87,9 @@ describe('the header', () => {
|
||||
app.pendingHooks.set('s-c', new Set(['permission_prompt']));
|
||||
app._renderTileChrome();
|
||||
|
||||
expect(headerOf('s-a').children[0].className).toContain('home-sessions-dot--idle');
|
||||
expect(headerOf('s-b').children[0].className).toContain('home-sessions-dot--working');
|
||||
expect(headerOf('s-c').children[0].className).toContain('home-sessions-dot--needs');
|
||||
expect(partOf('s-a', 'tile-dot').className).toContain('home-sessions-dot--idle');
|
||||
expect(partOf('s-b', 'tile-dot').className).toContain('home-sessions-dot--working');
|
||||
expect(partOf('s-c', 'tile-dot').className).toContain('home-sessions-dot--needs');
|
||||
expect(tileEl('s-c').classList.contains('tile--needs')).toBe(true);
|
||||
expect(tileEl('s-b').classList.contains('tile--needs')).toBe(false);
|
||||
});
|
||||
@@ -95,6 +112,148 @@ describe('the header', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('the harness logo and the model', () => {
|
||||
const CATALOG = [
|
||||
{ id: 'claude', label: 'Claude Code' },
|
||||
{ id: 'deepseek', label: 'DeepSeek' },
|
||||
{ id: 'shell', label: 'Shell' },
|
||||
];
|
||||
|
||||
/** s-a on dsh's route, s-b claude on its statusline's model, s-c a shell. */
|
||||
function harnessGrid(): GridApp {
|
||||
windowStub.__codemanCliCatalog = CATALOG;
|
||||
const app = makeGridApp(IDS);
|
||||
app.sessions.get('s-a').mode = 'deepseek';
|
||||
app.sessions.get('s-a').displayModel = { model: 'qwen3.8-27b', source: 'screen' };
|
||||
app.sessions.get('s-b').displayModel = { model: 'Haiku 4.5', source: 'statusline' };
|
||||
app.sessions.get('s-c').mode = 'shell';
|
||||
app.openTileGrid(IDS);
|
||||
return app;
|
||||
}
|
||||
const logoOf = (id: string) => partOf(id, 'tile-harness');
|
||||
const modelOf = (id: string) => partOf(id, 'tile-model');
|
||||
const modelNameOf = (id: string) => modelOf(id).children[0];
|
||||
|
||||
it('sits between the dot and the name: `● [logo] name · model ... ⋯ ⤢ ×`', () => {
|
||||
harnessGrid();
|
||||
expect(headerOf('s-a').children.map((c) => c.className.split(' ')[0])).toEqual([
|
||||
'tile-dot',
|
||||
'tile-harness',
|
||||
'tile-title',
|
||||
'tile-actions',
|
||||
]);
|
||||
expect(partOf('s-a', 'tile-title').children.map((c) => c.className)).toEqual(['tile-name', 'tile-model']);
|
||||
});
|
||||
|
||||
it("draws the session's CLI as PR #532's logo slot, the id as data", () => {
|
||||
harnessGrid();
|
||||
expect(logoOf('s-a').className).toBe('tile-harness run-mode-dot deepseek');
|
||||
expect(logoOf('s-b').className).toBe('tile-harness run-mode-dot claude');
|
||||
expect(logoOf('s-c').className).toBe('tile-harness run-mode-dot shell');
|
||||
expect(logoOf('s-a').getAttribute('role')).toBe('img');
|
||||
});
|
||||
|
||||
it('names the harness and the model in the tooltip and the accessible name', () => {
|
||||
harnessGrid();
|
||||
expect(logoOf('s-a').title).toBe('DeepSeek \u00B7 qwen3.8-27b');
|
||||
expect(logoOf('s-a').getAttribute('aria-label')).toBe('DeepSeek \u00B7 qwen3.8-27b');
|
||||
expect(modelOf('s-a').title).toBe('DeepSeek \u00B7 qwen3.8-27b');
|
||||
expect(modelNameOf('s-a').textContent).toBe('qwen3.8-27b');
|
||||
expect(modelOf('s-a').hidden).toBe(false);
|
||||
// Said once to a screen reader: the model's box is hidden from it.
|
||||
expect(modelOf('s-a').getAttribute('aria-hidden')).toBe('true');
|
||||
// The model name is never translated; its tooltip may be.
|
||||
expect(modelNameOf('s-a').getAttribute('data-i18n-skip')).toBe('');
|
||||
expect(modelOf('s-a').getAttribute('data-i18n-skip')).toBeNull();
|
||||
});
|
||||
|
||||
it('an unknown model shows the logo alone: no text, no placeholder', () => {
|
||||
harnessGrid();
|
||||
expect(modelOf('s-c').hidden).toBe(true);
|
||||
expect(modelNameOf('s-c').textContent).toBe('');
|
||||
expect(logoOf('s-c').title).toBe('Shell');
|
||||
});
|
||||
|
||||
it('says in the tooltip where a model came from when the CLI did not report it', () => {
|
||||
const app = harnessGrid();
|
||||
app.sessions.get('s-b').displayModel = { model: 'haiku', source: 'launch' };
|
||||
app.sessions.get('s-c').mode = 'claude';
|
||||
app.sessions.get('s-c').displayModel = { model: 'qwen3.8-27b', source: 'custom-endpoint' };
|
||||
app._renderTileChrome();
|
||||
expect(logoOf('s-b').title).toBe('Claude Code \u00B7 haiku (set at launch)');
|
||||
expect(logoOf('s-c').title).toBe('Claude Code \u00B7 qwen3.8-27b (custom endpoint)');
|
||||
expect(modelNameOf('s-b').textContent).toBe('haiku');
|
||||
});
|
||||
|
||||
it('a model change (session:updated) updates the header', () => {
|
||||
const app = harnessGrid();
|
||||
app.sessions.set('s-b', {
|
||||
...app.sessions.get('s-b'),
|
||||
displayModel: { model: 'Sonnet 4.6', source: 'statusline' },
|
||||
});
|
||||
app._renderTileChrome();
|
||||
expect(modelNameOf('s-b').textContent).toBe('Sonnet 4.6');
|
||||
expect(logoOf('s-b').title).toBe('Claude Code \u00B7 Sonnet 4.6');
|
||||
// And the model going away takes the text with it.
|
||||
delete app.sessions.get('s-b').displayModel;
|
||||
app._renderTileChrome();
|
||||
expect(modelOf('s-b').hidden).toBe(true);
|
||||
expect(modelNameOf('s-b').textContent).toBe('');
|
||||
});
|
||||
|
||||
it('a model with markup stays text', () => {
|
||||
const app = harnessGrid();
|
||||
app.sessions.get('s-b').displayModel = { model: '<img src=x onerror=alert(1)>', source: 'statusline' };
|
||||
app._renderTileChrome();
|
||||
expect(modelNameOf('s-b').textContent).toBe('<img src=x onerror=alert(1)>');
|
||||
expect(modelNameOf('s-b').children).toHaveLength(0);
|
||||
expect(modelOf('s-b').children).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('an unchanged session writes nothing on a refresh', () => {
|
||||
const app = harnessGrid();
|
||||
const writes: string[] = [];
|
||||
for (const id of IDS) {
|
||||
for (const [node, props] of [
|
||||
[logoOf(id), ['className', 'title']],
|
||||
[modelOf(id), ['title', 'hidden']],
|
||||
[modelNameOf(id), ['textContent']],
|
||||
] as Array<[FakeEl, string[]]>) {
|
||||
for (const prop of props) {
|
||||
let value = (node as unknown as Record<string, unknown>)[prop];
|
||||
Object.defineProperty(node, prop, {
|
||||
get: () => value,
|
||||
set: (v) => {
|
||||
writes.push(`${id} ${prop}`);
|
||||
value = v;
|
||||
},
|
||||
});
|
||||
}
|
||||
const setAttribute = node.setAttribute.bind(node);
|
||||
node.setAttribute = (k: string, v: string) => {
|
||||
writes.push(`${id} @${k}`);
|
||||
setAttribute(k, v);
|
||||
};
|
||||
}
|
||||
}
|
||||
app._renderTileChrome();
|
||||
app._renderTileChrome();
|
||||
expect(writes).toEqual([]);
|
||||
});
|
||||
|
||||
it('an id that is not a CLI id is not a class name; without a catalog the label is the id', () => {
|
||||
const app = harnessGrid();
|
||||
delete windowStub.__codemanCliCatalog;
|
||||
app.sessions.get('s-a').mode = 'bad id" onclick';
|
||||
app.sessions.get('s-b').mode = 'my-cli';
|
||||
app._renderTileChrome();
|
||||
expect(logoOf('s-a').className).toBe('tile-harness run-mode-dot');
|
||||
expect(logoOf('s-a').title).toBe('qwen3.8-27b');
|
||||
expect(logoOf('s-b').className).toBe('tile-harness run-mode-dot my-cli');
|
||||
expect(logoOf('s-b').title).toBe('my-cli \u00B7 Haiku 4.5');
|
||||
});
|
||||
});
|
||||
|
||||
describe('header buttons', () => {
|
||||
it('are ⋯ ⤢ × and nothing else: no + (owner decision 9)', () => {
|
||||
const app = openGrid();
|
||||
@@ -216,8 +375,8 @@ describe('a translated label survives a refresh (zh-CN)', () => {
|
||||
|
||||
describe('rename', () => {
|
||||
function startRename(app: GridApp, id: string) {
|
||||
headerOf(id).children[1].dispatch('dblclick', { stopPropagation: vi.fn() });
|
||||
return headerOf(id).children[1];
|
||||
nameSlotOf(id).dispatch('dblclick', { stopPropagation: vi.fn() });
|
||||
return nameSlotOf(id);
|
||||
}
|
||||
|
||||
it('double-click puts an input in place of the name; Enter renames through the write queue', () => {
|
||||
@@ -235,8 +394,8 @@ describe('rename', () => {
|
||||
input.value = 'renamed';
|
||||
input.dispatch('keydown', { key: 'Enter', preventDefault: vi.fn() });
|
||||
expect(app._queueInlineSessionName).toHaveBeenCalledWith('s-b', 'renamed');
|
||||
expect(headerOf('s-b').children[1].className).toBe('tile-name');
|
||||
expect(headerOf('s-b').children[1].textContent).toBe('renamed');
|
||||
expect(nameSlotOf('s-b').className).toBe('tile-name');
|
||||
expect(nameSlotOf('s-b').textContent).toBe('renamed');
|
||||
});
|
||||
|
||||
it('Escape cancels without a write', () => {
|
||||
@@ -246,7 +405,7 @@ describe('rename', () => {
|
||||
input.value = 'nope';
|
||||
input.dispatch('keydown', { key: 'Escape', preventDefault: vi.fn() });
|
||||
expect(app._queueInlineSessionName).not.toHaveBeenCalled();
|
||||
expect(headerOf('s-b').children[1].textContent).toBe('s-b');
|
||||
expect(nameSlotOf('s-b').textContent).toBe('s-b');
|
||||
});
|
||||
|
||||
it('a header refresh while renaming leaves the input alone', () => {
|
||||
@@ -254,7 +413,7 @@ describe('rename', () => {
|
||||
const input = startRename(app, 's-b');
|
||||
input.value = 'half-typed';
|
||||
app._renderTileChrome();
|
||||
expect(headerOf('s-b').children[1]).toBe(input);
|
||||
expect(nameSlotOf('s-b')).toBe(input);
|
||||
expect(input.value).toBe('half-typed');
|
||||
});
|
||||
|
||||
@@ -265,7 +424,7 @@ describe('rename', () => {
|
||||
input.value = 'x';
|
||||
input.dispatch('keydown', { key: 'Enter', isComposing: true, preventDefault: vi.fn() });
|
||||
expect(app._queueInlineSessionName).not.toHaveBeenCalled();
|
||||
expect(headerOf('s-b').children[1]).toBe(input);
|
||||
expect(nameSlotOf('s-b')).toBe(input);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -72,6 +72,14 @@ const leftover = (text: string) => text.replace(ALLOWED, '').match(/[A-Za-z]+/g)
|
||||
const seen = new Map<string, string>();
|
||||
/** Text in a data-i18n-skip subtree (user text): must never be translated. */
|
||||
const userText = new Set<string>();
|
||||
/**
|
||||
* The harness logo's tooltip and accessible name (and the model box's
|
||||
* tooltip): harness and model NAMES, which stay as they are, plus at most a
|
||||
* note on where the model came from, which translates.
|
||||
*/
|
||||
const harnessLabels = new Map<string, string>();
|
||||
/** The harness labels and models the exercise below gives its sessions. */
|
||||
const HARNESS_NAMES = ['Claude Code', 'DeepSeek', 'Codex', 'qwen3.8-27b', 'Haiku 4.5', 'haiku', 'gpt-5.6-terra'];
|
||||
/**
|
||||
* A title or accessible name inside a skipped subtree: the translator skips
|
||||
* the element's attributes along with its text, so a UI label there stays
|
||||
@@ -82,9 +90,11 @@ const labelsInSkip: string[] = [];
|
||||
function harvest(root: FakeEl | null | undefined, where: string) {
|
||||
const walk = (el: FakeEl, inSkip: boolean) => {
|
||||
const skip = inSkip || 'data-i18n-skip' in el.attrs;
|
||||
const names = /\b(run-mode-dot|tile-model)\b/.test(el.className);
|
||||
const add = (value: unknown, kind: string) => {
|
||||
if (typeof value !== 'string' || !/[A-Za-z]/.test(value)) return;
|
||||
if (skip && kind === 'text') userText.add(value.trim());
|
||||
if (names && !skip && kind !== 'text') harnessLabels.set(value.trim(), `${where} (${kind})`);
|
||||
else if (skip && kind === 'text') userText.add(value.trim());
|
||||
else if (skip) labelsInSkip.push(`${where} (${kind}): ${value}`);
|
||||
else if (!seen.has(value.trim())) seen.set(value.trim(), `${where} (${kind})`);
|
||||
};
|
||||
@@ -127,6 +137,22 @@ const EIGHT = Array.from({ length: 8 }, (_, i) => `s-${i + 1}`);
|
||||
async function exercise() {
|
||||
setUp();
|
||||
const app = makeGridApp(EIGHT);
|
||||
// The harness logos: a CLI-reported model, a launch one, a custom endpoint's, none.
|
||||
windowStub.__codemanCliCatalog = [
|
||||
{ id: 'claude', label: 'Claude Code' },
|
||||
{ id: 'deepseek', label: 'DeepSeek' },
|
||||
{ id: 'codex', label: 'Codex' },
|
||||
];
|
||||
Object.assign(app.sessions.get('s-1'), {
|
||||
mode: 'deepseek',
|
||||
displayModel: { model: 'qwen3.8-27b', source: 'screen' },
|
||||
});
|
||||
app.sessions.get('s-2').displayModel = { model: 'haiku', source: 'launch' };
|
||||
Object.assign(app.sessions.get('s-3'), {
|
||||
mode: 'codex',
|
||||
displayModel: { model: 'qwen3.8-27b', source: 'custom-endpoint' },
|
||||
});
|
||||
app.sessions.get('s-6').displayModel = { model: 'Haiku 4.5', source: 'statusline' };
|
||||
let pill = 'idle';
|
||||
app._sidebarRichRow = () => ({ state: pill, pill, since: { at: 1 } });
|
||||
app._mobileOverviewStampText = () => '3m';
|
||||
@@ -291,6 +317,30 @@ describe('every tile grid string the code puts on screen translates to zh-CN', (
|
||||
expect(bad).toEqual([]);
|
||||
});
|
||||
|
||||
it('the harness logo keeps harness and model names as they are and translates the rest', () => {
|
||||
// Not vacuous: every form the logo's tooltip takes was seen.
|
||||
expect([...harnessLabels.keys()]).toEqual(
|
||||
expect.arrayContaining([
|
||||
'DeepSeek \u00B7 qwen3.8-27b',
|
||||
'Claude Code \u00B7 haiku (set at launch)',
|
||||
'Codex \u00B7 qwen3.8-27b (custom endpoint)',
|
||||
'Claude Code \u00B7 Haiku 4.5',
|
||||
'Claude Code',
|
||||
])
|
||||
);
|
||||
const bad: string[] = [];
|
||||
for (const [label, where] of harnessLabels) {
|
||||
const text = zh.api.t(label);
|
||||
const kept = HARNESS_NAMES.filter((n) => label.includes(n));
|
||||
let rest = text;
|
||||
for (const n of [...kept].sort((a, b) => b.length - a.length)) rest = rest.split(n).join('');
|
||||
if (!kept.length || kept.some((n) => !text.includes(n)) || leftover(rest).length || en.api.t(label) !== label) {
|
||||
bad.push(`${where}: "${label}" -> "${text}"`);
|
||||
}
|
||||
}
|
||||
expect(bad).toEqual([]);
|
||||
});
|
||||
|
||||
it('no UI label sits inside a skipped subtree (where the translator cannot reach it)', () => {
|
||||
expect(labelsInSkip).toEqual([]);
|
||||
});
|
||||
|
||||
@@ -28,7 +28,9 @@ import {
|
||||
|
||||
const IDS = ['s-a', 's-b', 's-c', 's-d'];
|
||||
const zoomButton = (id: string) =>
|
||||
tileEl(id).children[0].children[2].children.find((b) => b.className.includes('tile-zoom')) as FakeEl;
|
||||
tileEl(id)
|
||||
.querySelector('.tile-actions')!
|
||||
.children.find((b) => b.className.includes('tile-zoom')) as FakeEl;
|
||||
|
||||
function openGrid(ids = IDS, focus = ids[0]): GridApp {
|
||||
const app = makeGridApp(ids);
|
||||
|
||||
Reference in New Issue
Block a user