mirror of
https://github.com/penpot/penpot.git
synced 2026-10-30 22:40:33 +00:00
Expand generated component coverage with independent library histories, meaningful mutation counts, varied geometry and variants, all text style units, oracle corruption controls and pending-sync frontend replays. Fix reflected descendants, partial size carry, WASM shape defaults, deferred swap and sidebar text undo, grid visibility, explicit typography ownership, metadata filtering and swapped placement through sync/detach. Recorded validation after F219: - Common JVM: 1,909 tests / 31,088 assertions; JS: 1,840 / 29,688. - Frontend: 1,560 tests / 10,821 assertions. - Backend: 1,610 tests / 8,104 assertions; exporter: 14 / 32. - Applicable lint and formatting pass; golden data stays unchanged. Benchmark ratios against the unchanged Phase 1e baseline: - Main edits into 10/100/1,000 copies: 0.52/0.57/0.58. - Three levels: 0.51; dependency chain: 0.52; library update: 0.58. - Many shapes: 0.42; variant switch: 0.62. No regression flags. This is a checkpoint. The fresh legacy-library gate at seed 712 fails at program 351 (F221); its cause remains unclassified. The other four large gates did not run. F220, F187, F214 and wider coverage remain open. AI-assisted-by: gpt-6
31 lines
1.3 KiB
Clojure
31 lines
1.3 KiB
Clojure
;; This Source Code Form is subject to the terms of the Mozilla Public
|
|
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
;;
|
|
;; Copyright (c) KALEIDOS SUBSIDIARY SL
|
|
|
|
(ns frontend-tests.render-wasm.shape-test
|
|
(:require
|
|
[app.common.test-helpers.composable.gen :as cg]
|
|
[app.common.types.shape :as cts]
|
|
[app.common.uuid :as uuid]
|
|
[app.render-wasm.shape :as shape]
|
|
[cljs.test :as t]))
|
|
|
|
(t/deftest fresh-proxies-keep-the-records-base-fields
|
|
(let [attrs {:id (uuid/next) :type :rect :name "Rect" :opacity 0.5}
|
|
expected (into {} (cts/map->Shape attrs))
|
|
actual (shape/create-shape attrs)]
|
|
(t/is (= expected (into {} actual)))
|
|
(doseq [attr [:rotation :flip-x :flip-y :transform :transform-inverse]]
|
|
(t/testing (name attr)
|
|
(t/is (contains? actual attr))
|
|
(t/is (= expected (into {} (dissoc (assoc actual attr true) attr))))))))
|
|
|
|
(t/deftest reflected-nested-proxies-undo-without-adding-flip-fields
|
|
(with-redefs [cts/wasm-enabled? true
|
|
cts/wasm-create-shape shape/create-shape]
|
|
(let [result (cg/run {:world [2 1 {:text true :layout :grid}]
|
|
:ops [[:nest 11] [:rotate 1] [:transform 2 16 0 18]]})]
|
|
(t/is (= 3 (count (:trace result)))))))
|