Skip to content

Commit 009028e

Browse files
authored
Throwaway: expect the corrected arrow style; correct the osascript query
1 parent 645ff22 commit 009028e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎.github/workflows/probe-themes.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
if [ -f "$req" ]; then
6262
set -- $(cat "$req")
6363
if [ "$1" = "shot" ]; then screencapture -x "$HOME/themes-probe-out/$2.png" || true; echo "shot $2"; fi
64-
if [ "$1" = "ax" ]; then perl -e 'alarm 110; exec @ARGV' osascript -e 'tell application "System Events" to tell process "TinyClips" to get {role, description} of every UI element of (entire contents of window 1)' > "$HOME/themes-probe-out/mac-ax-osascript.txt" 2>&1 || true; echo "ax done"; fi
64+
if [ "$1" = "ax" ]; then perl -e 'alarm 110; exec @ARGV' osascript -e 'tell application "System Events" to tell process "TinyClips" to get description of entire contents of window 1' > "$HOME/themes-probe-out/mac-ax-osascript.txt" 2>&1 || true; echo "ax done"; fi
6565
if [ "$1" = "click" ]; then osascript -e "tell application \"System Events\" to click at {$2, $3}"; echo "click $2 $3 $?"; fi
6666
rm -f "$req"
6767
fi

‎windows/src/TinyClips.App/Probe/ThemesProbe.Exports.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private static async Task ExportsAsync()
5454
var penWidth = VerticalRun(plainAfter, 750, 440, 520, d.Pen.Color);
5555
Check("A1.stroke-widths-per-type", Math.Abs(rectWidth - d.Rectangle.StrokeWidth) <= 2 && Math.Abs(ellipseWidth - d.Ellipse.StrokeWidth) <= 2 && Math.Abs(lineWidth - d.Line.Width) <= 2 && Math.Abs(penWidth - d.Pen.Width) <= 2,
5656
$"measured px (expected): rect {rectWidth} ({d.Rectangle.StrokeWidth:F2}), ellipse {ellipseWidth} ({d.Ellipse.StrokeWidth:F2}), line {lineWidth} ({d.Line.Width:F2}), pen {penWidth} ({d.Pen.Width:F2})");
57-
Check("A1.arrow-style-and-width", doc.Arrow.ArrowStyle == ArrowStyle.Curved2 && Math.Abs(doc.Arrow.Thickness - d.Arrow.Width) < 1e-6, $"style={doc.Arrow.ArrowStyle} width={doc.Arrow.Thickness:F2} expected {d.Arrow.Width:F2}");
57+
Check("A1.arrow-style-and-width", doc.Arrow.ArrowStyle == ArrowStyle.Curved1 && Math.Abs(doc.Arrow.Thickness - d.Arrow.Width) < 1e-6, $"style={doc.Arrow.ArrowStyle} width={doc.Arrow.Thickness:F2} expected {d.Arrow.Width:F2}");
5858

5959
var rectCorners = (plainAfter.At(370, 130), plainAfter.At(130, 270));
6060
Check("A1.rectangle-has-gradient", Near(rectCorners.Item1, Color.FromArgb(255, rectCorners.Item2.R, rectCorners.Item2.G, rectCorners.Item2.B)) > 10, $"interior corners {rectCorners.Item1} vs {rectCorners.Item2}");

0 commit comments

Comments
 (0)