Restore free-play cancellation prompt and map emulator touch coordinates
This commit is contained in:
@@ -64,7 +64,7 @@ try {
|
||||
Step 'six-initial-face-number' @('shell','input','tap','480','560') 1200
|
||||
$sixBefore=Save 'six-before'; Check 'six-real-initial' ((($sixBefore.puzzleStates[0].groups | ForEach-Object {$_.ballIds.Count}) -join ',') -eq '1,1') 'Two initial singleton groups'
|
||||
# Hold real Android touch while observing the contact candidate; no runtime control server.
|
||||
Touch @(1009,510,401,1); Start-Sleep -Milliseconds 100; Touch @(1291,510,401,1); Step 'six-contact-candidate'
|
||||
Touch @(1009,510,401,100); Start-Sleep -Milliseconds 100; Touch @(1291,510,401,100); Step 'six-contact-candidate'
|
||||
$preview=Save 'six-preview'; Check 'six-preview-not-saved' (SameJson $preview $sixBefore) 'Preview JSON equals committed initial JSON'
|
||||
Touch @(1291,510,401,0); Step 'six-success-face-number'
|
||||
$six=Save 'six-success'; Check 'six-final-two' ($six.completedStageIds -contains 6 -and $six.puzzleStates.Count -eq 0 -and $six.latestFreePlay.groups.Count -eq 1 -and $six.latestFreePlay.groups[0].ballIds.Count -eq 2) 'Completed6; one2 group; no unfinished'
|
||||
@@ -79,12 +79,12 @@ try {
|
||||
Step 'ten-all-selection-drag' @('shell','input','swipe','1120','510','850','510','500')
|
||||
Check 'ten-all-unchanged' (SameJson $tenBefore (Save 'ten-all-after')) 'Entire selection preserves JSON'
|
||||
Step 'ten-deselect-right' @('shell','input','tap','1280','510'); Step 'ten-selected-count-face-number'
|
||||
Touch @(1120,510,411,1); Start-Sleep -Milliseconds 100; Touch @(900,510,411,1); Step 'ten-split-preview'
|
||||
Touch @(1120,510,411,100); Start-Sleep -Milliseconds 100; Touch @(900,510,411,100); Step 'ten-split-preview'
|
||||
# UI cancel is a separate product action; release first restores invalid/outside gesture via a real edge release.
|
||||
Touch @(2500,510,411,0); Step 'ten-outside-cancel'
|
||||
Check 'ten-outside-cancel-unchanged' (SameJson $tenBefore (Save 'ten-outside-after')) 'Off-board release keeps committed JSON'
|
||||
Step 'ten-select-again' @('shell','input','tap','1120','510'); Step 'ten-split-again' @('shell','input','tap','312','832'); Step 'ten-selection-again' @('shell','input','tap','1120','510')
|
||||
Touch @(1120,510,421,1); Touch @(1030,510,421,1); Touch @(1390,510,422,1)
|
||||
Touch @(1120,510,421,100); Touch @(1030,510,421,100); Touch @(1390,510,422,100)
|
||||
Touch @(1030,510,421,0,1390,510,422,0); Step 'ten-pinch-switch'
|
||||
$pinch=Save 'ten-pinch-after'; Check 'ten-pinch-no-split' ($pinch.puzzleStates[0].groups.Count -eq 1 -and (SameJson $pinch.puzzleStates[0].balls $tenBefore.puzzleStates[0].balls)) 'Pinch aborts split, all ball positions unchanged'
|
||||
# Return to unchanged committed camera by restarting from the fresh fixture before the successful split.
|
||||
|
||||
@@ -13,7 +13,7 @@ function Varint([int]$Value) {
|
||||
$message=[Collections.Generic.List[byte]]::new()
|
||||
for ($offset=0; $offset -lt $Contacts.Count; $offset+=4) {
|
||||
# AVD touch injection uses portrait physical coordinates even when the app is landscape-left.
|
||||
$fields=@(1080-$Contacts[$offset+1],$Contacts[$offset],$Contacts[$offset+2],$Contacts[$offset+3])
|
||||
$fields=@((1080-$Contacts[$offset+1]),$Contacts[$offset],$Contacts[$offset+2],$Contacts[$offset+3])
|
||||
$touch=[Collections.Generic.List[byte]]::new()
|
||||
for ($field=0; $field -lt 4; $field++) { $touch.Add([byte](8*($field+1))); $touch.AddRange([byte[]](Varint $fields[$field])) }
|
||||
$message.Add(10); $message.AddRange([byte[]](Varint $touch.Count)); $message.AddRange($touch.ToArray())
|
||||
|
||||
Reference in New Issue
Block a user