Dialog:Close On Outside Click

Build 2480 on feat-item-actions-on-hover
Reviewing disabled
The baseline is smaller than the new snapshot (641x466 to 1200x900).
Fail
Dialog.stories.tsx

expect(element).not.toBeInTheDocument()

View in Storybook
Chrome 140
1200x900
Linux Ubuntu 24.04.4
eb5a02 on feat-item-actions-on-hover
Caught exception in play function

This story threw an error after it finished rendering which means interactions may not have been executed fully.

Error: expect(element).not.toBeInTheDocument()

expected document not to contain element, found <section
  aria-labelledby="react-aria6762309630-«r2»"
  class="t6"
  data-dismissable=""
  data-id="Dialog"
  data-qa="Dialog"
  data-size="medium"
  data-type="modal"
  role="dialog"
  style="--dialog-size: 479px;"
>
  <button
    aria-disabled="false"
    aria-label="Dismiss"
    class="t7"
    data-button=""
    data-description="none"
    data-has-icon=""
    data-has-start-content=""
    data-qa="ModalCloseButton"
    data-react-aria-pressable="true"
    data-shape="button"
    data-size="medium"
    data-theme="default"
    data-type="neutral"
    label="Dismiss"
    tabindex="0"
    type="button"
  >
    <div
      data-element="Icon"
    >
      <span
        aria-hidden="true"
        class="t8"
        data-qa="CloseIcon"
      >
        <svg
          class="tabler-icon tabler-icon-x "
          fill="none"
          height="24"
          stroke="currentColor"
          stroke-linecap="round"
          stroke-linejoin="round"
          stroke-width="2"
          viewBox="0 0 24 24"
          width="24"
          xmlns="http://www.w3.org/2000/svg"
        >
          <path
            d="M18 6l-12 12"
          />
          <path
            d="M6 6l12 12"
          />
        </svg>
      </span>
    </div>
  </button>
  <header
    class="t9"
    data-qa="Header"
  >
    <h1
      class="t10"
      data-level="1"
      data-qa="Title"
      id="react-aria6762309630-«r2»"
    >
      Modal title
    </h1>
    <span
      class="t11"
      data-qa="Text"
    >
      Header
    </span>
  </header>
  <section
    class="t12"
    data-qa="Content"
  >
    <p
      class="t13"
      data-qa="Paragraph"
    >
      Test content
    </p>
    <p
      class="t13"
      data-qa="Paragraph"
    >
      Test content
    </p>
  </section>
  <div
    class="t14"
    data-id="Footer"
    data-qa="Footer"
  >
    <div
      class="t15"
      data-qa="ButtonGroup"
    >
      <button
        class="t16"
        data-qa="Button"
        data-react-aria-pressable="true"
        data-size="medium"
        data-theme="default"
        data-type="primary"
        tabindex="0"
        type="button"
      >
        Action
      </button>
      <button
        class="t2"
        data-qa="Button"
        data-react-aria-pressable="true"
        data-size="medium"
        data-theme="default"
        data-type="outline"
        tabindex="0"
        type="button"
      >
        Sec
      </button>
      <button
        class="t2"
        data-qa="Button"
        data-react-aria-pressable="true"
        data-size="medium"
        data-theme="default"
        data-type="outline"
        tabindex="0"
        type="button"
      >
        Cancel
      </button>
    </div>
    <span
      class="t11"
      data-qa="Text"
    >
      Footer
    </span>
  </div>
</section> instead
    at Proxy.s (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:1263:8665)
    at Proxy.<anonymous> (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:1236:5621)
    at Proxy.methodWrapper (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:1153:12484)
    at LL.invoke (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:207:9217)
    at LL.intercept (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:207:6627)
    at LL.track (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:207:6357)
    at Proxy.toBeInTheDocument (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:207:5725)
    at v.play (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/Dialog.stories-B3pCeZod.js:1:5426)
    at async s7.runPhase (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:908:825)
    at async s7.render (https://626ee6db91d1c8004a912249-uyebiqchox.capture-loopback.chromatic.com/assets/iframe-DWGl8uUf.js:908:3854)