flexpect - v0.9.0
    Preparing search index...
    • Asserts that the target element is vertically aligned with the specified container according to the given alignment type.

      • Top alignment (alignment = 'top'):

        |[element]|
        |         |
        |         |
        
      • Center alignment (alignment = 'center'):

        |         |
        |[element]|
        |         |
        
      • Bottom alignment (alignment = 'bottom'):

        |         |
        |         |
        |[element]|
        

      Parameters

      Returns Promise<MatcherReturnType>

      A Promise that resolves with the matcher result.

      // Check that a header is bottom-aligned with its section container, allowing a 2% vertical tolerance
      await expect(headerLocator).toBeVerticallyAlignedWith(parentLocator, VerticalAlignment.Bottom, {
      tolerancePercent: 2
      });
      // Check that a header is vertically centered within its section container (default options)
      await expect(headerLocator).toBeVerticallyAlignedWith(parentLocator, VerticalAlignment.Center);