diff --git a/orchestrator/templates/style-match.css b/orchestrator/templates/style-match.css index b80e859..4c453e1 100644 --- a/orchestrator/templates/style-match.css +++ b/orchestrator/templates/style-match.css @@ -9,7 +9,7 @@ .match-peek .match-peek-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .match-deck { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); min-height: 0; padding-top: 14px; overflow-x: clip; } .match-behind { position: absolute; inset: calc(14px - var(--depth) * 7px) calc(var(--depth) * 12px) auto; height: 40px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); opacity: calc(1 - var(--depth) * 0.3); transform: rotate(calc((var(--depth) * 2 - 3) * 1deg)); } -.match-card.front { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; padding: 0; overflow: hidden; border-radius: 22px; box-shadow: 0 14px 34px -16px rgb(0 0 0 / 0.45); } +.match-card.front { position: relative; display: grid; grid-template-rows: auto minmax(min(50%, 12rem), 1fr); min-height: 0; padding: 0; overflow: hidden auto; border-radius: 22px; box-shadow: 0 14px 34px -16px rgb(0 0 0 / 0.45); } .match-card.front::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 1; height: 6px; background: linear-gradient(90deg, hsl(var(--card-hue, 210) 75% 58%), hsl(var(--card-hue-2, 280) 75% 58%)); } .match-card[data-stale="true"]::before { background: var(--bad); } .match-card.front[data-fresh="true"] { animation: match-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); } diff --git a/tests/e2e/test_match_waiting_e2e.py b/tests/e2e/test_match_waiting_e2e.py index 8b7b61c..3fbfc4c 100644 --- a/tests/e2e/test_match_waiting_e2e.py +++ b/tests/e2e/test_match_waiting_e2e.py @@ -38,26 +38,26 @@ FRONT = """(async () => {@HELPERS@ HOME = """(async () => {@HELPERS@@HOME_KIT@ await ViewStore.update("home.pins", () => [{kind: "panel", id: "tasks/match", w: 12, h: 8}]); await go("#home"); - const tile = await until(() => document.querySelector('#main .home-tile[data-id="tasks/match"]'), 8000); - if (!tile) { + const matchTile = await until(() => document.querySelector('#main .home-tile[data-id="tasks/match"]'), 8000); + if (!matchTile) { return {error: text(document.getElementById("main"))}; } - const slot = await until(() => tile.querySelector(".home-head > .home-slot"), 4000); + const slot = await until(() => matchTile.querySelector(".home-head > .home-slot"), 4000); await until(() => slot && /cards? wait/.test(text(slot)), 6000); - const below = () => Boolean(tile.querySelector(".match-actions + .match-peeks .match-peek")); + const below = () => Boolean(matchTile.querySelector(".match-actions + .match-peeks .match-peek")); const toggle = slot ? slot.querySelector(".match-peeks-toggle") : null; const peeks = [[Boolean(await until(below, 6000)), toggle && toggle.getAttribute("aria-pressed")]]; if (toggle) { toggle.click(); await sleep(200); - peeks.push([below() || Boolean(tile.querySelector(".match-peeks")), toggle.getAttribute("aria-pressed"), localStorage.getItem("kvb-orchestrator.match-peeks")]); + peeks.push([below() || Boolean(matchTile.querySelector(".match-peeks")), toggle.getAttribute("aria-pressed"), localStorage.getItem("kvb-orchestrator.match-peeks")]); toggle.click(); await sleep(200); peeks.push([below(), toggle.getAttribute("aria-pressed"), localStorage.getItem("kvb-orchestrator.match-peeks")]); } return {peeks, slot: slot ? text(slot.querySelector(".muted")) : null, overview: Boolean(slot && slot.querySelector(".match-open-overview")), - toolbar: Boolean(tile.querySelector(".home-body .task-toolbar")), card: Boolean(await until(() => tile.querySelector(".match-card.front"), 6000)), - head: Math.round(tile.querySelector(".home-head").getBoundingClientRect().height), wide: document.documentElement.scrollWidth > innerWidth + 1}; + toolbar: Boolean(matchTile.querySelector(".home-body .task-toolbar")), card: Boolean(await until(() => matchTile.querySelector(".match-card.front"), 6000)), + head: Math.round(matchTile.querySelector(".home-head").getBoundingClientRect().height), wide: document.documentElement.scrollWidth > innerWidth + 1}; })()""" FLOW = """(async () => {@HELPERS@ const posted = [];