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

      • Left alignment (alignment = 'left'):

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

        |---------[element]---------|
        
      • Right alignment (alignment = 'right'):

        |------------------[element]|
        

      Parameters

      Returns Promise<MatcherReturnType>

      A Promise that resolves with the matcher result.

      // Assert that a button is left-aligned with its card container, allowing 3% horizontal tolerance
      await expect(buttonLocator).toBeHorizontallyAlignedWith(parentLocator, HorizontalAlignment.Left, {
      tolerancePercent: 3
      });
      // Assert that a button is horizontally centered with its card container (default options)
      await expect(buttonLocator).toBeHorizontallyAlignedWith(parentLocator, HorizontalAlignment.Center);