Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(web): export Google Play listing artwork (#1190)

Gener0ed2dac4664c
diff --git a/scripts/ci/app-store-capture.test.ts b/scripts/ci/app-store-capture.test.ts
index f4753b7ff..8e0089600 100644
--- a/scripts/ci/app-store-capture.test.ts
+++ b/scripts/ci/app-store-capture.test.ts
@@ -100,6 +100,18 @@ describe("component-rendered App Store artwork", () => {
expect(() => selectCaptures({ device: "watch" })).toThrow("Invalid device")
})
+ it("selects the complete Google Play PNG set without changing the Apple defaults", () => {
+ const selected = selectCaptures({ store: "google-play" })
+ expect(selected.filter(capture => capture.device === "phone").map(capture => [capture.width, capture.height, capture.format])).toEqual(Array.from({ length: 4 }, () => [1080, 1920, "png"]))
+ expect(selected.map(capture => capture.url)).toEqual(["/?kind=play-phone&story=1", "/?kind=play-phone&story=2", "/?kind=play-phone&story=3", "/?kind=play-phone&story=4", "/?kind=play-feature"])
+ expect(selected.at(-1)).toMatchObject({ width: 1024, height: 500, format: "png" })
+ expect(new Set(selected.map(capture => capture.filename)).size).toBe(5)
+ expect(selectCaptures({ store: "app-store" })).toEqual(captures)
+ expect(() => selectCaptures({ store: "unknown" })).toThrow("Invalid store")
+ expect(() => selectCaptures({ store: "google-play", device: "phone" })).toThrow("complete fixed set")
+ expect(() => selectCaptures({ store: "google-play", story: 1 })).toThrow("complete fixed set")
+ })
+
it("stops its owned process group and leaves an unrelated listener alive", async () => {
const unrelated = createServer((_request, response) => response.end("unrelated"))
unrelated.listen(0, "127.0.0.1")
@@ -128,6 +140,9 @@ describe("component-rendered App Store artwork", () => {
try {
await expect(captureArtwork({ signal: AbortSignal.abort(new Error("cancelled")) })).rejects.toThrow("cancelled")
await expect(main(["--device", "watch"])).rejects.toThrow("Invalid device")
+ await expect(main(["--store", "unknown"])).rejects.toThrow("Invalid store")
+ await expect(main(["--store", "google-play", "--story", "1"])).rejects.toThrow("complete fixed set")
+ await expect(main(["--store"])).rejects.toThrow("Usage:")
for (const args of [["--device"], ["--story"], ["--story", "7"], ["--story", "1.5"]]) await expect(main(args)).rejects.toThrow("Usage:")
expect(launch).not.toHaveBeenCalled()
} finally { vi.restoreAllMocks() }
diff --git a/src/web/app-store-capture/README.md b/src/web/app-store-capture/README.md
index d9c2a9a1e..9233c2fa8 100644
--- a/src/web/app-store-capture/README.md
+++ b/src/web/app-store-capture/README.md
@@ -70,3 +70,43 @@ A small owned loopback server serves only the artwork document, CSS/noise and de
The composition uses the final approved HTML cascade: large centered wordmark and four supporting blue/teal/purple/red faces, with no interface thumbnail or standalone orange face. The header keeps its one-line headline. Actual critical element boxes, local resources, renderer and input/output hashes are recorded. CSS filter blur is outside element-box measurements; visual comparison against the supplied originals remains necessary. See source provenance below and in [SOURCES.md](SOURCES.md).
The supplied reference PNGs were converted from browser JPEG previews. The generator captures clear PNG directly; JPEG compression pixels are not part of the composition contract. The approved HTML remains the source for fonts, assets, geometry and crop.
+
+## Google Play listing
+
+Use the same component renderer with the explicit preset. The default 24 App Store
+JPEGs and their filters are unchanged. Google Play is a complete set; do not combine
+this preset with `--device` or `--story`.
+
+```sh
+pnpm app-store:capture --store google-play --output /absolute/isolated/output --overview
+```
+
+The preset exports four 1080×1920 RGB PNG phone images reached through actual
+homepage-demo controls, plus official-brand feature art and the existing icon:
+
+- `phone-1080x1920/01-conversation.png`
+- `phone-1080x1920/02-dm.png`
+- `phone-1080x1920/03-profile.png`
+- `phone-1080x1920/04-rooms.png`
+- `feature-1024x500.png`
+- `icon-512.png`
+
+Each phone uses a uniformly scaled 402×650 real Web viewport with 16px App root
+text, without a hardware chassis. Conversation, Home→Alli DM and the actual Alli
+profile button are public UI actions; the fourth image retains the room list.
+The measured marketing box ends within the top 20% of the image. The exporter
+records interactions, component/font readiness, composition bounds, exact source
+and dependency inputs, encoding and final hashes in `manifest.json`.
+
+Phone and feature PNGs are 24-bit RGB without alpha. The 512×512 icon keeps the
+existing official geometry/colors and composites exterior transparency on the
+existing cream background, then exports 32-bit sRGB RGBA PNG under 1024KB. No outer
+mask, shadow or store badge is added. `--overview` also writes a review JPEG; this
+is not one of the six upload assets. The default output is `assets/google-play`;
+prefer an isolated output when preparing a new listing candidate.
+
+Review all six final images at full resolution before upload. This is marketing
+artwork from controlled homepage demos; it does not verify an installed Android
+build or store acceptance. Current specifications:
+[preview assets](https://support.google.com/googleplay/android-developer/answer/9866151?hl=en)
+and [icon design](https://developer.android.com/distribute/google-play/resources/icon-design-specifications).
diff --git a/src/web/app-store-capture/capture.mjs b/src/web/app-store-capture/capture.mjs
index 85e94a0f8..1e729e1c8 100644
--- a/src/web/app-store-capture/capture.mjs
+++ b/src/web/app-store-capture/capture.mjs
@@ -28,7 +28,17 @@ export const captures = [
filename: `${device}-${width}x${height}/${String(index + 1).padStart(2, "0")}-${name}.jpg`,
})))
-export function selectCaptures({ device, story } = {}) {
+const playCaptures = [
+ ...["conversation", "dm", "profile", "rooms"].map((action, index) => ({ device: "phone", story: index + 1, action, width: 1080, height: 1920, format: "png", url: `/?kind=play-phone&story=${index + 1}`, filename: `phone-1080x1920/0${index + 1}-${action}.png` })),
+ { device: "feature", width: 1024, height: 500, format: "png", url: "/?kind=play-feature", filename: "feature-1024x500.png" },
+]
+
+export function selectCaptures({ store = "app-store", device, story } = {}) {
+ if (!["app-store", "google-play"].includes(store)) throw new Error("Invalid store: use app-store or google-play")
+ if (store === "google-play") {
+ if (device !== undefined || story !== undefined) throw new Error("Google Play requires the complete fixed set; omit device and story")
+ return playCaptures
+ }
if (device !== undefined && !["phone", "tablet", "duo"].includes(device)) throw new Error("Invalid device: use phone, tablet or duo")
if (story !== undefined && (!Number.isInteger(story) || story < 1 || story > stories.length)) throw new Error("Invalid story: use 1 through 6")
return captures.filter(capture => (!device || capture.device === device) && (story === undefined || capture.story === story))
@@ -45,7 +55,7 @@ export async function captureInputHashes() {
}
await walk(path.join(captureRoot, "app"))
await walk(path.join(captureRoot, "captures"))
- files.push(path.join(webRoot, "src/app/globals.css"), path.join(webRoot, "src/app/fonts.ts"), path.join(webRoot, "src/app/favicon.ico"), path.join(webRoot, "public/alook.svg"))
+ files.push(path.join(webRoot, "src/app/globals.css"), path.join(webRoot, "src/app/fonts.ts"), path.join(webRoot, "src/app/favicon.ico"), path.join(webRoot, "public/alook.svg"), path.join(webRoot, "public/icon-512.png"))
for (const name of ["landing-interactive-shell.tsx", "landing-interactive-shell-data.ts", "landing-interactive-shell.module.css", "landing-shell-motion.tsx", "landing-shell-motion-timeline.ts", "landing-shell-motion.module.css", "landing-profile-content.tsx", "landing-human-avatars.ts", "landing-demo-copy.ts"]) files.push(path.join(webRoot, "src/components/home", name))
for (const name of ["caveat-latin", "dm-sans-latin", "dm-mono-latin-400", "instrument-serif-latin-400", "instrument-serif-latin-400-italic", "literata-latin", "vt323-latin-400"]) files.push(path.join(webRoot, "src/app/fonts", `${name}.woff2`))
for (const color of ["red", "purple", "teal", "blue", "orange"]) files.push(path.join(captureRoot, "assets", `face-${color}.svg`))
@@ -134,15 +144,25 @@ async function render(browser, origin, capture) {
await frame.locator('[data-capture-ready="true"]').waitFor({ timeout: 120000 })
const scene = await frame.locator("[data-capture-surface]").getAttribute("data-capture-surface")
if (scene === "workspace" && await frame.evaluate(() => innerWidth < 640)) {
- await frame.getByTestId("community-channel-row-demo-general").click()
- await frame.locator('[data-community-mobile-surface="detail"]').waitFor({ state: "visible" })
+ if (capture.action === "dm") {
+ await frame.getByTestId("community-home-button").click()
+ await frame.getByTestId("community-dm-row-demo-dm-alli").click()
+ } else if (capture.action !== "rooms") {
+ await frame.getByTestId("community-channel-row-demo-general").click()
+ }
+ await frame.locator(`[data-community-mobile-surface="${capture.action === "rooms" ? "list" : "detail"}"]`).waitFor({ state: "visible" })
+ if (capture.action === "rooms") await frame.getByTestId("community-channel-row-demo-general").waitFor({ state: "visible" })
}
- if (scene === "workspace") {
+ if (scene === "workspace" && capture.action !== "rooms") {
await frame.locator('[data-message-list-content][data-initial-position-phase="revealed"][aria-hidden="false"]').waitFor({ state: "visible" })
await frame.locator('[data-message-list-skeleton]').waitFor({ state: "hidden" })
await frame.getByTestId("community-message-scroller").evaluate(element => element.scrollTo({ top: 0, behavior: "instant" }))
await frame.evaluate(() => new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve))))
await frame.locator('[data-message-row-key]').first().waitFor({ state: "visible" })
+ if (capture.action === "profile") {
+ await frame.locator('[data-message-author-line]').getByRole("button", { name: "Alli", exact: true }).first().click()
+ await frame.getByTestId("community-profile-card").waitFor({ state: "visible" })
+ }
}
const measured = await frame.evaluate(async () => {
await document.fonts.ready
@@ -151,18 +171,25 @@ async function render(browser, origin, capture) {
})
if (measured.rootFontSize !== "16px") throw new Error(`Unexpected App root type: ${measured.rootFontSize}`)
if (scene === "workspace" && !measured.sharedShell) throw new Error("Shared Web shell did not render")
- surfaces.push({ scene, ...measured })
+ surfaces.push({ scene, ...(capture.action ? { interaction: capture.action } : {}), ...measured })
}
- if (!surfaces.length) throw new Error("No real component surface rendered")
+ if (!surfaces.length && capture.device !== "feature") throw new Error("No real component surface rendered")
await page.evaluate(async () => { await document.fonts.ready; await Promise.all([...document.images].map(image => image.decode())) })
- const bytes = await page.locator("#capture-poster").screenshot({ type: "jpeg", quality: 80, scale: "css", animations: "disabled" })
+ const composition = await page.evaluate(() => {
+ const marketing = document.querySelector('[data-play-marketing]')?.getBoundingClientRect()
+ const surface = document.querySelector('.play-app')?.getBoundingClientRect()
+ const rect = value => value ? { x: value.x, y: value.y, width: value.width, height: value.height } : null
+ return { marketing: rect(marketing), surface: rect(surface) }
+ })
+ if (capture.action && (!composition.marketing || composition.marketing.y + composition.marketing.height > capture.height * .2 || !composition.surface || composition.surface.y < composition.marketing.y + composition.marketing.height || composition.surface.x < 0 || composition.surface.x + composition.surface.width > capture.width || composition.surface.y + composition.surface.height > capture.height)) throw new Error("Google Play marketing/surface bounds exceeded")
+ const bytes = await page.locator("#capture-poster").screenshot({ type: capture.format ?? "jpeg", ...(capture.format === "png" ? {} : { quality: 80 }), scale: "css", animations: "disabled" })
if (errors.length) throw new Error(errors.join("\n"))
- return { bytes, surfaces }
+ return { bytes, surfaces, ...(capture.format ? { composition } : {}) }
} finally { await context.close() }
}
-export async function captureArtwork({ output = path.join(repositoryRoot, "assets/app-store"), overview = false, device, story, signal } = {}) {
- const selected = selectCaptures({ device, story })
+export async function captureArtwork({ store = "app-store", output = path.join(repositoryRoot, store === "google-play" ? "assets/google-play" : "assets/app-store"), overview = false, device, story, signal } = {}) {
+ const selected = selectCaptures({ store, device, story })
signal?.throwIfAborted()
const app = await startCaptureApp({ signal })
let browser
@@ -174,13 +201,20 @@ export async function captureArtwork({ output = path.join(repositoryRoot, "asset
const outputs = []
for (const capture of selected) {
signal?.throwIfAborted()
- const { bytes, surfaces } = await render(browser, app.origin, capture)
+ const { bytes, surfaces, composition } = await render(browser, app.origin, capture)
const metadata = await sharp(bytes).metadata()
- if (metadata.format !== "jpeg" || metadata.width !== capture.width || metadata.height !== capture.height || metadata.channels !== 3 || metadata.hasAlpha || metadata.space !== "srgb") throw new Error(`Invalid RGB JPEG: ${capture.filename}`)
+ if (metadata.format !== (capture.format ?? "jpeg") || metadata.width !== capture.width || metadata.height !== capture.height || metadata.channels !== 3 || metadata.hasAlpha || metadata.space !== "srgb") throw new Error(`Invalid RGB artwork: ${capture.filename}`)
const filename = path.join(output, capture.filename)
await mkdir(path.dirname(filename), { recursive: true })
await writeFile(filename, bytes)
- outputs.push({ path: capture.filename, width: metadata.width, height: metadata.height, sha256: createHash("sha256").update(bytes).digest("hex"), surfaces })
+ outputs.push({ path: capture.filename, width: metadata.width, height: metadata.height, sha256: createHash("sha256").update(bytes).digest("hex"), surfaces, ...(composition ? { composition, encoding: "24-bit RGB PNG" } : {}) })
+ }
+ if (store === "google-play") {
+ const bytes = await sharp(path.join(webRoot, "public/icon-512.png")).flatten({ background: "#fff8ec" }).ensureAlpha().toColourspace("srgb").png().toBuffer()
+ const metadata = await sharp(bytes).metadata()
+ if (metadata.width !== 512 || metadata.height !== 512 || metadata.channels !== 4 || !metadata.hasAlpha || metadata.space !== "srgb" || bytes.length > 1024 * 1024) throw new Error("Invalid Google Play icon")
+ await writeFile(path.join(output, "icon-512.png"), bytes)
+ outputs.push({ path: "icon-512.png", width: 512, height: 512, sha256: createHash("sha256").update(bytes).digest("hex"), encoding: "32-bit RGBA PNG", source: "src/web/public/icon-512.png", transform: "Original geometry/colors, alpha composited on #fff8ec; opaque full square with alpha channel", surfaces: [] })
}
if (overview) {
const first = outputs.slice(0, 6)
@@ -193,7 +227,7 @@ export async function captureArtwork({ output = path.join(repositoryRoot, "asset
outputs.push({ path: "overview.jpg", width, height, sha256: createHash("sha256").update(bytes).digest("hex"), surfaces: [] })
}
const { stdout } = await promisify(execFile)("git", ["rev-parse", "HEAD"], { cwd: repositoryRoot })
- const manifest = { renderer: browser.version(), encoding: "RGB JPEG quality 80", clock: "2026-10-25T00:00:00Z", locale: "en-US", timezone: "UTC", repositoryHead: stdout.trim(), inputs: await captureInputHashes(), outputs }
+ const manifest = { renderer: browser.version(), encoding: store === "google-play" ? "RGB PNG artwork; RGBA PNG icon; optional JPEG overview" : "RGB JPEG quality 80", ...(store === "google-play" ? { store } : {}), clock: "2026-10-25T00:00:00Z", locale: "en-US", timezone: "UTC", repositoryHead: stdout.trim(), inputs: await captureInputHashes(), outputs }
await writeFile(path.join(output, "manifest.json"), `${JSON.stringify(manifest, null, 2)}\n`)
return manifest
} finally {
@@ -206,10 +240,11 @@ export async function main(args = process.argv.slice(2)) {
const options = {}
for (let index = 0; index < args.length; index++) {
if (args[index] === "--overview") options.overview = true
+ else if (args[index] === "--store" && args[index + 1] && !args[index + 1].startsWith("--")) options.store = args[++index]
else if (args[index] === "--device" && args[index + 1] && !args[index + 1].startsWith("--")) options.device = args[++index]
else if (args[index] === "--story" && args[index + 1] && /^[1-6]$/.test(args[index + 1])) options.story = Number(args[++index])
else if (args[index] === "--output" && args[index + 1] && !args[index + 1].startsWith("--")) options.output = path.resolve(args[++index])
- else throw new Error("Usage: pnpm app-store:capture [--output directory] [--overview] [--device phone|tablet|duo] [--story 1..6]")
+ else throw new Error("Usage: pnpm app-store:capture [--store app-store|google-play] [--output directory] [--overview] [--device phone|tablet|duo] [--story 1..6]")
}
const controller = new AbortController()
const interrupt = () => {
diff --git a/src/web/app-store-capture/captures/poster.css b/src/web/app-store-capture/captures/poster.css
index abd3a1f99..fcced7977 100644
--- a/src/web/app-store-capture/captures/poster.css
+++ b/src/web/app-store-capture/captures/poster.css
@@ -152,3 +152,23 @@
.poster-board { display: grid; grid-template-columns: repeat(3, 368px); gap: 23px; padding: 28px; background: #f3e6d4; }
.poster-thumb { position: relative; width: 368px; height: 800px; overflow: hidden; border-radius: 16px; }
.poster-thumb > section { transform: scale(.305); transform-origin: top left; }
+.play-phone-poster{position:relative;width:1080px;height:1920px;overflow:hidden;background:linear-gradient(155deg,#fff8ec,#fff0dc 58%,#ffd8a5);color:#192625;font-family:var(--font-dm-sans),sans-serif}
+.play-phone-poster header{position:absolute;left:72px;right:72px;top:64px}
+.play-phone-poster h1{margin:0;font-size:82px;font-weight:850;line-height:1.02;letter-spacing:-3.5px}
+.play-phone-poster header p{margin:24px 0 0;font-size:34px;line-height:1.25;letter-spacing:-.6px;color:#715340}
+.play-app{position:absolute;left:72px;top:344px;width:936px;height:1513.4328358208954px;overflow:hidden;border-radius:24px;box-shadow:0 22px 70px #7a482c24}
+.play-feature-poster{position:relative;width:1024px;height:500px;overflow:hidden;background:linear-gradient(120deg,#fff8ec,#fff0dc 65%,#ffd8a5);color:#192625;font-family:var(--font-dm-sans),sans-serif}
+.play-feature-copy{position:absolute;left:72px;top:64px;z-index:2}
+.play-feature-copy>button{height:46px;gap:10px}
+.play-feature-copy>button>img{width:46px;height:46px}
+.play-feature-copy>button>span{font-size:56px;line-height:1}
+.play-feature-copy h1{margin:27px 0 0;font-size:60px;line-height:1.04;letter-spacing:-2.8px;font-weight:850}
+.play-feature-copy h1 span{color:#b94f13}
+.play-feature-copy p{margin:20px 0 0;font-family:var(--font-caveat),cursive;font-size:37px;line-height:1.1}
+.play-feature-faces{position:absolute;right:65px;top:90px;width:300px;height:310px}
+.play-face{position:absolute;width:160px;height:160px;object-fit:contain}
+.play-face-red{left:0;top:0;transform:rotate(-14deg)}
+.play-face-purple{right:0;top:3px;transform:rotate(14deg)}
+.play-face-teal{left:2px;top:128px;transform:rotate(-15deg)}
+.play-face-blue{right:0;top:130px;transform:rotate(14deg)}
+.play-face-orange{left:70px;top:80px;z-index:1;transform:rotate(-3deg)}
diff --git a/src/web/app-store-capture/captures/poster.tsx b/src/web/app-store-capture/captures/poster.tsx
index c12492519..8c04a984b 100644
--- a/src/web/app-store-capture/captures/poster.tsx
+++ b/src/web/app-store-capture/captures/poster.tsx
@@ -1,4 +1,5 @@
import type { CSSProperties } from "react"
+import { Logo } from "@/components/logo"
import "./poster.css"
function Surface({ scene = "workspace", width, height, viewport = [1280, 800], beat = 9 }: { scene?: string; width: number; height: number; viewport?: [number, number]; beat?: number }) {
@@ -126,9 +127,31 @@ function DuoPoster({ story }: { story: number }) {
</section>
}
+const playStories = [
+ { title: <>Multi-Agent<br />Collaboration</>, subtitle: "For your team and friends.", action: "conversation" },
+ { title: <>A companion<br />of your own.</>, subtitle: "Read updates. Give the next instruction.", action: "dm" },
+ { title: <>Your agent.<br />Their own identity.</>, subtitle: "Meet the agent behind the message.", action: "profile" },
+ { title: <>Bring your agents<br />into the room.</>, subtitle: "Keep people and agents together.", action: "rooms" },
+]
+
+function PlayPhonePoster({ story }: { story: number }) {
+ const data = playStories[story - 1]
+ return <section className="play-phone-poster" data-story={story} data-play-action={data.action}>
+ <header data-play-marketing><h1>{data.title}</h1><p>{data.subtitle}</p></header>
+ <div className="play-app"><Surface width={936} height={936 * 650 / 402} viewport={[402, 650]} /></div>
+ </section>
+}
+
+function PlayFeaturePoster() {
+ return <section className="play-feature-poster">
+ <div className="play-feature-copy"><Logo /><h1>Multi-Agent<br /><span>Collaboration</span></h1><p>for Team and Friends</p></div>
+ <div className="play-feature-faces">{["red", "purple", "teal", "blue", "orange"].map(color => <Face key={color} color={color} className={`play-face play-face-${color}`} />)}</div>
+ </section>
+}
+
export function Artwork({ kind, story, large }: { kind: string; story: number; large: boolean }) {
- const dimensions = kind === "duo" ? [2007, 2853] : kind === "tablet" ? [2752, 2064] : large ? [1320, 2868] : [1206, 2622]
+ const dimensions = kind === "play-phone" ? [1080, 1920] : kind === "play-feature" ? [1024, 500] : kind === "duo" ? [2007, 2853] : kind === "tablet" ? [2752, 2064] : large ? [1320, 2868] : [1206, 2622]
return <div id="capture-poster" className="capture-canvas" style={{ width: dimensions[0], height: dimensions[1] } as CSSProperties}>
- {kind === "duo" ? <DuoPoster story={story} /> : kind === "tablet" ? <TabletPoster story={story} /> : <PhonePoster story={story} large={large} />}
+ {kind === "play-phone" ? <PlayPhonePoster story={story} /> : kind === "play-feature" ? <PlayFeaturePoster /> : kind === "duo" ? <DuoPoster story={story} /> : kind === "tablet" ? <TabletPoster story={story} /> : <PhonePoster story={story} large={large} />}
</div>
}
diff --git a/src/web/app-store-capture/render.dom.test.tsx b/src/web/app-store-capture/render.dom.test.tsx
index 743db3c1d..459d2ad17 100644
--- a/src/web/app-store-capture/render.dom.test.tsx
+++ b/src/web/app-store-capture/render.dom.test.tsx
@@ -98,6 +98,30 @@ describe("App Store capture document and poster entry", () => {
expect(duo.querySelectorAll(".face")).toHaveLength(5)
})
+ it.each(["conversation", "dm", "profile", "rooms"])("renders the Google Play %s composition around one complete real mobile viewport", (action) => {
+ const story = ["conversation", "dm", "profile", "rooms"].indexOf(action) + 1
+ const document = documentFor(<Artwork kind="play-phone" story={story} large={false} />)
+ const canvas = document.querySelector<HTMLElement>("#capture-poster")!
+ expect([canvas.style.width, canvas.style.height]).toEqual(["1080px", "1920px"])
+ expect(document.querySelector("[data-play-action]")?.getAttribute("data-play-action")).toBe(action)
+ expect(document.querySelector("[data-play-marketing] h1")?.textContent).toBeTruthy()
+ const frames = [...document.querySelectorAll("iframe")]
+ expect(frames).toHaveLength(1)
+ expect([frames[0].width, frames[0].height]).toEqual(["402", "650"])
+ expect(new URL(frames[0].src).searchParams.get("scene")).toBe("workspace")
+ expect(document.querySelector(".phone, .device, .monitor-neck, .monitor-base")).toBeNull()
+ })
+
+ it("renders the Google Play feature from official brand assets without a device surface", () => {
+ const document = documentFor(<Artwork kind="play-feature" story={1} large={false} />)
+ const canvas = document.querySelector<HTMLElement>("#capture-poster")!
+ expect([canvas.style.width, canvas.style.height]).toEqual(["1024px", "500px"])
+ expect(document.querySelector('img[alt="Alook"]')?.getAttribute("src")).toBe("/alook.svg")
+ expect(document.querySelector('button[aria-label="Toggle theme"]')?.textContent).toBe("Alook")
+ expect(document.querySelectorAll(".play-face")).toHaveLength(5)
+ expect(document.querySelector("iframe, .phone, .device")).toBeNull()
+ })
+
it.each(posterQueries)("resolves the awaited query %j before composing its poster", async (query, kind, story, width) => {
const element = await CapturePage({ searchParams: Promise.resolve(query) })
const document = documentFor(element)