flexpect - v0.21.0
    Preparing search index...
    • Asserts that the target element does not overlap with the reference element.

      This matcher checks whether the bounding boxes of the target element and the reference element intersect. If there is any overlap, the matcher fails and provides detailed information about the intersection area and dimensions.

      The function is useful for verifying layout constraints where elements should remain visually separated, such as avoiding collisions between buttons, modals, or other UI components.

      Parameters

      • element: Locator

        The element as a Locator whose overlap is checked.

      • reference: Locator

        The element as a Locator relative to which overlap is checked.

      Returns Promise<MatcherReturnType>

      A Promise that resolves with the matcher result.

      // Checks that a tooltip does not overlap a button
      await expect(tooltip).toNotOverlapWith(button);