shots: feature rotate, per-language frame fallback, layout-aware capture selectors

This commit is contained in:
CRTkafa 2026-10-24 13:00:48 +08:00
parent 2e1c7cdc3c
commit 61b5fa0623
15 changed files with 355 additions and 17 deletions

View file

@ -1441,3 +1441,16 @@ that fails without the fix (see CONTRIBUTING.md).
--platform macos` refuses an unsigned .pkg or one not signed with an installer certificate before any network call
(`tests/mas-build.test.ts`). The `com.apple.pkg` file type of the API build upload is taken from Apple's schema and has not
been exercised against the live API yet; `--via altool` (`--type macos`) is the fallback.
## 120. Play feature graphic shows a landscape game sideways; a language without frames fails the whole check
- **Symptom:** the 1024x500 feature graphic showed a landscape game frame sideways inside the portrait phone (the
feature path ignored `rotate`); `shots check` without `--lang` failed on missing frames of languages that only have
copy; a capture click on a shop row matched on the phone layout and silently missed at tablet / desktop sizes.
- **Do:** set `shots.feature.rotate` (degrees, added to the template tilt; `-90` stands a landscape frame upright in a
phone lying on its side; with layout "bleed" the frame image itself is turned). Frames of a language that has none
come from the default language (info line; `shots.perLanguageFrames: true` requires them per language). In web
capture list `waitSelector` / `click` candidates per layout (`{ phone: [...], tablet: [...], any: [...] }`, data
attributes first, `text=` last); `shots capture --dry` prints them per size, `--dry --probe` opens the pages and
names the MISS with the size and every candidate's match count.
- **Guard:** `tests/shots-gaps.test.ts`, `tests/browser/feature-fit.browser.ts` (rotate), `cli/shots/selectors.ts`.