20 lines
3.9 KiB
JavaScript
20 lines
3.9 KiB
JavaScript
'use strict';
|
|
const {assert,app,css,html,read,functionSource,buildMeta}=require('./helpers/app-source');
|
|
const catalog=JSON.parse(read('store-catalog.json')),server=read('server.js'),realtime=read('realtime-server.js');
|
|
assert(buildMeta.APP_VERSION==='48.0'&&buildMeta.PACKAGE_VERSION==='48.0.0','v47.87 canonical version marker is missing');
|
|
const aurora=catalog.find(item=>item.id==='line-effect-aurora');
|
|
assert(aurora?.lineColor==='#5fd8ff'&&aurora.aurora===true&&!('lineEffect'in aurora),'Aurora is not a shop-only line-color contract');
|
|
assert(app.includes('AURORA_COLOR_INTERVAL=2000')&&app.includes("AURORA_RGB_PALETTE=Object.freeze(['79 235 255'")&&functionSource('nextAuroraRgb').includes('auroraPaletteIndex=(auroraPaletteIndex+1)%AURORA_RGB_PALETTE.length'),'Aurora palette timing or deterministic selection is missing');
|
|
const boardRender=functionSource('renderBoardNow');
|
|
assert(boardRender.includes("activeLineColorItem()?.aurora===true")&&boardRender.includes("classList.toggle('line-effect-aurora',auroraGate)")&&css.includes('.gate-dot.line-effect-aurora')&&css.includes('.gate-marker.line-effect-aurora'),'Equipped Aurora does not color usable gates');
|
|
assert(functionSource('normalizeSnapshot').includes('clean.lineColorStyle=migratedLineColorStyle(raw)||clean.starterLineColor')&&functionSource('globalForStorage').includes('lineColorStyle:migratedLineColorStyle(source)')&&functionSource('applyGlobalRecordToData').includes('normalizeEquippedCosmeticsInPlace(data)'),'Equipped appearance is not durable across storage reload/merge');
|
|
assert(!app.includes('陳列は店ごとに異なります')&&!app.includes('便利な機能から6点を陳列しています。'),'Removed shop copy remains');
|
|
assert(css.includes('.store-wallet{display:inline-flex')&&css.includes('white-space:nowrap')&&css.includes('.store-wallet b{display:inline'),'Store gem balance can still wrap before its number');
|
|
assert(functionSource('drawPresenceLayer').includes('drawRemoteCursorGlyph(context,player,x,y)')&&functionSource('drawPresenceLayer').includes('drawRemotePlayerName(context,player,x,y)')&&!app.includes("viewport.addEventListener('pointerleave',hideRealtimeCursor"),'Nearby player cursor/name visibility is incomplete');
|
|
assert(css.includes('.inventory-use.selected{')&&functionSource('updateInventoryItemView').includes("classList.toggle('selected',pressed&&active)"),'Equipped inventory action has no distinct color');
|
|
assert(app.includes("const REACTION_EMOJIS=Object.freeze(['👍','🤩','🙏','🧠','🎉'])")&&realtime.includes("new Set(['👍','🤩','🙏','🧠','🎉'])")&&!app.includes("['👍','👉🏻'")&&!realtime.includes("['👍','👉🏻'"),'The pointing reaction was not replaced by star-struck');
|
|
for(const oldName of['巨大絵文字','絵文字レーザー','絵文字オービット','絵文字花火','絵文字彗星'])assert(!app.includes(oldName),`Legacy emoji-prefixed item name remains: ${oldName}`);
|
|
assert(!html.includes('debugAllItemsToggle')&&!app.includes('デバッグ使用可')&&app.includes("location.pathname.endsWith('/debug-items')")&&server.includes("pathname.endsWith('/debug-items')")&&functionSource('purchaseStoreItem').includes('if(!debug&&data.score<price)'),'Debug mode is not URL-only with normal purchasing');
|
|
assert(html.includes('id="fpsCounter"')&&functionSource('refreshFpsCounter').includes('FPS 待機')&&functionSource('refreshFpsCounter').includes('FPS ${fpsLastValue}'),'FPS label was not renamed');
|
|
assert(functionSource('publishReactionAt').includes('sendOrQueueRealtimeReaction(reaction)')&&functionSource('sendOrQueueRealtimeReaction').includes('pendingRealtimeReactionMessages')&&functionSource('flushPendingRealtimeReactions').includes('realtimeSend(payload)')&&functionSource('handleRealtimeMessage').includes('flushPendingRealtimeReactions()'),'Emoji reactions are not shared reliably with nearby players');
|
|
console.log('v47.87 requested cosmetics, persistence, debug URL, presence, and reaction sharing passed');
|