Skip to content

Commit

Permalink
fix: Update sequential animation test
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Jan 9, 2025
1 parent c29751f commit b586ccc
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions crates/hooks/tests/use_animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,21 +255,13 @@ pub async fn sequential() {
assert!(width_a > 10.0);
assert_eq!(width_b, 10.0);

// Finished A and started B
utils.wait_for_update().await;
sleep(Duration::from_millis(16)).await;
// Enable event loop ticker
utils.config().event_loop_ticker = true;

// Finished A and B
utils.wait_for_update().await;
sleep(Duration::from_millis(16)).await;
sleep(Duration::from_millis(50)).await;
utils.wait_for_update().await;

let width_a = utils.root().get(0).area().unwrap().width();
let width_b = utils.root().get(0).get(0).area().unwrap().width();
assert_eq!(width_a, 100.0);
assert!(width_b > 10.0);
assert_ne!(width_b, 100.0);

// Finished B
sleep(Duration::from_millis(32)).await;
utils.wait_for_update().await;

let width_a = utils.root().get(0).area().unwrap().width();
Expand Down

0 comments on commit b586ccc

Please sign in to comment.