I am trying to create a test case in XCTest using the UI Test target. I have a use case where I use a SwiftUI Canvas to draw a network graph; and the user can drag the graph on the Canvas. After the drag, the user may click on a node. The application presents a popup with the information about the network node clicked. SwiftUI provides the information required for the application to translate the location of the tap into the original location prior to the drag; and so the logic behind the popup can determine which node the network graph was tapped by the user.
It appears that the distance of the drag operation performed does not match distance that the image actually moved. The drag distance is always larger than the actual distance dragged.
I can observe this during the test execution. The arrow starts at the correct spot but then goes further than the object being dragged. I also observe this when I am driving the application.
Is there some standard and supported way to determine the distance that the image on the screen was moved given a specific distance of the "thenDragTo:" coordinate?