Loading files
442335385This file is pinned to the selected release. Download the original to open it in your design tool.
import {test} from 'node:test';import assert from 'node:assert/strict';import {chromium,preview} from './helpers.mjs';
test('Signal: actual build metrics, log filter, configuration, pins and firmware download',{skip:!process.env.FIRMWARE_QA_WORKSPACE},async()=>{
const browser=await(await chromium()).launch({headless:true}),p=await preview(browser,process.env.FIRMWARE_QA_WORKSPACE,{file:'build-status.html'});
try{const f=await p.open();assert.match(await f.locator('#flash-detail').textContent(),/269,?197/);assert.match(await f.locator('#ram-detail').textContent(),/21,?464/);await f.locator('#filter').fill('not-present-log-line');assert.equal(await f.locator('#log').textContent(),'No log lines match.');await f.locator('#tab-config').click();assert.match(await f.locator('#config').textContent(),/espressif32@6.10.0/);await f.locator('#tab-pins').click();assert.ok((await f.locator('#pins').textContent()).length>10);await f.locator('#tab-log').click();await f.locator('#filter').fill('');const download=p.page.waitForEvent('download');await f.locator('#artifacts a').first().click();assert.ok((await download).suggestedFilename().length>0);await f.locator('body').evaluate(()=>window.scrollTo(0,0));await p.screenshot('firmware-studio-desktop');await p.page.setViewportSize({width:390,height:844});assert.equal(await f.locator('body').evaluate(()=>document.documentElement.scrollWidth<=innerWidth),true);await f.locator('body').evaluate(()=>window.scrollTo(0,0));await p.screenshot('firmware-studio-mobile');assert.deepEqual(p.errors,[]);}finally{await p.close();await browser.close();}
});