Strengthen shell behavior tests and profile toolbox loading
All checks were successful
Deploy Sokko G / deploy (push) Successful in 18s

This commit is contained in:
Shinuwa 2026-09-12 13:15:42 +02:00
parent a9b68a5712
commit b53c7c17c8
8 changed files with 323 additions and 61 deletions

View file

@ -34,7 +34,6 @@ test("toolbox storage, cards and pages are wired", async () => {
const guidedTooltipTour = await readFile("website/src/components/GuidedTooltipTour.jsx", "utf8");
const reorderHook = await readFile("website/src/hooks/usePointerReorder.js", "utf8");
const groupedReorderHook = await readFile("website/src/hooks/useGroupedReorder.js", "utf8");
const inlineEditHook = await readFile("website/src/hooks/useInlineEdit.js", "utf8");
const draftFormHook = await readFile("website/src/hooks/useDraftForm.js", "utf8");
assert.match(`${indexedToolboxesHook}\n${toolboxPages}`, /indexedDbStorage\.js/);
@ -124,15 +123,9 @@ test("toolbox storage, cards and pages are wired", async () => {
assert.match(toolboxPages, /setDrawerGameId\(""\)/);
assert.match(toolboxPages, /moduleColumns/);
assert.match(toolboxPages, /normalizeCombosData/);
assert.match(toolboxPages, /function ToolboxView/);
assert.match(toolboxPages, /GuidedTooltipTour/);
assert.match(toolboxPages, /data-toolbox-tutorial-target/);
assert.match(guidedTooltipTour, /document\.querySelector/);
assert.match(guidedTooltipTour, /--tutorial-arrow-left/);
assert.match(guidedTooltipTour, /--tutorial-arrow-top/);
assert.match(guidedTooltipTour, /data-placement/);
assert.match(toolboxPages, /toolbox\.tutorial === true/);
assert.match(toolboxPages, /tutorial: false/);
assert.doesNotMatch(toolboxPages, /usePointerReorder/);
assert.match(storageQuota, /export function StorageQuota/);
assert.match(storageQuota, /role="progressbar"/);
@ -148,20 +141,13 @@ test("toolbox storage, cards and pages are wired", async () => {
assert.match(groupedReorderHook, /export function applyGroupedReorderOperation/);
assert.match(groupedReorderHook, /data-reorder-orientation/);
assert.match(groupedReorderHook, /operation\.sourceParentId === operation\.targetParentId/);
assert.match(inlineEditHook, /export function useInlineEdit/);
assert.match(inlineEditHook, /skipCommitRef/);
assert.match(inlineEditHook, /blurOnEscape/);
assert.match(inlineEditHook, /commitOnEnter/);
assert.match(inlineEditHook, /getContentEditableProps/);
assert.match(draftFormHook, /export function useDraftForm/);
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/);
});