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

[stable21] Add missing waits and asserts in acceptance tests #25993

Merged
merged 9 commits into from
Mar 8, 2021

Commits on Mar 8, 2021

  1. Add missing waits when finding elements in the acceptance tests

    As no timeout was specified the elements were tried to be found just
    once. This caused the steps to fail if the elements did not appear yet
    in the page when they were tried to be found.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    f3a4ec7 View commit details
    Browse the repository at this point in the history
  2. Verify WaitFor::element... results with an assertion

    WaitFor::element... calls only perform the waiting and return whether
    the condition succeeded or not, but that result needs to be explicitly
    checked to prevent further steps from being executed if the wait failed.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    d03bc3e View commit details
    Browse the repository at this point in the history
  3. Fix delete user acceptance test

    Adding some missing asserts showed that the "delete user" acceptance
    test was silently failing, as the deletion was not being confirmed in
    the dialog and thus the user was not being deleted.
    
    The dialog button contains a single quote ("user0's"), so the XPath
    expression had to be adjusted (it seems that it is not possible to
    escape a single quote in a string enclosed in single quotes in XPath
    1.0).
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    34814ad View commit details
    Browse the repository at this point in the history
  4. Fix identation

    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    4c98d29 View commit details
    Browse the repository at this point in the history
  5. Add locator for apps list

    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    270db2f View commit details
    Browse the repository at this point in the history
  6. Find elements through the actor rather than the driver

    "Actor::find" is a more robust way to look for elements, as it handles
    some exceptions that may be thrown. Therefore, even if the elements are
    not actually used and it is only checked whether they exist or not using
    the actor is the preferred way when possible (and it also makes it
    consistent with the rest of the acceptance tests).
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    1058abc View commit details
    Browse the repository at this point in the history
  7. Add explicit locator for "Enable all" bundle button

    Instead of looking for the bundle button and then checking its value now
    the expected value is included in the locator and the button is checked
    similarly to other elements.
    
    No "Disable all" locator was added as it was not currently needed
    anywhere.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    b086a0f View commit details
    Browse the repository at this point in the history
  8. Assert also element visibility instead of just finding it

    Although if the element could not be found an exception would be thrown
    and the test aborted if an element is in the DOM but hidden it would be
    found and the test would pass.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    3a470c2 View commit details
    Browse the repository at this point in the history
  9. Find directly the label instead of falling back to it

    The input element is always hidden, so the check always ended falling
    back to the label. Moreover, the label is the element that the user
    interacts with, so it must be the one used.
    
    Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
    danxuliu authored and backportbot[bot] committed Mar 8, 2021
    Configuration menu
    Copy the full SHA
    8185c46 View commit details
    Browse the repository at this point in the history