Add custom toolbox card covers
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s
This commit is contained in:
parent
25889a23ba
commit
06de3a3a6e
13 changed files with 7480 additions and 38 deletions
|
|
@ -19,6 +19,7 @@ test("toolbox storage, cards and pages are wired", async () => {
|
|||
const source = await readFile("website/src/main.jsx", "utf8");
|
||||
const toolboxCard = await readFile("website/src/features/toolboxes/ToolboxCard.jsx", "utf8");
|
||||
const toolboxPages = await readFile("website/src/features/toolboxes/ToolboxPages.jsx", "utf8");
|
||||
const toolboxCoverEditor = await readFile("website/src/features/toolboxes/ToolboxCoverEditor.jsx", "utf8");
|
||||
const toolboxActions = await readFile("website/src/features/toolboxes/useToolboxActions.js", "utf8");
|
||||
const toolboxStorage = await readFile("website/src/features/toolboxes/storage/toolboxStorage.js", "utf8");
|
||||
const storageCompactorRegistry = await readFile("website/src/features/toolboxes/storage/modules/index.js", "utf8");
|
||||
|
|
@ -55,6 +56,9 @@ test("toolbox storage, cards and pages are wired", async () => {
|
|||
assert.match(`${source}\n${toolboxActions}`, /features\/toolboxes\/storage\/toolboxStorage\.js/);
|
||||
assert.match(toolboxStorage, /TOOLBOX_ICON_FILES/);
|
||||
assert.match(toolboxStorage, /export function normalizeToolboxIcon/);
|
||||
assert.match(toolboxStorage, /export function normalizeToolboxCustomCover/);
|
||||
assert.match(toolboxStorage, /customCover: normalizeToolboxCustomCover/);
|
||||
assert.match(toolboxStorage, /compact\.customCover = normalized\.customCover/);
|
||||
assert.match(toolboxStorage, /export function createGlobalExportPayload/);
|
||||
assert.match(checklistStorage, /qtyTarget/);
|
||||
assert.match(checklistStorage, /qtyCurrent/);
|
||||
|
|
@ -84,6 +88,19 @@ test("toolbox storage, cards and pages are wired", async () => {
|
|||
assert.match(calendarStorage, /normalizeCalendarData/);
|
||||
assert.match(toolboxStorage, /nextId\("calendar"\)/);
|
||||
assert.match(toolboxCard, /DEFAULT_TOOLBOX_ICON/);
|
||||
assert.match(toolboxCard, /toolbox\.customCover/);
|
||||
assert.match(toolboxCard, /customCoverImage = !gameCoverImage/);
|
||||
assert.match(toolboxCard, /triggerImage = toolbox\.customCover \|\| icon/);
|
||||
assert.match(toolboxCard, /has-custom-cover/);
|
||||
assert.match(toolboxCard, /toolbox-cover-menu-action nds-button/);
|
||||
assert.match(toolboxCard, /!toolbox\.customCover && path === icon/);
|
||||
assert.match(toolboxCard, /aria-pressed=\{Boolean\(toolbox\.customCover\)\}/);
|
||||
assert.match(toolboxCard, /<span>Image personnalisée<\/span>/);
|
||||
assert.match(toolboxCard, /onChange\(path, ""\)/);
|
||||
assert.match(toolboxCard, /ToolboxCoverEditor/);
|
||||
assert.match(toolboxCard, /accept="image\/\*"/);
|
||||
assert.doesNotMatch(toolboxCard, /Modifier l'image de card/);
|
||||
assert.doesNotMatch(toolboxCoverEditor, /Supprimer l'image/);
|
||||
assert.match(toolboxCard, /export function ToolboxCard/);
|
||||
assert.match(toolboxCard, /export function ToolboxIconPicker/);
|
||||
assert.match(toolboxCard, /export function ToolboxGameIcon/);
|
||||
|
|
@ -92,6 +109,7 @@ test("toolbox storage, cards and pages are wired", async () => {
|
|||
assert.match(toolboxCard, /toolbox-card-cover-link/);
|
||||
assert.match(toolboxCard, /toolbox-icon-cover/);
|
||||
assert.match(toolboxPages, /\.\/ToolboxCard\.jsx/);
|
||||
assert.match(toolboxPages, /customCover = toolbox\.customCover/);
|
||||
assert.match(toolboxPages, /updateToolboxOrder/);
|
||||
assert.match(toolboxPages, /useGroupedReorder/);
|
||||
assert.match(toolboxPages, /useInlineEdit/);
|
||||
|
|
@ -141,6 +159,12 @@ test("toolbox storage, cards and pages are wired", async () => {
|
|||
assert.match(draftFormHook, /getFieldProps/);
|
||||
assert.match(draftFormHook, /handleSubmit/);
|
||||
assert.match(draftFormHook, /preventDefault/);
|
||||
assert.match(toolboxCoverEditor, /createImageBitmap/);
|
||||
assert.match(toolboxCoverEditor, /image\/webp/);
|
||||
assert.match(toolboxCoverEditor, /OUTPUT_WIDTH = 620/);
|
||||
assert.match(toolboxCoverEditor, /OUTPUT_HEIGHT = 248/);
|
||||
assert.match(toolboxCoverEditor, /getCoverCropSourceRect/);
|
||||
assert.doesNotMatch(toolboxCoverEditor, /react-easy-crop|react-image-crop/);
|
||||
});
|
||||
|
||||
test("toolbox module registry and modules expose expected behavior", async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue