Release Kaleido 0.1.9 with responsive navigation and clearer show details
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m25s
All checks were successful
Validate and publish Kaleido / android (push) Successful in 2m25s
This commit is contained in:
parent
5199bb0928
commit
784921dba9
20 changed files with 271 additions and 49 deletions
|
|
@ -1,8 +1,8 @@
|
|||
"""Operate only Kaleido on an authorized streamer. Credentials stay on stdin."""
|
||||
import argparse, json, os, pathlib, subprocess, sys, time, xml.etree.ElementTree as ET
|
||||
import argparse, json, os, pathlib, shutil, subprocess, sys, time, xml.etree.ElementTree as ET
|
||||
ROOT=pathlib.Path(__file__).resolve().parents[1]
|
||||
ADB=pathlib.Path(r'C:\Users\Elijah\Desktop\platform-tools\adb.exe')
|
||||
# The onn is the default; KALEIDO_DEVICE selects the authorized Fire TV Stick (192.168.50.146:5555).
|
||||
ADB=pathlib.Path(os.environ.get('KALEIDO_ADB') or shutil.which('adb') or r'C:\Users\Elijah\Desktop\platform-tools\adb.exe')
|
||||
# The onn is the default; KALEIDO_DEVICE selects another authorized test streamer.
|
||||
DEVICE=os.environ.get('KALEIDO_DEVICE','192.168.50.195:5555')
|
||||
OUT=ROOT/'evidence/private'
|
||||
OUT.mkdir(parents=True,exist_ok=True)
|
||||
|
|
@ -11,7 +11,7 @@ def adb(*args, data=None):
|
|||
p=subprocess.run([str(ADB),'-s',DEVICE,*args],input=data,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
error=p.stderr.decode(errors='replace')
|
||||
# The TCL's network ADB link drops intermittently; reconnecting restores it.
|
||||
if p.returncode and attempt<3 and ('closed' in error or 'offline' in error):
|
||||
if p.returncode and attempt<3 and any(reason in error for reason in ('closed','offline',f"device '{DEVICE}' not found",f"no such device '{DEVICE}'")):
|
||||
subprocess.run([str(ADB),'disconnect',DEVICE],capture_output=True);time.sleep(2)
|
||||
subprocess.run([str(ADB),'connect',DEVICE],capture_output=True);time.sleep(2);continue
|
||||
# It also occasionally fails a shell command silently. Retry, except key input,
|
||||
|
|
|
|||
|
|
@ -65,11 +65,11 @@ def resummarize(label):
|
|||
|
||||
def main():
|
||||
parser=argparse.ArgumentParser();parser.add_argument('label');parser.add_argument('--cycles',type=int,default=3)
|
||||
parser.add_argument('--window',type=float,default=1.2);parser.add_argument('--skip-movies',action='store_true');args=parser.parse_args()
|
||||
parser.add_argument('--window',type=float,default=1.2);parser.add_argument('--skip-movies',action='store_true');parser.add_argument('--skip-home',action='store_true');args=parser.parse_args()
|
||||
global LABEL;LABEL=args.label;(OUT/f'transitions-{LABEL}-frames.txt').unlink(missing_ok=True)
|
||||
results={}
|
||||
launch()
|
||||
for _ in range(args.cycles):
|
||||
for _ in range(0 if args.skip_home else args.cycles):
|
||||
measure('home: tab -> hero',20,lambda r:focus(r) in HERO,args.window,results)
|
||||
root=measure('home: hero -> row',20,card,args.window,results)
|
||||
first=focus(root)
|
||||
|
|
|
|||
|
|
@ -17,4 +17,23 @@ assert back is not None,'Back control must remain visible on initial show entry'
|
|||
back_bounds=list(map(int,re.findall(r'\d+',back.get('bounds'))))
|
||||
assert back_bounds[1]>=0 and back_bounds[3]>back_bounds[1],'Back control must stay inside the visible header'
|
||||
assert 'Seasons' in labels(root),'Seasons must lead the rows beneath show information'
|
||||
print('PASS safe show header and Seasons first on initial entry')
|
||||
screen=list(map(int,re.findall(r'\d+',root.find('node').get('bounds'))))
|
||||
captions=[n for n in root.iter('node') if re.fullmatch(r'Season \d+',n.get('text',''))]
|
||||
assert captions,'Season captions must be visible without scrolling'
|
||||
for caption in captions:
|
||||
box=list(map(int,re.findall(r'\d+',caption.get('bounds'))))
|
||||
assert box[3]<=screen[3]-24,'Season caption must fit inside the bottom safe area'
|
||||
summary=max((n for n in root.iter('node') if len(n.get('text',''))>120),key=lambda n:len(n.get('text')))
|
||||
summary_bounds=list(map(int,re.findall(r'\d+',summary.get('bounds'))))
|
||||
assert summary_bounds[2]-summary_bounds[0]<=screen[2]*560/960+2,'Show synopsis must use the bounded movie-detail text width'
|
||||
print('PASS safe show header, bounded synopsis, and complete season captions on initial entry')
|
||||
key(22,2);focused('Synopsis');key(23);focused('Close')
|
||||
dialog=snapshot();screenshot('show-full-synopsis')
|
||||
assert summary.get('text') in labels(dialog),'Full synopsis must remain available in the dialog'
|
||||
key(20);key(19);focused('Close');key(23);focused('Synopsis')
|
||||
key(23);focused('Close');key(4);focused('Synopsis')
|
||||
print('PASS full synopsis opens, scrolls, and restores focus after Close or Back')
|
||||
key(20);focused('Season 1');key(20)
|
||||
wait(lambda r:'Cast' in labels(r) and bool(focus(r)) and 'Season 1' not in focus(r),'Cast focus beneath Seasons')
|
||||
screenshot('show-scrolled-cast')
|
||||
print('PASS Seasons-to-Cast navigation; captured scrolled backdrop for visual review')
|
||||
|
|
|
|||
29
scripts/verify_navigation_entry.py
Normal file
29
scripts/verify_navigation_entry.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
"""Check immediate tab/Down input and entry after the catalog was scrolled."""
|
||||
from device import adb,screenshot
|
||||
from verify_ui import launch,key,focused,wait,focus,labels
|
||||
|
||||
launch()
|
||||
# Keep both events in one shell command: a pending two-frame tab activation must
|
||||
# not let Down enter the old Home hero or get lost during composition.
|
||||
adb('shell','input','keyevent','22','20')
|
||||
wait(lambda r:'Recently released' in labels(r),'Rapid entry must load Movies')
|
||||
focused('Discover')
|
||||
key(20);wait(lambda r:focus(r) not in ('','Home','Movies','Discover','Play','Resume'),'Movies first poster')
|
||||
key(20);wait(lambda r:focus(r) not in ('','Home','Movies','Discover'),'Movies second row')
|
||||
key(19);key(19);focused('Discover');key(19);focused('Movies')
|
||||
key(20);focused('Discover');key(20)
|
||||
wait(lambda r:focus(r) not in ('','Home','Movies','Discover'),'Re-enter scrolled catalog')
|
||||
screenshot('navigation-entry')
|
||||
key(4);focused('Home')
|
||||
adb('shell','input','keyevent','22','22','20')
|
||||
wait(lambda r:'Next episodes' in labels(r),'Rapid double-tab entry must load TV')
|
||||
focused('Discover')
|
||||
key(4);focused('Home');key(20)
|
||||
wait(lambda r:focus(r) in ('Play','Resume'),'Home hero')
|
||||
key(20);root=wait(lambda r:focus(r) not in ('','Home','Play','Resume'),'Continue Watching card')
|
||||
first=focus(root)
|
||||
adb('shell','input','keyevent',*(['22']*4))
|
||||
wait(lambda r:bool(focus(r)) and focus(r)!=first,'Rapid horizontal navigation')
|
||||
adb('shell','input','keyevent',*(['21']*4))
|
||||
focused(first)
|
||||
print('PASS rapid Movies/Down and TV/Down, direct Discover entry, scrolled catalog re-entry, and rapid horizontal round-trip',flush=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue