Uploaded image for project: 'Community Edition'
  1. Community Edition
  2. MGNLCE-86 UI Test improvements as preparation for using docker and chrome
  3. MGNLCE-87

Use consequently waitUntils in dynamic situations instead of delays, asserts and nothing

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.7, 5.6
    • Component/s: None
    • Labels:
      None
    • Sprint:
      Basel 106, Basel 107, Basel 108, Basel 109, Basel 110, Basel 111, Basel 112
    • Magnolia Release:
      5.5.7, 5.6

      Description

      Using asserts together with delays in a dynamic web page context points to a test code smell: This points usually to a race condition. In such cases wait untils should be used. With wait untils we have the possibility to describe the precise condition we expect to be present after all dynamic actions took place.

      As waitUntils are in the end like async assertions we should name them assert. Otherwise many developers tend to not fully understand the them. Two convinience methods are added to use wait untils with the emphasize on they being assertions in the naming. Additionally they have the possibility to add a fail message like any other assert method and throw the standard AssertionError instead of the TimeoutException.

        Attachments

          Activity

            People

            • Assignee:
              mmuehlebach Michael Mühlebach
              Reporter:
              mmuehlebach Michael Mühlebach
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: