willowtreeapps / vocable-ios

Vocable AAC for iOS - Empowering people to communicate with care takers and loved ones.
https://vocable.app
MIT License
77 stars 20 forks source link

Improve UI Test Stability #747

Open Clstroud opened 1 month ago

Clstroud commented 1 month ago

Over time, many contributors have added UI tests to cover various scenarios. While most of these tests work without issue, a handful still must pass CI consistently. To combat this, I would like to incrementally improve the underpinnings of the test suite in a few ways:

  1. Improve consistency of failure diagnostics. We propagate file/line parameters to assertion functions most of the time, but not always.
  2. Throw when expectations are unmet. This is optional, but it does solve a few problems, such as return values in helper functions when a failure occurs.
  3. Improve consistency around tapping an element after waiting for it to exist. This is the biggest source of failure on CI. Most of the time, we correctly wait for the element to exist before attempting to tap on it, but the function signature is long and requires a timeout to be explicitly provided. It's a modest adjustment, but this could be made more succinct, and a default value for the timeout parameter should be included.
Clstroud commented 1 month ago

A large chunk of this has been completed as of #748

Keeping this open as the patterns established haven't fully permeated the UI test suite.