Skip to content

test(Fabric): add e2e test for issue 577#2816

Merged
kligarski merged 9 commits intomainfrom
@kligarski/add-e2e-tests-577
Apr 1, 2025
Merged

test(Fabric): add e2e test for issue 577#2816
kligarski merged 9 commits intomainfrom
@kligarski/add-e2e-tests-577

Conversation

@kligarski
Copy link
Copy Markdown
Contributor

@kligarski kligarski commented Mar 28, 2025

Description

Check which example screens from issues/PRs can be used in e2e testing for tests Test550, ..., Test577 and implement them if possible for Fabric.

Test550

Skipped because the issue is present on the current version (custom native header back button image). When it is resolved, we might create an e2e test for it.

Test556

Skipped because we can't check flickering nor non-deterministic white screen bug.

Test564

Skipped because the issue is still present on the current version (headers overlapping when one navigatior has headerTransparent: true). When it is resolved, we might create an e2e test for it.

Test577

Test created. It checks whether attempting to close a gestureEnabled: false modal on iOS doesn't break the modal's height allowing the content underneath to be visible. The test is present only on iOS because of differences in modal between iOS and Android.

Changes

  • add Test577
  • add comments for test screen in apps/src/tests/index.ts with the reason for (not) implementing e2e test for it
  • add e2e-utils.ts with decribeIfiOS function that will skip running the tests if they are run on Android

Test code and steps to reproduce

CI

Checklist

  • Ensured that CI passes

@kligarski kligarski requested a review from kkafar March 28, 2025 10:58
@kligarski
Copy link
Copy Markdown
Contributor Author

After splitting tests into seperate files, CI fails on Android because some tests are iOS-only. We need to figure out how to handle it.

@kkafar
Copy link
Copy Markdown
Member

kkafar commented Mar 28, 2025

I don't know the details yet, but maybe lets add some else clause & add some empty test on Android?

@kligarski kligarski force-pushed the @kligarski/add-e2e-tests-577 branch from 0571990 to 43d5f55 Compare March 31, 2025 14:14
@kligarski
Copy link
Copy Markdown
Contributor Author

kligarski commented Mar 31, 2025

We might consider using --passWithNoTests Jest flag to avoid wasting resources for testing only that a test exists in the menu on Android (considering how much time scrolling takes in these tests). We may also create a test that asserts something visible from the start but it feels wrong to do so.

Copy link
Copy Markdown
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.

Looks good initially

Comment thread FabricExample/e2e/issuesTests/Test577.e2e.ts Outdated
@kkafar kkafar self-requested a review March 31, 2025 15:02
@kligarski
Copy link
Copy Markdown
Contributor Author

It turns out that --passWithNoTests works only if there are no files at all - this is not our case. I created an utility that allows us to use describe or describe.skip based on platform (Android or iOS).

Copy link
Copy Markdown
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.

@kligarski kligarski merged commit 702d4af into main Apr 1, 2025
5 checks passed
@kligarski kligarski deleted the @kligarski/add-e2e-tests-577 branch April 1, 2025 16:05
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