diff --git a/lint/plugin.js b/lint/plugin.js index 20e00108d..183d0e2cf 100644 --- a/lint/plugin.js +++ b/lint/plugin.js @@ -1167,6 +1167,20 @@ const noTopLevelPrefixedTestFiles = createProgramFilenameRule({ } }) +const noSiblingDomainPrefixedTestFiles = createProgramFilenameRule({ + description: 'Disallow test files that repeat an existing sibling domain folder as a filename prefix', + check(file) { + const match = file.match(/^(.*\/tests\/(?:engine|e2e)\/.+\/)([^/]+)-[^/]+\.(?:test|spec)\.ts$/) + if (!match) return false + + const [, dir, prefix] = match + if (!existsSync(`${dir}${prefix}`)) return false + + const filename = file.slice(dir.length) + return `Move '${filename}' under the existing '${prefix}/' folder instead of repeating the domain as a filename prefix.` + } +}) + const noFlatKiwiModules = createProgramFilenameRule({ description: 'Disallow flat top-level Kiwi modules — group code under Kiwi subdomains', check(file) { @@ -1228,7 +1242,8 @@ const plugin = { 'no-useless-pass-through-wrappers': noUselessPassThroughWrappers, 'no-function-alias-imports': noFunctionAliasImports, 'no-flat-kiwi-modules': noFlatKiwiModules, - 'no-top-level-prefixed-test-files': noTopLevelPrefixedTestFiles + 'no-top-level-prefixed-test-files': noTopLevelPrefixedTestFiles, + 'no-sibling-domain-prefixed-test-files': noSiblingDomainPrefixedTestFiles } } diff --git a/oxlint.json b/oxlint.json index 4b05b1910..31510bc81 100644 --- a/oxlint.json +++ b/oxlint.json @@ -154,7 +154,8 @@ "open-pencil/non-component-source-directories-kebab-case": "error", "open-pencil/no-component-root-sibling-folder": "error", "open-pencil/no-flat-kiwi-modules": "error", - "open-pencil/no-top-level-prefixed-test-files": "error" + "open-pencil/no-top-level-prefixed-test-files": "error", + "open-pencil/no-sibling-domain-prefixed-test-files": "error" }, "overrides": [ { diff --git a/tests/engine/editor/clipboard/import-nodes/text-metrics.test.ts b/tests/engine/editor/clipboard/import-nodes/text/metrics.test.ts similarity index 100% rename from tests/engine/editor/clipboard/import-nodes/text-metrics.test.ts rename to tests/engine/editor/clipboard/import-nodes/text/metrics.test.ts diff --git a/tests/engine/editor/clipboard/import-nodes/undo-redo.test.ts b/tests/engine/editor/clipboard/import-nodes/undo/redo.test.ts similarity index 100% rename from tests/engine/editor/clipboard/import-nodes/undo-redo.test.ts rename to tests/engine/editor/clipboard/import-nodes/undo/redo.test.ts diff --git a/tests/engine/fig/import/legacy/arc-data.test.ts b/tests/engine/fig/import/legacy/arc/data.test.ts similarity index 96% rename from tests/engine/fig/import/legacy/arc-data.test.ts rename to tests/engine/fig/import/legacy/arc/data.test.ts index abde7c4d1..6306fdbd1 100644 --- a/tests/engine/fig/import/legacy/arc-data.test.ts +++ b/tests/engine/fig/import/legacy/arc/data.test.ts @@ -4,7 +4,7 @@ import { importNodeChanges } from '@open-pencil/core' import { expectDefined } from '#tests/helpers/assert' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: arc data', () => { test('partial ellipse', () => { diff --git a/tests/engine/fig/import/legacy/auto-layout.test.ts b/tests/engine/fig/import/legacy/auto-layout/basic.test.ts similarity index 92% rename from tests/engine/fig/import/legacy/auto-layout.test.ts rename to tests/engine/fig/import/legacy/auto-layout/basic.test.ts index ac50e8f46..8e07a5ade 100644 --- a/tests/engine/fig/import/legacy/auto-layout.test.ts +++ b/tests/engine/fig/import/legacy/auto-layout/basic.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: auto-layout alignment', () => { test('maps SPACE_EVENLY kiwi primary alignment to Figma space-between', () => { diff --git a/tests/engine/fig/import/legacy/blend-mode.test.ts b/tests/engine/fig/import/legacy/blend/mode.test.ts similarity index 93% rename from tests/engine/fig/import/legacy/blend-mode.test.ts rename to tests/engine/fig/import/legacy/blend/mode.test.ts index eebae4146..577f0a7d3 100644 --- a/tests/engine/fig/import/legacy/blend-mode.test.ts +++ b/tests/engine/fig/import/legacy/blend/mode.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: blend mode', () => { test('node blend mode', () => { diff --git a/tests/engine/fig/import/legacy/clips-content.test.ts b/tests/engine/fig/import/legacy/clips/content.test.ts similarity index 96% rename from tests/engine/fig/import/legacy/clips-content.test.ts rename to tests/engine/fig/import/legacy/clips/content.test.ts index 3ac662e9c..cdc3a7bfa 100644 --- a/tests/engine/fig/import/legacy/clips-content.test.ts +++ b/tests/engine/fig/import/legacy/clips/content.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: clipsContent with resizeToFit', () => { test('regular FRAME with frameMaskDisabled=false clips content', () => { diff --git a/tests/engine/fig/import/legacy/component-sets.test.ts b/tests/engine/fig/import/legacy/component/sets.test.ts similarity index 97% rename from tests/engine/fig/import/legacy/component-sets.test.ts rename to tests/engine/fig/import/legacy/component/sets.test.ts index 604255f2b..a7f03963c 100644 --- a/tests/engine/fig/import/legacy/component-sets.test.ts +++ b/tests/engine/fig/import/legacy/component/sets.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: component set detection', () => { test('FRAME with VARIANT componentPropDefs becomes COMPONENT_SET', () => { diff --git a/tests/engine/fig/import/legacy/image-fills.test.ts b/tests/engine/fig/import/legacy/image/fills.test.ts similarity index 96% rename from tests/engine/fig/import/legacy/image-fills.test.ts rename to tests/engine/fig/import/legacy/image/fills.test.ts index cf93f5aba..11dd0bbe9 100644 --- a/tests/engine/fig/import/legacy/image-fills.test.ts +++ b/tests/engine/fig/import/legacy/image/fills.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: image fills', () => { test('image fill with hash', () => { diff --git a/tests/engine/fig/import/legacy/independent-strokes.test.ts b/tests/engine/fig/import/legacy/independent/strokes.test.ts similarity index 93% rename from tests/engine/fig/import/legacy/independent-strokes.test.ts rename to tests/engine/fig/import/legacy/independent/strokes.test.ts index d2e73b43f..6890533cb 100644 --- a/tests/engine/fig/import/legacy/independent-strokes.test.ts +++ b/tests/engine/fig/import/legacy/independent/strokes.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: independent stroke weights', () => { test('border weights imported', () => { diff --git a/tests/engine/fig/import/legacy/multiple-fills.test.ts b/tests/engine/fig/import/legacy/multiple/fills.test.ts similarity index 96% rename from tests/engine/fig/import/legacy/multiple-fills.test.ts rename to tests/engine/fig/import/legacy/multiple/fills.test.ts index 9018dc8b7..c0fe4c277 100644 --- a/tests/engine/fig/import/legacy/multiple-fills.test.ts +++ b/tests/engine/fig/import/legacy/multiple/fills.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: multiple fills', () => { test('solid + gradient stacked', () => { diff --git a/tests/engine/fig/import/legacy/node-types.test.ts b/tests/engine/fig/import/legacy/node/types.test.ts similarity index 96% rename from tests/engine/fig/import/legacy/node-types.test.ts rename to tests/engine/fig/import/legacy/node/types.test.ts index 78c157454..beb1ab4ab 100644 --- a/tests/engine/fig/import/legacy/node-types.test.ts +++ b/tests/engine/fig/import/legacy/node/types.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { importNodeChanges } from '@open-pencil/core' -import { canvas, doc, node } from './helpers' +import { canvas, doc, node } from '../helpers' describe('fig-import: node types', () => { test('ROUNDED_RECTANGLE imported as its own type', () => { diff --git a/tests/engine/figma/api/absolute-position.test.ts b/tests/engine/figma/api/absolute/position.test.ts similarity index 93% rename from tests/engine/figma/api/absolute-position.test.ts rename to tests/engine/figma/api/absolute/position.test.ts index 28e19dcbd..f93e0dc9f 100644 --- a/tests/engine/figma/api/absolute-position.test.ts +++ b/tests/engine/figma/api/absolute/position.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('absolute position', () => { test('absoluteBoundingBox accounts for nesting', () => { diff --git a/tests/engine/figma/api/auto-layout.test.ts b/tests/engine/figma/api/auto-layout/basic.test.ts similarity index 97% rename from tests/engine/figma/api/auto-layout.test.ts rename to tests/engine/figma/api/auto-layout/basic.test.ts index ceba3f060..92d4bf700 100644 --- a/tests/engine/figma/api/auto-layout.test.ts +++ b/tests/engine/figma/api/auto-layout/basic.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('auto-layout', () => { test('layoutMode', () => { diff --git a/tests/engine/figma/api/auto-layout-extras.test.ts b/tests/engine/figma/api/auto-layout/extras.test.ts similarity index 97% rename from tests/engine/figma/api/auto-layout-extras.test.ts rename to tests/engine/figma/api/auto-layout/extras.test.ts index 63d755430..8989231ed 100644 --- a/tests/engine/figma/api/auto-layout-extras.test.ts +++ b/tests/engine/figma/api/auto-layout/extras.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('auto-layout extras', () => { test('primaryAxisSizingMode maps FIXED/AUTO', () => { diff --git a/tests/engine/figma/api/corner-radius.test.ts b/tests/engine/figma/api/corner/radius.test.ts similarity index 93% rename from tests/engine/figma/api/corner-radius.test.ts rename to tests/engine/figma/api/corner/radius.test.ts index c188666da..a8c3ffb5f 100644 --- a/tests/engine/figma/api/corner-radius.test.ts +++ b/tests/engine/figma/api/corner/radius.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('corner radius', () => { test('uniform corner radius', () => { diff --git a/tests/engine/figma/api/create-component-from-node.test.ts b/tests/engine/figma/api/create/component-from-node.test.ts similarity index 94% rename from tests/engine/figma/api/create-component-from-node.test.ts rename to tests/engine/figma/api/create/component-from-node.test.ts index 2dafc957f..6180763df 100644 --- a/tests/engine/figma/api/create-component-from-node.test.ts +++ b/tests/engine/figma/api/create/component-from-node.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('createComponentFromNode', () => { test('converts frame to component', () => { diff --git a/tests/engine/figma/api/document-and-pages.test.ts b/tests/engine/figma/api/document/pages.test.ts similarity index 97% rename from tests/engine/figma/api/document-and-pages.test.ts rename to tests/engine/figma/api/document/pages.test.ts index cd641c6e5..972c40db7 100644 --- a/tests/engine/figma/api/document-and-pages.test.ts +++ b/tests/engine/figma/api/document/pages.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { expectDefined } from '#tests/helpers/assert' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('document & pages', () => { test('root has pages as children', () => { diff --git a/tests/engine/figma/api/find-all-with-criteria.test.ts b/tests/engine/figma/api/find/all-with-criteria.test.ts similarity index 94% rename from tests/engine/figma/api/find-all-with-criteria.test.ts rename to tests/engine/figma/api/find/all-with-criteria.test.ts index 4e8c1c1a0..c0f01bcb6 100644 --- a/tests/engine/figma/api/find-all-with-criteria.test.ts +++ b/tests/engine/figma/api/find/all-with-criteria.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('findAllWithCriteria', () => { test('filters by type', () => { diff --git a/tests/engine/figma/api/frozen-arrays.test.ts b/tests/engine/figma/api/frozen/arrays.test.ts similarity index 95% rename from tests/engine/figma/api/frozen-arrays.test.ts rename to tests/engine/figma/api/frozen/arrays.test.ts index aa12e6bfd..b883c0c20 100644 --- a/tests/engine/figma/api/frozen-arrays.test.ts +++ b/tests/engine/figma/api/frozen/arrays.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { type Fill } from '@open-pencil/core' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('frozen arrays', () => { test('fills returns frozen clone', () => { diff --git a/tests/engine/figma/api/internals-not-exposed.test.ts b/tests/engine/figma/api/internals/not-exposed.test.ts similarity index 89% rename from tests/engine/figma/api/internals-not-exposed.test.ts rename to tests/engine/figma/api/internals/not-exposed.test.ts index f320822aa..67e2daf15 100644 --- a/tests/engine/figma/api/internals-not-exposed.test.ts +++ b/tests/engine/figma/api/internals/not-exposed.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('internals not exposed', () => { test('node has no _id, _graph, _api properties', () => { diff --git a/tests/engine/figma/api/layout-sizing.test.ts b/tests/engine/figma/api/layout/sizing.test.ts similarity index 98% rename from tests/engine/figma/api/layout-sizing.test.ts rename to tests/engine/figma/api/layout/sizing.test.ts index 165cf16cf..d82c72db9 100644 --- a/tests/engine/figma/api/layout-sizing.test.ts +++ b/tests/engine/figma/api/layout/sizing.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { getNodeOrThrow } from '#tests/helpers/assert' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('layout sizing', () => { test('child in horizontal parent: h=primary, v=counter', () => { diff --git a/tests/engine/figma/api/min-max-dimensions.test.ts b/tests/engine/figma/api/min-max/dimensions.test.ts similarity index 95% rename from tests/engine/figma/api/min-max-dimensions.test.ts rename to tests/engine/figma/api/min-max/dimensions.test.ts index 0689a3308..3d3dd1c77 100644 --- a/tests/engine/figma/api/min-max-dimensions.test.ts +++ b/tests/engine/figma/api/min-max/dimensions.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('min/max dimensions', () => { test('defaults to null', () => { diff --git a/tests/engine/figma/api/node-creation.test.ts b/tests/engine/figma/api/node/creation.test.ts similarity index 97% rename from tests/engine/figma/api/node-creation.test.ts rename to tests/engine/figma/api/node/creation.test.ts index deb5be762..a4e10a561 100644 --- a/tests/engine/figma/api/node-creation.test.ts +++ b/tests/engine/figma/api/node/creation.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { expectDefined } from '#tests/helpers/assert' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('node creation', () => { test('createFrame', () => { diff --git a/tests/engine/figma/api/property-access.test.ts b/tests/engine/figma/api/property/access.test.ts similarity index 97% rename from tests/engine/figma/api/property-access.test.ts rename to tests/engine/figma/api/property/access.test.ts index d666ea8dc..70f690c22 100644 --- a/tests/engine/figma/api/property-access.test.ts +++ b/tests/engine/figma/api/property/access.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('property access', () => { test('name get/set', () => { diff --git a/tests/engine/figma/api/stroke-details.test.ts b/tests/engine/figma/api/stroke/details.test.ts similarity index 97% rename from tests/engine/figma/api/stroke-details.test.ts rename to tests/engine/figma/api/stroke/details.test.ts index 4212e0545..db62d33b1 100644 --- a/tests/engine/figma/api/stroke-details.test.ts +++ b/tests/engine/figma/api/stroke/details.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('stroke details', () => { test('strokeWeight and strokeAlign', () => { diff --git a/tests/engine/figma/api/text.test.ts b/tests/engine/figma/api/text/basic.test.ts similarity index 97% rename from tests/engine/figma/api/text.test.ts rename to tests/engine/figma/api/text/basic.test.ts index bd29abb5c..f318b914e 100644 --- a/tests/engine/figma/api/text.test.ts +++ b/tests/engine/figma/api/text/basic.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('text', () => { test('characters maps to text content', () => { diff --git a/tests/engine/figma/api/text-extras.test.ts b/tests/engine/figma/api/text/extras.test.ts similarity index 96% rename from tests/engine/figma/api/text-extras.test.ts rename to tests/engine/figma/api/text/extras.test.ts index 12dceb140..02482ba08 100644 --- a/tests/engine/figma/api/text-extras.test.ts +++ b/tests/engine/figma/api/text/extras.test.ts @@ -1,6 +1,6 @@ import { describe, expect, test } from 'bun:test' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('text extras', () => { test('textTruncation', () => { diff --git a/tests/engine/figma/api/tree-operations.test.ts b/tests/engine/figma/api/tree/operations.test.ts similarity index 96% rename from tests/engine/figma/api/tree-operations.test.ts rename to tests/engine/figma/api/tree/operations.test.ts index f204646db..d90c46473 100644 --- a/tests/engine/figma/api/tree-operations.test.ts +++ b/tests/engine/figma/api/tree/operations.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { expectDefined } from '#tests/helpers/assert' -import { createAPI } from './helpers' +import { createAPI } from '../helpers' describe('tree operations', () => { test('appendChild reparents', () => { diff --git a/tests/engine/kiwi/serialize-fixes/auto-layout-transforms.test.ts b/tests/engine/kiwi/serialize-fixes/auto-layout/transforms.test.ts similarity index 98% rename from tests/engine/kiwi/serialize-fixes/auto-layout-transforms.test.ts rename to tests/engine/kiwi/serialize-fixes/auto-layout/transforms.test.ts index 0d6ef5695..e38b36c6e 100644 --- a/tests/engine/kiwi/serialize-fixes/auto-layout-transforms.test.ts +++ b/tests/engine/kiwi/serialize-fixes/auto-layout/transforms.test.ts @@ -4,7 +4,7 @@ import { SceneGraph, sceneNodeToKiwi } from '@open-pencil/core' import { expectDefined, getNodeOrThrow } from '#tests/helpers/assert' -import { ROOT_GUID, pageId } from './helpers' +import { ROOT_GUID, pageId } from '../helpers' describe('Fix 1: auto-layout child transforms', () => { test('auto-layout child gets zero transform regardless of its x/y', () => { diff --git a/tests/engine/kiwi/serialize-fixes/borders-take-space.test.ts b/tests/engine/kiwi/serialize-fixes/borders/take-space.test.ts similarity index 97% rename from tests/engine/kiwi/serialize-fixes/borders-take-space.test.ts rename to tests/engine/kiwi/serialize-fixes/borders/take-space.test.ts index ff5a0717d..e06883018 100644 --- a/tests/engine/kiwi/serialize-fixes/borders-take-space.test.ts +++ b/tests/engine/kiwi/serialize-fixes/borders/take-space.test.ts @@ -2,7 +2,7 @@ import { describe, expect, test } from 'bun:test' import { SceneGraph } from '@open-pencil/core' -import { pageId, toKiwi } from './helpers' +import { pageId, toKiwi } from '../helpers' describe('Fix 3: bordersTakeSpace serialization', () => { test('auto-layout frame with strokesIncludedInLayout=true gets bordersTakeSpace=true', () => { diff --git a/tests/engine/kiwi/serialize-fixes/font-family.test.ts b/tests/engine/kiwi/serialize-fixes/font/family.test.ts similarity index 98% rename from tests/engine/kiwi/serialize-fixes/font-family.test.ts rename to tests/engine/kiwi/serialize-fixes/font/family.test.ts index 77c5d17b4..0f9159a39 100644 --- a/tests/engine/kiwi/serialize-fixes/font-family.test.ts +++ b/tests/engine/kiwi/serialize-fixes/font/family.test.ts @@ -4,7 +4,7 @@ import { exportFigFile, parseFigFile, SceneGraph } from '@open-pencil/core' import { expectDefined } from '#tests/helpers/assert' -import { pageId, toKiwi } from './helpers' +import { pageId, toKiwi } from '../helpers' describe('Fix 5: font family normalization in derivedTextData', () => { test('optical size suffix stripped in roundtrip', async () => { diff --git a/tests/engine/kiwi/serialize-fixes/frame-mask.test.ts b/tests/engine/kiwi/serialize-fixes/frame/mask.test.ts similarity index 98% rename from tests/engine/kiwi/serialize-fixes/frame-mask.test.ts rename to tests/engine/kiwi/serialize-fixes/frame/mask.test.ts index e7ca73f14..2732fecbc 100644 --- a/tests/engine/kiwi/serialize-fixes/frame-mask.test.ts +++ b/tests/engine/kiwi/serialize-fixes/frame/mask.test.ts @@ -4,7 +4,7 @@ import { exportFigFile, parseFigFile, SceneGraph } from '@open-pencil/core' import { expectDefined } from '#tests/helpers/assert' -import { pageId, toKiwi } from './helpers' +import { pageId, toKiwi } from '../helpers' describe('Fix 2: frameMaskDisabled is inverse of clipsContent', () => { test('FRAME without clipsContent gets frameMaskDisabled=true', () => { diff --git a/tests/engine/kiwi/serialize-fixes/line-height.test.ts b/tests/engine/kiwi/serialize-fixes/line/height.test.ts similarity index 98% rename from tests/engine/kiwi/serialize-fixes/line-height.test.ts rename to tests/engine/kiwi/serialize-fixes/line/height.test.ts index b378b9c96..aafbaa4a0 100644 --- a/tests/engine/kiwi/serialize-fixes/line-height.test.ts +++ b/tests/engine/kiwi/serialize-fixes/line/height.test.ts @@ -4,7 +4,7 @@ import { exportFigFile, parseFigFile, SceneGraph } from '@open-pencil/core' import { expectDefined } from '#tests/helpers/assert' -import { pageId, toKiwi } from './helpers' +import { pageId, toKiwi } from '../helpers' describe('Fix 4: text lineHeight serialization', () => { test('text node with explicit lineHeight uses that value', () => { diff --git a/tests/engine/layout/auto-layout/absolute-children-in-yoga-tree.test.ts b/tests/engine/layout/auto-layout/absolute/children-in-yoga-tree.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/absolute-children-in-yoga-tree.test.ts rename to tests/engine/layout/auto-layout/absolute/children-in-yoga-tree.test.ts diff --git a/tests/engine/layout/auto-layout/absolute-positioning.test.ts b/tests/engine/layout/auto-layout/absolute/positioning.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/absolute-positioning.test.ts rename to tests/engine/layout/auto-layout/absolute/positioning.test.ts diff --git a/tests/engine/layout/auto-layout/alignment-counter-axis.test.ts b/tests/engine/layout/auto-layout/alignment/counter-axis.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/alignment-counter-axis.test.ts rename to tests/engine/layout/auto-layout/alignment/counter-axis.test.ts diff --git a/tests/engine/layout/auto-layout/alignment-primary-axis.test.ts b/tests/engine/layout/auto-layout/alignment/primary-axis.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/alignment-primary-axis.test.ts rename to tests/engine/layout/auto-layout/alignment/primary-axis.test.ts diff --git a/tests/engine/layout/auto-layout/counter-axis-align-content.test.ts b/tests/engine/layout/auto-layout/counter-axis/align-content.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/counter-axis-align-content.test.ts rename to tests/engine/layout/auto-layout/counter-axis/align-content.test.ts diff --git a/tests/engine/layout/auto-layout/counter-axis-spacing-no-wrap.test.ts b/tests/engine/layout/auto-layout/counter-axis/spacing-no-wrap.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/counter-axis-spacing-no-wrap.test.ts rename to tests/engine/layout/auto-layout/counter-axis/spacing-no-wrap.test.ts diff --git a/tests/engine/layout/auto-layout/fill-flex-basis.test.ts b/tests/engine/layout/auto-layout/fill/flex-basis.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/fill-flex-basis.test.ts rename to tests/engine/layout/auto-layout/fill/flex-basis.test.ts diff --git a/tests/engine/layout/auto-layout/gap-mapping-correctness.test.ts b/tests/engine/layout/auto-layout/gap/mapping-correctness.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/gap-mapping-correctness.test.ts rename to tests/engine/layout/auto-layout/gap/mapping-correctness.test.ts diff --git a/tests/engine/layout/auto-layout/hidden-children.test.ts b/tests/engine/layout/auto-layout/hidden-children/basic.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/hidden-children.test.ts rename to tests/engine/layout/auto-layout/hidden-children/basic.test.ts diff --git a/tests/engine/layout/auto-layout/hidden-children-preserve-dimensions.test.ts b/tests/engine/layout/auto-layout/hidden-children/preserve-dimensions.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/hidden-children-preserve-dimensions.test.ts rename to tests/engine/layout/auto-layout/hidden-children/preserve-dimensions.test.ts diff --git a/tests/engine/layout/auto-layout/horizontal-basic.test.ts b/tests/engine/layout/auto-layout/horizontal/basic.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/horizontal-basic.test.ts rename to tests/engine/layout/auto-layout/horizontal/basic.test.ts diff --git a/tests/engine/layout/auto-layout/layout-align-self-extended-values.test.ts b/tests/engine/layout/auto-layout/layout-align-self/extended-values.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/layout-align-self-extended-values.test.ts rename to tests/engine/layout/auto-layout/layout-align-self/extended-values.test.ts diff --git a/tests/engine/layout/auto-layout/layout-mode-none.test.ts b/tests/engine/layout/auto-layout/layout/mode-none.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/layout-mode-none.test.ts rename to tests/engine/layout/auto-layout/layout/mode-none.test.ts diff --git a/tests/engine/layout/auto-layout/min-max-constraints.test.ts b/tests/engine/layout/auto-layout/min-max/constraints.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/min-max-constraints.test.ts rename to tests/engine/layout/auto-layout/min-max/constraints.test.ts diff --git a/tests/engine/layout/auto-layout/mixed-sizing.test.ts b/tests/engine/layout/auto-layout/mixed/sizing.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/mixed-sizing.test.ts rename to tests/engine/layout/auto-layout/mixed/sizing.test.ts diff --git a/tests/engine/layout/auto-layout/nested-auto-layout.test.ts b/tests/engine/layout/auto-layout/nested/basic.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/nested-auto-layout.test.ts rename to tests/engine/layout/auto-layout/nested/basic.test.ts diff --git a/tests/engine/layout/auto-layout/nested-auto-layout-with-fill-children.test.ts b/tests/engine/layout/auto-layout/nested/fill-children.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/nested-auto-layout-with-fill-children.test.ts rename to tests/engine/layout/auto-layout/nested/fill-children.test.ts diff --git a/tests/engine/layout/auto-layout/self-alignment.test.ts b/tests/engine/layout/auto-layout/self/alignment.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/self-alignment.test.ts rename to tests/engine/layout/auto-layout/self/alignment.test.ts diff --git a/tests/engine/layout/auto-layout/sizing-modes.test.ts b/tests/engine/layout/auto-layout/sizing/modes.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/sizing-modes.test.ts rename to tests/engine/layout/auto-layout/sizing/modes.test.ts diff --git a/tests/engine/layout/auto-layout/text-measurement.test.ts b/tests/engine/layout/auto-layout/text/measurement.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/text-measurement.test.ts rename to tests/engine/layout/auto-layout/text/measurement.test.ts diff --git a/tests/engine/layout/auto-layout/vertical-basic.test.ts b/tests/engine/layout/auto-layout/vertical/basic.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/vertical-basic.test.ts rename to tests/engine/layout/auto-layout/vertical/basic.test.ts diff --git a/tests/engine/layout/auto-layout/wrap-layout.test.ts b/tests/engine/layout/auto-layout/wrap/layout.test.ts similarity index 100% rename from tests/engine/layout/auto-layout/wrap-layout.test.ts rename to tests/engine/layout/auto-layout/wrap/layout.test.ts