flexpect - v0.21.0
    Preparing search index...
    • Asserts that an element is positioned below another element.

      The element passes if its top edge is at or below the bottom edge of the reference, within the specified tolerance.

      • Strictly below:
      ┌───────────────┐
      │   reference   │
      └───────────────┘
              |
              ↓
      ┌───────────────┐
      │    element    │
      └───────────────┘
      
      • Touching:
      ┌───────────────┐
      │   reference   │
      └───────────────┘
      ┌───────────────┐
      │    element    │
      └───────────────┘
      

      Parameters

      Returns Promise<MatcherReturnType>

      A Promise that resolves with the matcher result.

      // Element is strictly below reference (no overlap, no tolerance)
      await expect(content).toBeBelow(header);
      // Element can overlap reference by up to 10px
      await expect(subtitle).toBeBelow(title, { tolerance: 10, toleranceUnit: ToleranceUnit.Pixels });
      // Element can overlap reference by up to 5% of reference height
      await expect(text).toBeBelow(icon, {
      tolerance: 5,
      toleranceUnit: ToleranceUnit.Percent
      });