085 calm Match deck: no header hourglass, centred bare empty state, the release card as a deck card (Cancel, Skip, Release), fixed card height. 086 motion: vanish() fade everywhere with a lint test, view transitions, a lub-dub heartbeat for working objects, confetti that lands and fades. 087 time readout under the pivot of every analog clock. 088 prune dialog grouped by prefix with tri-state boxes, search, stepper and sticky footer. 089 one-row task toolbar with Filter and Actions menus and a filter chip. 090 card border by state colour with a soft glow and owner avatars. 091 draggable limit lines with staged changes and one Save, a Limits menu with the matrix, View toggles, the GPU cause in its tooltip. 093 request chips Open, Expired, Stale, Failed, All and a signed Delete. 094 closed cards leave the deck within 5 s; open in Claude stamps. 095 compact agent message box with Post/Call, attach, mic and Send in the field. 096 Reject on an expired card drops it silently as Drop (expired). 097 Show filter in Match's right-click menu. 098 docked speech bubbles carry the speaker's avatar and a skip button. 099 Match card headlines cut to 120 characters with the full title in the tooltip; the code box keeps the whole command. tests/test_hub_path_links.py: a unicode fixture without German. Full make test green through the queue (2605 tests, ruff, shellcheck, markdownlint). Gate missed on the operator's word: break 7 %, the E2E specs (13 new, 15 updated) run next. 🎯 Fix: 92 % 💥 Break: 7 % 💸 Tokens: – ⏱️ Velocity: – 🛡️ Security: 100 % 🏆 Score: 86 🚦 Gate: ⛔ break 7 % > 5 Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
79 lines
3.6 KiB
Python
79 lines
3.6 KiB
Python
from __future__ import annotations
|
|
|
|
import json
|
|
import os
|
|
import shutil
|
|
import sys
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
sys.path[:0] = [str(HERE.parent), str(HERE)]
|
|
|
|
import hub_e2e_kit as base
|
|
import test_home_dashboard_e2e as dash
|
|
from hub_case import HubCase
|
|
|
|
OUT = Path(os.environ.get("E2E_OUT", "/tmp/hub-085-empty-shots"))
|
|
EMPTY = """(async () => {@HELPERS@@HOME@
|
|
if (@WIDGET@) {
|
|
await ViewStore.update("home.pins", () => [{kind: "panel", id: "tasks/match", w: 12, h: 8}]);
|
|
await go("#home");
|
|
} else {
|
|
await screenShown(8000);
|
|
}
|
|
const empty = await until(() => document.querySelector("#main .match-deck > .match-empty"), 8000);
|
|
if (!empty) {
|
|
return {error: text(document.getElementById("main")).slice(0, 300)};
|
|
}
|
|
await sleep(300);
|
|
const deck = empty.closest(".match-deck").getBoundingClientRect();
|
|
const box = empty.getBoundingClientRect();
|
|
const look = getComputedStyle(empty);
|
|
return {
|
|
headed: all("#main .box-head .match-glass, #main .home-head .match-glass").length,
|
|
glass: Boolean(empty.querySelector("button.match-glass.large .match-glass-face")),
|
|
words: [text(empty.querySelector("h2")), text(empty.querySelector("p"))],
|
|
frame: [look.borderTopStyle, look.borderTopWidth, look.backgroundImage, look.backgroundColor],
|
|
dx: box.left + box.width / 2 - (deck.left + deck.width / 2),
|
|
dy: box.top + box.height / 2 - (deck.top + deck.height / 2),
|
|
fits: deck.height > box.height && deck.width >= box.width,
|
|
wide: document.documentElement.scrollWidth > innerWidth + 1,
|
|
};
|
|
})()"""
|
|
VIEWS = (*(("page", width, height) for width, height in base.WIDTHS), ("widget", 390, 844))
|
|
|
|
|
|
@unittest.skipUnless(shutil.which(os.environ.get("CHROMIUM", "chromium")), "no Chromium")
|
|
class TestMatchEmptyState(HubCase):
|
|
drive = base.OrchestratorE2ECase.drive
|
|
|
|
def steps(self) -> list[dict]:
|
|
OUT.mkdir(parents=True, exist_ok=True)
|
|
steps = []
|
|
for view, width, height in VIEWS:
|
|
route = "stream" if view == "widget" else "tasks/match"
|
|
probe = EMPTY.replace("@HELPERS@", base.HELPERS).replace("@HOME@", dash.HOME).replace("@WIDGET@", "true" if view == "widget" else "false")
|
|
steps.append({"width": width, "height": height, "url": f"http://localhost:{self.port}/?{view}-{width}-empty#{route}", "wait": 1500, "probe": probe, "shot": str(OUT / f"chromium-{view}-{width}-empty.png")})
|
|
return steps
|
|
|
|
def test_chromium_shows_no_header_hourglass_and_a_bare_empty_state_in_the_middle_of_the_deck(self):
|
|
data = self.drive(self.steps(), None)
|
|
(OUT / "chromium-empty.json").write_text(json.dumps(data, indent=1), encoding="utf-8")
|
|
self.assertEqual([error for error in data["errors"] if "(style-src-elem)" not in error and "/favicon.ico" not in error], [])
|
|
self.assertEqual(len(data["results"]), len(VIEWS), data)
|
|
for (view, width, _), found in zip(VIEWS, data["results"], strict=True):
|
|
with self.subTest(view=view, width=width):
|
|
self.assertNotIn("error", found, found)
|
|
self.assertEqual((found["headed"], found["glass"]), (0, True), found)
|
|
self.assertEqual(found["words"], ["No card waits", "Nothing waits on the operator."], found)
|
|
self.assertEqual(found["frame"], ["none", "0px", "none", "rgba(0, 0, 0, 0)"], found)
|
|
self.assertLessEqual(abs(found["dx"]), 4, found)
|
|
self.assertLessEqual(abs(found["dy"]), 4, found)
|
|
self.assertTrue(found["fits"], found)
|
|
self.assertFalse(found["wide"], found)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|