message: fix: Fix root transitions
diff: @@ -2,6 +2,7 @@ import { act } from 'react-dom/test-utils';
  import { baselineComponent, mockScrollContext, mountTest } from '../../testing/utils';
  import { render } from '@testing-library/react';
  import View from '../View/View';
  +import ConfigProvider from '../ConfigProvider/ConfigProvider';
  import Root from './Root';
  beforeEach(() => jest.useFakeTimers());
  @@ -10,6 +11,7 @@ afterEach(() => jest.useRealTimers());
  const views = [
  <View id="v1" key="1" activePanel={null} />,
  <View id="v2" key="2" activePanel={null} />,
  + <View id="v3" key="3" activePanel={null} />,
  ];
  describe('Root', () => {
  @@ -30,10 +32,23 @@ describe('Root', () => {
  expect(document.getElementById('v1')).toBeNull();
  expect(document.getElementById('v2')).not.toBeNull();
  });
  - it('calls onTransition', () => {
  + });
  +
  + describe('calls onTransition', () => {
  + it.each([
  + ['with animation', true],
  + ['without animation', false],
  + ])('%s', (_name, animate) => {
  const onTransition = jest.fn();
  - render(<Root activeView="v1" onTransition={onTransition}>{views}</Root>)
  - .rerender(<Root activeView="v2" onTransition={onTransition}>{views}</Root>);
  + render((
  + <ConfigProvider transitionMotionEnabled={animate}>
  + <Root activeView="v1" onTransition={onTransition}>{views}</Root>
  + </ConfigProvider>
  + )).rerender((
  + <ConfigProvider transitionMotionEnabled={animate}>
  + <Root activeView="v2" onTransition={onTransition}>{views}</Root>
  + </ConfigProvider>
  + ));
  act(() => jest.runAllTimers());
  expect(onTransition).toBeCalledTimes(1);
  expect(onTransition).toBeCalledWith({ from: 'v1', to: 'v2', isBack: false });
  @@ -45,6 +60,24 @@ describe('Root', () => {
  act(() => jest.runAllTimers());
  expect(onTransition).toBeCalledWith({ from: 'v2', to: 'v1', isBack: true });
  });
  + it('once on rapid transitions', () => {
  + const onTransition = jest.fn();
  + const h = render(<Root activeView="v2" onTransition={onTransition}>{views}</Root>);
  + h.rerender(<Root activeView="v1" onTransition={onTransition}>{views}</Root>);
  + h.rerender(<Root activeView="v3" onTransition={onTransition}>{views}</Root>);
  + act(() => jest.runAllTimers());
  + expect(onTransition).toBeCalledTimes(1);
  + expect(onTransition).toBeCalledWith({ from: 'v1', to: 'v3', isBack: false });
  + });
  + it('once on "canceled" transition', () => {
  + const onTransition = jest.fn();
  + const h = render(<Root activeView="v1" onTransition={onTransition}>{views}</Root>);
  + h.rerender(<Root activeView="v2" onTransition={onTransition}>{views}</Root>);
  + h.rerender(<Root activeView="v1" onTransition={onTransition}>{views}</Root>);
  + act(() => jest.runAllTimers());
  + expect(onTransition).toBeCalledTimes(1);
  + expect(onTransition).toBeCalledWith({ from: 'v2', to: 'v1', isBack: true });
  + });
  });
  describe('blurs active element', () => {
  