Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

test(view): the hosted list wait names what the page showed [N26]

Corey Olson25bc1ae59c05
diff --git a/test/cockpit/local-origin.test.js b/test/cockpit/local-origin.test.js
index 242285d5..5bbb28b6 100644
--- a/test/cockpit/local-origin.test.js
+++ b/test/cockpit/local-origin.test.js
@@ -814,7 +814,18 @@ test('every hosted page state says what it is and what to do next [N26,H5]', { t
stand.local = view.base;
await chrome.send('Page.navigate', { url: HOSTED + '/?list' });
// The opened item's detail is its own round trip after the list (#834): until it lands, #detail says Loading and has no actions.
- await chrome.waitFor("location.origin === 'https://app.pullboard.dev' && document.querySelector('#chain')?.textContent.includes('A board the hosted page lists') && document.querySelectorAll('#detail button[data-shout], #detail button[data-new]').length === 2", 30_000); // budget: hang ceiling for the discovery, one round trip, the first board read and the opened item's detail.
+ try {
+ await chrome.waitFor("location.origin === 'https://app.pullboard.dev' && document.querySelector('#chain')?.textContent.includes('A board the hosted page lists') && document.querySelectorAll('#detail button[data-shout], #detail button[data-new]').length === 2", 30_000); // budget: hang ceiling for the discovery, one round trip, the first board read and the opened item's detail.
+ } catch (error) {
+ // Linux CI only (#873, not reproduced locally): name which part of the condition the page never met.
+ try {
+ error.message += '; the page showed ' + await chrome.stable(`JSON.stringify({ origin: location.origin, board: (document.querySelector('#chain')?.textContent || '').includes('A board the hosted page lists'),
+ buttons: document.querySelectorAll('#detail button[data-shout], #detail button[data-new]').length, detailShown: Boolean(document.querySelector('#detail')?.getClientRects().length),
+ detail: (document.querySelector('#detail')?.textContent || '').trim().slice(0, 80), item: view.item ?? null, tab: view.tab ?? null, session: Boolean(localSession), confirmed: localConfirmed,
+ note: document.querySelector('#local-note')?.hidden ? null : document.querySelector('#local-note')?.dataset.state ?? null, rows: document.querySelectorAll('#chain .row').length, width: innerWidth })`);
+ } catch { /* The original wait failure stays the result. */ }
+ throw error;
+ }
const list = JSON.parse(await chrome.stable(`JSON.stringify({ note: document.querySelector('#local-note').hidden, side: document.querySelector('.side').getClientRects().length > 0, heading: document.querySelector('#proj-list .proj.on .pname')?.textContent, source: document.querySelector('#proj-list .proj.on .src')?.textContent, tab: document.querySelector('.tab.on')?.textContent, step: document.querySelector('#new-item').getClientRects().length > 0, state: JSON.parse(${shown}) })`));
// Normal-list next actions use the view styles at both sizes and in both themes (outside review 950).
for (const width of [390, 1280]) {