check:poster-section: add arm G (a phone blocks a desktop-only large sheet via the type)

Renamed from F to avoid colliding with the pilot's show-header arm F. A phone +
a non-withheld desktop-only large sheet via countryPosterType rejects
poster.phoneLimitAll (records) and reads it (unsupported); poison-proven by
neutralising phoneBlocked.
This commit is contained in:
Doxa Maps 2026-10-02 15:58:29 +00:00
parent 557f6e3678
commit b98e6b096a

View file

@ -101,6 +101,22 @@ async function arms({ types, country, element, sectionSrc, viewSrc, cs }) {
const local = new Set(['sec', 'z', 'item', 'n', 's', 'v', 'el', 'true', 'false', 'null', 'String', 'Number', '$event', 'in', 'label', 'zIndex'])
const missing = [...used].filter((x) => !local.has(x) && !injected.has(x))
if (missing.length) fails.push(`E: PosterSection.vue uses names it does not inject: ${missing.join(', ')}`)
// G: a phone cannot print a desktop-only large sheet THROUGH THE TYPE — the same rule as country-poster-wall.vue,
// mirrored in countryPosterType so the delegating regions list and any <dxm-poster-section> block it too. The only
// desktop-only large sheet is India's (withheld today), so the fixture is a NON-withheld India (indiaState => not
// withheld => largeSheet.desktopOnly). POISON: drop the phone rule and records() resolves / unsupported() is null.
{
const savedNav = globalThis.navigator
globalThis.navigator = { userAgent: 'iPhone', maxTouchPoints: 0 }
try {
const act = country.actions({ assetsBase: () => '', apiBase: () => '', lang: () => 'en', profileConfig: null, t: (k) => k })
const bigIndia = { id: 'country-ind-x', iso3: 'IND', indiaState: true, label: 'India', count: 855 }
if (act.unsupported(bigIndia) !== 'poster.phoneLimitAll') fails.push(`G: on a phone, unsupported() of a desktop-only large sheet should read poster.phoneLimitAll, got ${JSON.stringify(act.unsupported(bigIndia))}`)
let why = ''
try { await act.records(bigIndia); why = 'resolved' } catch (e) { why = e && (e.i18nKey || e.message) }
if (why !== 'poster.phoneLimitAll') fails.push(`G: on a phone, records() of a desktop-only large sheet should reject poster.phoneLimitAll, got ${JSON.stringify(why)}`)
} finally { if (savedNav === undefined) delete globalThis.navigator; else globalThis.navigator = savedNav }
}
return fails
}
@ -136,7 +152,7 @@ try {
} else {
const f = await arms(real)
if (f.length) { f.forEach((x) => console.log('FAIL ' + x)); code = 1 }
else console.log(`PASS check:poster-section — the 'country' type; ${DXL.length} DX Life scopes cover every country once (and their other spellings); India withheld by default; the element's attributes; PosterSection injects every name it uses`)
else console.log(`PASS check:poster-section — the 'country' type; ${DXL.length} DX Life scopes cover every country once (and their other spellings); India withheld by default; a phone blocks a desktop-only large sheet (poster.phoneLimitAll); the element's attributes; PosterSection injects every name it uses`)
}
} finally { await server.close() }
process.exit(code)