Page MenuHomePhabricator

Update unit tests failing on non-English devices
Open, LowPublic

Description

I was running into strange unit test failures while testing a PR, failures unrelated to the PR work, and (eventually) realized it was related to the primary language of the Simulator I was running the tests on. Some of unit tests rely on English language strings and US region specific formatting to be considered successes.

I think at minimum for the time being we should at least document that the unit tests require the device's language/region to be en-US.

Repro Steps

  1. Set your device/Simulator's primary language to something other than English and region to something other than US in Settings > General > Language & Region (e.g. French/France)
  2. Run the app's unit tests against that Simulator

Expected Results
All tests succeed.

Actual Results
Some tests fail.

tests2.png (158×822 px, 159 KB)

tests1.png (710×832 px, 612 KB)

Event Timeline

LGoto lowered the priority of this task from Medium to Low.Sep 22 2020, 8:20 PM