Skip to content
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

Manual test fixes #6384

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Manual test fixes #6384

wants to merge 13 commits into from

Conversation

Latropos
Copy link
Contributor

@Latropos Latropos commented Aug 7, 2024

Summary

Manual test fixes include changes like:

  • Replace flaky test animations/withSequence/arrays.test.tsx with snapshot
  • Adjust waitTime or replace wait with waitForAnimationUpdates

Test plan

I was testing the tests for the flakiness running them 100 times in a row:

CodeTest summary
+ for (let i = 0; i < 100; i += 1) {
  test.each([500, 1000])('Run frameCallback for **%p**ms',
    async timeToStop => {
    await render(
      <CancelAfterDelayComponent timeToStop={timeToStop} />);
    const animatedComponent = 
      getTestComponent(STOP_AFTER_DELAY_REF);

    await wait(timeToStop + 200);

    const expectedWidth = timeToStop / 8;
    expect(await animatedComponent.getAnimatedStyle('width')).
-      toBeWithinRange(expectedWidth - 5, expectedWidth + 5);
+     toBeWithinRange(expectedWidth - 1, expectedWidth + 1);
      });
+    }
image

@Latropos Latropos marked this pull request as ready for review August 8, 2024 10:30
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