[art] GardenerLayers: The gardener in layered parts, painted over one guide in register, checked on accept
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { readFileSync, readdirSync } from 'node:fs';
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { boardData } from '../src/board.js';
|
||||
import { expandLayers } from '../src/manifest.js';
|
||||
import { placeholders } from '../src/placeholders.js';
|
||||
import { clone, readManifest, readStyle, root } from './fixtures.js';
|
||||
|
||||
@@ -19,7 +20,7 @@ describe('the board data', () => {
|
||||
for (const c of a.cells ?? []) expect(c).toMatchObject({ id: expect.any(String), width: expect.any(Number), height: expect.any(Number), prompt: expect.any(String) });
|
||||
}
|
||||
}
|
||||
expect(data.checklist).toHaveLength(12);
|
||||
expect(data.checklist).toHaveLength(13);
|
||||
expect(data.assets.every((a) => Number.isInteger(a.phase))).toBe(true);
|
||||
});
|
||||
|
||||
@@ -44,10 +45,12 @@ describe('the board data', () => {
|
||||
});
|
||||
|
||||
describe('the stand-ins', () => {
|
||||
it('one for every picture and every cell, at its own size', () => {
|
||||
const ids = manifest.assets.flatMap((a) => [a.id, ...(a.cells ?? []).map((c) => c.id)]);
|
||||
it('one for every picture and every cell, at its own size; a layer has one for its sheet only', () => {
|
||||
const all = expandLayers(manifest).assets;
|
||||
const ids = all.flatMap((a) => (a.over ? [a.id] : [a.id, ...(a.cells ?? []).map((c) => c.id)]));
|
||||
expect([...stand.keys()].sort()).toEqual([...ids].sort());
|
||||
for (const a of manifest.assets) expect(stand.get(a.id)).toContain(`viewBox="0 0 ${a.width} ${a.height}"`);
|
||||
expect(stand.has('gardener-hair-braids-brown-pour')).toBe(false);
|
||||
for (const a of all) expect(stand.get(a.id)).toContain(`viewBox="0 0 ${a.width} ${a.height}"`);
|
||||
expect(stand.get('rose-bud')).toContain('viewBox="0 0 384 1024"');
|
||||
expect(stand.get('watering-can')).toContain('viewBox="0 0 512 512"');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user