Back to Limb Race
SOURCE / PINNED RELEASE

Made of little things.

Limb Race

Release
6a8ae4fc626e…
Author-recorded commit
008c01ee6454…
License
LICENSE
Author’s source reference
nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-c2869f12ad8

Archive hash verified: 7be8492d1f89b891…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

tests/mobile-smoke.mjs
import { createRequire } from 'node:module';
import {realpathSync} from 'node:fs';
import assert from 'node:assert/strict';
const require=createRequire(realpathSync(new URL('../node_modules/@napplet/conformance-cli/package.json',import.meta.url)));
const {chromium}=require('playwright');
assert.ok(process.argv[2], 'Pass the URL printed by soyli dev');
const browser=await chromium.launch({headless:true});
try {
for(const [width,height] of [[390,844],[360,640],[844,390]]){
 const context=await browser.newContext({viewport:{width,height},isMobile:true,hasTouch:true,deviceScaleFactor:1});
 const page=await context.newPage(),errors=[];page.on('pageerror',e=>errors.push(e.message));await page.goto(process.argv[2]);await page.waitForTimeout(1800);
 const f=page.frames().find(f=>f.url()==='about:srcdoc');assert.ok(f);
 await page.locator('iframe').evaluate((el,{width,height})=>{el.style.cssText=`position:fixed;inset:0;width:${width}px;height:${height}px;min-height:0;border:0;z-index:9999`;},{width,height});
 await page.waitForTimeout(100);assert.deepEqual(await f.evaluate(()=>[innerWidth,innerHeight]),[width,height]);
 assert.equal(await f.evaluate(()=>matchMedia('(pointer:coarse)').matches),true);
 await f.locator('[data-preset="runner"]').tap();
 await f.locator('#live').tap();await f.locator('#race').tap();await page.waitForTimeout(250);
 await f.locator('#clear').tap();
 const box=await f.locator('#draw-canvas').boundingBox();
 const cdp=await context.newCDPSession(page);
 const x=box.x+box.width/2,y=box.y+box.height/2;
 await cdp.send('Input.dispatchTouchEvent',{type:'touchStart',touchPoints:[{x,y}]});
 for(let i=1;i<=8;i++)await cdp.send('Input.dispatchTouchEvent',{type:'touchMove',touchPoints:[{x:x+i*4,y:y+i*3}]});
 await cdp.send('Input.dispatchTouchEvent',{type:'touchEnd',touchPoints:[]});
 assert.match(await f.locator('#ink-count').innerText(),/^1/);
 await f.locator('#pause').tap();const time=await f.locator('#time').innerText();await page.waitForTimeout(200);assert.equal(await f.locator('#time').innerText(),time);
 await f.locator('#message-action').tap();await f.locator('[data-preset="runner"]').tap();
 await page.waitForTimeout(650);
 if(width===390)await f.locator('body').screenshot({path:'.napplet-space/promotion/portrait.png'});
 await f.locator('#restart').tap();await f.locator('#track-picker').tap();await f.locator('.track-option').nth(1).tap();assert.equal(await f.locator('#track-name').innerText(),'Step It Up');
 await f.locator('#track-picker').tap();assert.equal(await f.locator('.track-option').evaluateAll(items=>items.every(item=>{const row=item.getBoundingClientRect(),badge=item.querySelector('.difficulty').getBoundingClientRect();return badge.top>=row.top&&badge.bottom<=row.bottom;})),true);await f.locator('[data-track="gauntlet"]').tap();assert.equal(await f.locator('#track-name').innerText(),'The Gauntlet');assert.equal(await f.locator('#track-number').innerText(),'10 / 10');
 const layout=await f.evaluate(()=>({overflow:document.documentElement.scrollWidth>innerWidth,button:document.querySelector('#race').getBoundingClientRect().toJSON(),pad:document.querySelector('#draw-canvas').getBoundingClientRect().toJSON()}));
 assert.equal(layout.overflow,false);assert.ok(layout.button.y+layout.button.height<=height);assert.ok(layout.pad.height>=55);assert.deepEqual(errors,[]);
 await f.locator('#track-picker').tap();await f.locator('#create-level').tap();await f.getByRole('button',{name:'+ Step up',exact:true}).tap();assert.equal(await f.locator('.piece-chip').count(),4);await f.locator('#piece-left').tap();await f.locator('#save-level').tap();await f.locator('#level-status').filter({hasText:'Draft saved'}).waitFor();
 if(width===390)await f.locator('body').screenshot({path:'.napplet-space/promotion/editor-touch-portrait.png'});
 await f.locator('#test-level').tap();await f.locator('#track-number').filter({hasText:'CUSTOM'}).waitFor();await f.locator('#race').tap();await page.waitForTimeout(300);await f.locator('#pause').tap();assert.deepEqual(errors,[]);
 console.log('TOUCH OK',width,height,JSON.stringify(layout));await context.close();
}
} finally { await browser.close(); }