summaryrefslogtreecommitdiff
path: root/test/record_demos.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/record_demos.py')
-rw-r--r--test/record_demos.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/record_demos.py b/test/record_demos.py
index 3c64f55c..a2e48d73 100644
--- a/test/record_demos.py
+++ b/test/record_demos.py
@@ -819,8 +819,9 @@ def pdf_tint_fit(s):
s.pointer = s.cell_px(44, 12)
s.shot(1.2)
for _ in range(3):
- before = s.read('/pane/1/ctl').split()[-1]
- s.click(2, *pdf_tag(s, 'PdfTint'), done=lambda: s.read('/pane/1/ctl').split()[-1] != before,
+ tint = lambda: next(w for w in s.read('/pane/1/ctl').split() if w.startswith(b'tint:'))
+ before = tint()
+ s.click(2, *pdf_tag(s, 'PdfTint'), done=lambda: tint() != before,
what='the tint', after=1.0)
for fit in ('height', 'width'):
s.click(2, *pdf_tag(s, 'PdfFit'), done=lambda: f'fit:{fit}' in s.read('/pane/1/ctl'), what='the fit',