SOURCE / PINNED RELEASE
Made of little things.
Funclet
- Release
- 0b497cfc2f66…
- Author-recorded commit
- 1e531b24f490…
- License
- LICENSE
- Author’s source reference
- nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-6b7a37cac1d
Archive hash verified: 71d97a89ed8c40c2…. The source-to-build association is the author’s claim; it has not been independently rebuilt.
// Live shell controls and storage; start soyli dev and pass its printed URL.
import assert from 'node:assert/strict';
import { realpathSync } from 'node:fs';
import { createRequire } from 'node:module';
import { execFileSync } from 'node:child_process';
const url=process.argv[2];
assert.ok(url?.startsWith('http://127.0.0.1:'));
const require=createRequire(`${realpathSync('node_modules/@napplet/conformance-cli')}/package.json`);
const {chromium}=require('playwright');
const executables=JSON.parse(execFileSync('soyli',['browser','path','--json'],{encoding:'utf8'})).executables;
const browser=await chromium.launch({executablePath:executables.find(x=>x.installed&&x.name.startsWith('chromium')).path});
try {
const page=await browser.newPage({viewport:{width:1220,height:950}});
await page.goto(url);
const frame=page.frameLocator('iframe').first();
await frame.locator('.station-row').first().waitFor({timeout:30000});
const domains=await frame.locator('body').evaluate(()=>Object.keys(window.napplet));
assert.ok(domains.includes('storage'));assert.ok(domains.includes('media'));
await frame.locator('#search').fill('Omarchy');await frame.locator('#search').press('Enter');
await frame.getByRole('button',{name:'Listen to Omarchy Radio',exact:true}).waitFor({timeout:30000});
if ((await frame.locator('#playback-label').textContent()) !== 'ON AIR' || !(await frame.locator('.detail-name').textContent()).includes('Omarchy Radio'))
await frame.getByRole('button',{name:'Listen to Omarchy Radio',exact:true}).click();
await frame.locator('#playback-label').filter({hasText:'ON AIR'}).waitFor({timeout:30000});
const permission=page.getByRole('button',{name:'Connect',exact:true});
if(await permission.isVisible())await permission.click();
await frame.locator('#volume').fill('35');await frame.locator('#volume').dispatchEvent('input');
await frame.locator('#volume').hover();await page.mouse.wheel(0,-100);
await frame.locator('body').evaluate(()=>{});
await page.waitForTimeout(500);
assert.equal(await frame.locator('#volume').inputValue(),'40');
await page.mouse.wheel(0,100);await page.waitForTimeout(500);
assert.equal(await frame.locator('#volume').inputValue(),'35');
await page.reload();
await frame.locator('#playback-label').filter({hasText:'ON AIR'}).waitFor({timeout:30000});
await page.waitForTimeout(500);
assert.equal(await frame.locator('#volume').inputValue(),'35');
assert.match(await frame.locator('.detail-name').textContent(),/Omarchy Radio/);
console.log('PASS: live iframe, injected MEDIA/STORAGE, native wheel, and station/volume restored after reload');
} finally {await browser.close();}
