mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
📎 Label the plugin's random programs fill and opacity smoke coverage
The plugin suite's random case said every settled step retains authored values, but its programs check only fills and opacity against their own model: resizes and turns carry no geometry assertions, and no step undoes, swaps, switches variants, edits text or checks touched groups. The case is now `RandomFillOpacitySmoke` and says so, pointing to the generated programs of common and their frontend and WASM replays for the rest. Harness only; the benchmark is not run. AI-assisted-by: claude-opus-5-5
This commit is contained in:
parent
1b6b9c7c75
commit
e0d5912c0a
@ -4,9 +4,13 @@ import { OpRandomSequence } from "../operations/OpRandomSequence.ts";
|
||||
|
||||
export function createTestCaseRandomCompositions(): TestCase {
|
||||
return new TestCase(
|
||||
"RandomCompositions",
|
||||
"Two nested components and their copies receive seeded edits, resets, duplication, detachment " +
|
||||
"and transforms. Every settled step must retain authored values and follow untouched main values.",
|
||||
"RandomFillOpacitySmoke",
|
||||
"Smoke coverage of fills and opacity through the Plugin API: two nested components and their copies " +
|
||||
"receive seeded fill and opacity edits, resets, duplication, detachment, resizes and turns. Each " +
|
||||
"settled step checks only fills and opacity against an independent override model; resizes and " +
|
||||
"turns carry no geometry assertions, and no step undoes, swaps, switches variants, edits text or " +
|
||||
"checks touched groups. The generated programs of common and their frontend and WASM replays " +
|
||||
"cover those.",
|
||||
new OpOneOf(new OpRandomSequence(712), new OpRandomSequence(20261022), new OpRandomSequence(1792691))
|
||||
);
|
||||
}
|
||||
|
||||
@ -21,7 +21,10 @@ function subtree(shape: Shape): Shape[] {
|
||||
return [shape, ...children(shape).flatMap(subtree)];
|
||||
}
|
||||
|
||||
/** Random edits through the real Plugin API, with an independent value model. */
|
||||
/**
|
||||
* Smoke coverage of fills and opacity: seeded edits through the real Plugin
|
||||
* API, checked against an independent model of those two fields only.
|
||||
*/
|
||||
export class OpRandomSequence extends Operation {
|
||||
constructor(
|
||||
readonly seed: number,
|
||||
@ -173,6 +176,6 @@ export class OpRandomSequence extends Operation {
|
||||
}
|
||||
|
||||
toString(): string {
|
||||
return `random component program, seed ${this.seed}`;
|
||||
return `random fill/opacity smoke program, seed ${this.seed}`;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user