Skip to content

Add test-mode animation switch for UI tests - #6232

Open
j0ntz wants to merge 1 commit into
developfrom
jon/xcuitest-interpreter
Open

j0ntz wants to merge 1 commit into
developfrom
jon/xcuitest-interpreter

Conversation

@j0ntz

@j0ntz j0ntz commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Description

Asana task

Adds a test-mode animation switch for automated iOS UI runs. Debug iOS builds read the EdgeTestAnimations user default, which the -EdgeTestAnimations off|fast launch argument sets:

  • off: UIKit animations are disabled (UIView.setAnimationsEnabled(false)).
  • fast: the window's Core Animation clock runs at 100x.
  • Either value also mounts Reanimated's ReducedMotionConfig with ReduceMotion.Always, so withRepeat loops (Shimmer, ShimmerCard, SwipeChart) stop after one cycle.
  • Either value also freezes UIActivityIndicatorView spinners in place (a one-time startAnimating swizzle that sets the indicator layer's speed to 0), so a loading screen stays visible but stops changing.

Together these let screenshot comparisons settle between automated steps. The app has no Lottie and no Animated.loop.

Release builds and Android ignore the switch, and a normal debug launch (no argument) is unchanged. RN core Animated is only used for finite fades, so it needs no change.

The XCUITest flow interpreter in the edge-dev-agents PR passes -EdgeTestAnimations off by default and --animations on clears it.

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

No visual change in normal builds. Tested on an iOS simulator debug build (base 2efa138):

  • Every interpreter run used -EdgeTestAnimations off; all 12 harness library flows pass.
  • Spinner check on the Dev Tab's permanent-spinner button: waitForAnimationToEnd settled in 0.16s with the switch off and ran to its 5s timeout with animations on. The attached frame shows the frozen spinner still on screen.
  • Same build, both modes: login-if-needed 7.86s on / 7.82s off, open-settings 2.01s on / 2.09s off, all passing. buy-quote on an earlier build: 28.9s on / 28.7s off.
  • verify-repo (eslint, jest) passes.

Test evidence

b509576
Add test-mode animation switch for UI tests
2026-10-01

11. frozen spinner animations off

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

Debug iOS builds read the EdgeTestAnimations user default (the
-EdgeTestAnimations launch argument). off turns UIKit animations off
and fast runs the window's Core Animation clock 100x. Either value
also mounts Reanimated's ReducedMotionConfig with ReduceMotion.Always,
so withRepeat loops (Shimmer, ShimmerCard, SwipeChart) stop after one
cycle, and freezes UIActivityIndicatorView spinners in place, so
screenshots settle between automated steps. RN core Animated is only
used for finite fades here, so it needs no change. Release builds and
Android ignore the switch.
@j0ntz
j0ntz force-pushed the jon/xcuitest-interpreter branch from b509576 to 3a142cd Compare October 1, 2026 22:07

@peachbits peachbits left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One non-blocking suggestion:

In dev builds, ReducedMotionConfig logs Reduced motion setting is overwritten with mode 'always'. through console.warn on mount. Unless LOGBOX_DISABLE is set, that shows a LogBox warning toast at the bottom of the screen on every test-mode launch, over the tab bar, which works against letting screenshots settle. Consider adding the message to the LogBox.ignoreLogs list in src/app.ts so test runs don't depend on LOGBOX_DISABLE being set.

@j0ntz

j0ntz commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

Not changed in this PR. The LogBox.ignoreLogs suggestion for the ReducedMotionConfig warning is recorded on the task as a possible followup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants