* refactor(i18n): migrate app copy to domain namespaces - Replace the monolithic dialogs catalog with 16 flat product-domain catalogs - Preserve every translated locale value while moving all 356 messages - Expose narrow domain composables and retain useI18n as a compatibility aggregate - Document namespace ownership and admission rules * fix(i18n): complete migrated locale coverage - Translate exposed MCP automation, code editor, credential, and media placeholders - Restore missing German, Spanish, French, Italian, Polish, and Russian diacritics - Preserve technical product terms and interpolation placeholders * fix(i18n): polish remaining locale wording - Correct the mixed-language German code source label - Preserve stock_photo and Pexels semantics in German and Polish - Improve Italian MCP and code-editor grammar - Use the standard Russian term for MCP endpoint * fix(i18n): migrate diagnostics copy after rebase - Add a diagnostics domain for newly merged usage and telemetry settings - Keep settings navigation labels in the settings domain - Preserve translated diagnostics catalogs from current master * style(app): format rebased settings components * refactor(i18n): simplify domain message keys - Remove redundant domain prefixes from settings, diagnostics, automation, and integration catalogs - Move feature-specific actions out of the common namespace - Preserve current-master language picker and diagnostics copy across every locale - Update consumers to concise semantic keys * fix(app): preserve font and updater contracts - Restore browser and abort-aware font loading from current master - Remove the unused parameter helper from common messages - Update updater tests for semantic domain keys * fix(i18n): finish semantic diagnostics access * refactor(i18n): derive active MCP status message * fix(i18n): preserve rendering settings after rebase - Add a rendering domain for tiled canvas preferences - Preserve the current-master language and rendering settings UI - Move every translated renderer preference out of the retired dialogs catalog * fix(i18n): polish reviewed locale semantics * test(i18n): enforce translation completeness baseline - Fail on interpolation placeholder drift and suspicious mixed-script values - Reject new source-identical translations while tracking existing debt explicitly - Report translated-message coverage for every supported locale - Require baseline cleanup when existing placeholders are translated * refactor(i18n): baseline reviewed mixed-script messages - Replace brittle product-vocabulary exceptions with Unicode script detection - Track reviewed mixed-script messages by stable locale and message identity - Reject new entries and stale baseline debt without hardcoded terminology * fix(fig): resolve relocated stroke test helper
58 lines
1.5 KiB
TypeScript
58 lines
1.5 KiB
TypeScript
import { describe, expect, test } from 'bun:test'
|
|
|
|
import { importNodeChanges } from '@open-pencil/core'
|
|
|
|
import { canvas, doc, node } from './legacy/helpers'
|
|
|
|
describe('fig-import: stroke options', () => {
|
|
test('stroke cap and join', () => {
|
|
const graph = importNodeChanges([
|
|
doc(),
|
|
canvas(),
|
|
node('VECTOR', 10, 1, {
|
|
strokePaints: [
|
|
{
|
|
type: 'SOLID',
|
|
color: { r: 0, g: 0, b: 0, a: 1 },
|
|
opacity: 1,
|
|
visible: true,
|
|
blendMode: 'NORMAL'
|
|
}
|
|
],
|
|
strokeWeight: 3,
|
|
strokeAlign: 'CENTER',
|
|
strokeCap: 'ROUND',
|
|
strokeJoin: 'BEVEL',
|
|
miterLimit: 9
|
|
} as Partial<NodeChange>)
|
|
])
|
|
const n = graph.getChildren(graph.getPages()[0].id)[0]
|
|
expect(n.strokes[0].cap).toBe('ROUND')
|
|
expect(n.strokes[0].join).toBe('BEVEL')
|
|
expect(n.strokeMiterLimit).toBe(9)
|
|
})
|
|
|
|
test('dash pattern', () => {
|
|
const graph = importNodeChanges([
|
|
doc(),
|
|
canvas(),
|
|
node('RECTANGLE', 10, 1, {
|
|
strokePaints: [
|
|
{
|
|
type: 'SOLID',
|
|
color: { r: 0, g: 0, b: 0, a: 1 },
|
|
opacity: 1,
|
|
visible: true,
|
|
blendMode: 'NORMAL'
|
|
}
|
|
],
|
|
strokeWeight: 2,
|
|
strokeAlign: 'CENTER',
|
|
dashPattern: [10, 5]
|
|
} as Partial<NodeChange>)
|
|
])
|
|
const n = graph.getChildren(graph.getPages()[0].id)[0]
|
|
expect(n.strokes[0].dashPattern).toEqual([10, 5])
|
|
})
|
|
})
|