mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
fix(flights): address review — quotable squawk only, all military tint sites, no test churn
- aircraftEmergency: `source` is 'squawk' only when the Mode A code itself names the status; the Cockpit HUD no longer quotes an unrelated squawk (e.g. SQUAWK 1200 on an ADS-B `downed` status). - military: new billboards and the untrack restore use the fleet tint, so an emergency stays red instead of snapping back to amber; tint helpers take the record already in hand instead of a second lookup. - cockpit/cyber CSS: emergency colour via a custom property / theme token, meta line bolded so the status does not rely on colour alone in the HUD. - tests: revert Prettier churn in unscoped test files; only semantic edits. - docs/CURRENT-STATE.md: transponder emergency highlighting section. - qa-emergency-squawk: (iv) RELEASE check; new files added to format scope. Co-Authored-By: Claude <[email protected]>
This commit is contained in:
1 parent
eb7f059750
commit
15b13e947b
16 files changed
+543
-1600
No files matched your search
@@ -14,6 +14,8 @@
|
||||
* the broadcast code on the aircraft-meta line, in red.
|
||||
* (iii) CLEAR — the next poll drops the code: the HUD line returns to its
|
||||
* normal wording (the status is not sticky).
|
||||
* (iv) RELEASE — the code returns and tracking stops: the restored fleet
|
||||
* billboard is red, not the plain military amber.
|
||||
*
|
||||
* Screenshots saved to qa-shots/emergency-*.png (gitignored).
|
||||
*
|
||||
@@ -410,6 +412,31 @@ async function main() {
|
||||
JSON.stringify(after),
|
||||
);
|
||||
await shoot(page, 'cockpit-cleared');
|
||||
|
||||
// ── (iv) RELEASE ──────────────────────────────────────────────────────
|
||||
console.log('\n(iv) RELEASE — the code returns, then tracking stops...');
|
||||
await page.evaluate(async () => {
|
||||
window.__squawkQaPhase = 'emergency';
|
||||
const dm = window.__godsEyeView.dataManager;
|
||||
await dm.refreshLayer('military');
|
||||
dm.layers.get('military').module.stopTracking({ origin: 'user' });
|
||||
});
|
||||
const releaseProbe = `(${billboardColors})(["ae7700"])`;
|
||||
const released = await page
|
||||
.waitForFunction(`Boolean((${releaseProbe}).ae7700)`, {
|
||||
timeout: 20000,
|
||||
polling: 250,
|
||||
})
|
||||
.then(
|
||||
() => true,
|
||||
() => false,
|
||||
);
|
||||
const releasedColor = (await page.evaluate(releaseProbe)).ae7700;
|
||||
record(
|
||||
'RELEASE: untracked emergency billboard is red',
|
||||
released && isRed(releasedColor),
|
||||
JSON.stringify(releasedColor ?? null),
|
||||
);
|
||||
record(
|
||||
'no uncaught browser errors',
|
||||
errors.length === 0,
|
||||
|
||||
Reference in new issue
Block a user