Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some test fixes #1834

Merged
merged 4 commits into from
Aug 21, 2024
Merged

Some test fixes #1834

merged 4 commits into from
Aug 21, 2024

Commits on Aug 21, 2024

  1. test: Fix pixel test race in testCreateContainer*()

    Wait for the registry search to show the expected value *before* doing
    the pixel test.
    
    Also, the dialog's filter is already set to "Local", that was done just
    a few lines above. Drop the redundant click.
    martinpitt committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    2de78f7 View commit details
    Browse the repository at this point in the history
  2. test: Fix registry switch race in testCreateContainer*

    That dialog switches between the "All" and "Local" filter of images.
    The busybox image is shown in both views; however, it gets re-rendered
    on switch, so clicking on it is a race condition -- without waiting the
    click often goes to the *old* "All" result.
    
    We can't directly wait on that transition. So switch to a different
    registry filter first, wait for the "No images found", and then switch
    to "Local", so that our `wait_visible()` can take over.
    martinpitt committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    fa4ced8 View commit details
    Browse the repository at this point in the history
  3. test: Drop stray Enter key presses from testRunImage

    These were introduced in commit a47c186 without justification,
    and it's not clear what they were meant to do. Depending on the timing
    they change/mess up the value in the file choosers, leading to random test
    failures.
    martinpitt committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    2c78650 View commit details
    Browse the repository at this point in the history
  4. test: More precise click on CPU shares number input

    Enabling the disabled element only works when clicking on the [ - ] or
    [ + ] buttons, not the number itself. With Firefox the test will soon
    click into the center of the element, which is the number. Make the
    selector more specific to ensure it goes to the [ - ] button.
    
    Also circumvent the "element must be not enabled" restriction by
    directly using `Browser.mouse()`. This has always been a race condition,
    as we expect the number input to be disabled by default.
    jelly authored and martinpitt committed Aug 21, 2024
    Configuration menu
    Copy the full SHA
    bb0a449 View commit details
    Browse the repository at this point in the history