Skip to content

fix(CI): change order of events in Fabric iOS events e2e test #2785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 18, 2025

Conversation

kligarski
Copy link
Contributor

@kligarski kligarski commented Mar 18, 2025

Description

Changed order of events in Fabric iOS events e2e test.

The order of events in this test differs from the Paper version of the same test. When screen is removed after using iOS native back button, native side notifies JS via:

  1. onDismissed => in reaction to this event, a navigation action is dispatched, which causes emission of beforeRemove event;
  2. onDisappear => in reaction to this event, transitionEnd with closing=true is emitted.

On Fabric, these events are handled in the same order as the order of notifications from the native side. On Paper, this is not the case - onDismissed is executed after two transitionEnd events are already handled. onDismissed is dispatched asynchronously from the native side (it is wrapped in dispatch_async!) and this probably delays handling it on JS side but I am not sure of the details why it is dispatched asynchronously.

Currently this divergence between architectures seems to not lead to any issues. Just let it be noted & not forgotten.

Changes

  • change order of assertions
  • add comment with explanation

Test code and steps to reproduce

Run Fabric iOS CI.

Checklist

  • Ensured that CI for Fabric iOS passes

@kligarski kligarski requested a review from kkafar March 18, 2025 09:08
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@kligarski kligarski merged commit 65f6e92 into main Mar 18, 2025
5 checks passed
@kligarski kligarski deleted the @kligarski/fix-e2e-Fabric-iOS-events branch March 18, 2025 10:04
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