From fe1b1a67fb37a62a3e07b17719912bf2bb965e77 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Wed, 4 Sep 2024 13:05:36 +0200 Subject: [PATCH] update failing test The order slightly changed here, but it looks more correct now as well. The `child-2-1` and `child-2-2` have the same duration/delay, so the order that they are rendered in seems to be the correct order. That said, these DOM nodes are on the same level (siblings), so for these callbacks we are testing here the order doesn't really matter. The order that _does_ matter is that the `after*` events of a parent fire _after_ the `after*` events of the children, which it still does. --- .../src/components/transition/transition.test.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/@headlessui-react/src/components/transition/transition.test.tsx b/packages/@headlessui-react/src/components/transition/transition.test.tsx index 5911fbc7d9..137373393e 100644 --- a/packages/@headlessui-react/src/components/transition/transition.test.tsx +++ b/packages/@headlessui-react/src/components/transition/transition.test.tsx @@ -1050,8 +1050,8 @@ describe('Events', () => { 'child-2-2: beforeEnter', 'child-1: afterEnter', - 'child-2-2: afterEnter', 'child-2-1: afterEnter', + 'child-2-2: afterEnter', 'child-2: afterEnter', 'root: afterEnter', @@ -1064,8 +1064,8 @@ describe('Events', () => { 'root: beforeLeave', 'child-1: afterLeave', - 'child-2-2: afterLeave', 'child-2-1: afterLeave', + 'child-2-2: afterLeave', 'child-2: afterLeave', 'root: afterLeave', @@ -1078,8 +1078,8 @@ describe('Events', () => { 'child-2-2: beforeEnter', 'child-1: afterEnter', - 'child-2-2: afterEnter', 'child-2-1: afterEnter', + 'child-2-2: afterEnter', 'child-2: afterEnter', 'root: afterEnter', @@ -1092,8 +1092,8 @@ describe('Events', () => { 'root: beforeLeave', 'child-1: afterLeave', - 'child-2-2: afterLeave', 'child-2-1: afterLeave', + 'child-2-2: afterLeave', 'child-2: afterLeave', 'root: afterLeave', ])