calabash / calabash-ios-server

An embedded HTTP server for performing queries and test automation
Other
87 stars 82 forks source link

LPDevice: fix sampleFactor for legacy apps in zoomed mode on iphone 6+ #360

Closed jmoody closed 8 years ago

jmoody commented 8 years ago

Motivation

Related to:

Resolves:

This PR fixes the touch coordinates for all these cases except one: Non-optimized apps in Zoomed display mode on iPhone 6 Plus physical devices.

Tested against the iPhoneOnlyApp in these 6 configurations:

  1. Target an iPhone 6 simulator
  2. Target an iPhone 6 Plus simulator
  3. Target an iPhone 6 in Zoomed mode
  4. Target an iPhone 6 in Standard mode
  5. Target an iPhone 6 Plus in Zoomed mode
  6. Target an iPhone 6 Plus in Standard mode

    Background

The server must be able to detect two Scenarios:

  1. When the device is in Zoomed vs. Standard mode
  2. When the application is not optimized for the iPhone 6* screen sizes.

In the first case, the sample factor does not change. In the second case, the sample factor must change.

The iPhoneOnly app is not optimized for the larger screen sizes; it is missing the required launch images, the correct app icons, and the image assets in @3x sizes. This Scenario tests that sample factor is correct in Zoomed and Standard display modes. There a several 2x2 point buttons that, when touched, change the action label (in the middle of the view).