Uploaded image for project: 'FOLIO'
  1. FOLIO
  2. FOLIO-2099

BigTest: counterintuitive behavior using isPresent

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • TBD
    • Resolution: Won't Do
    • None

    Description

      We discovered that tests written using the isPresent property can "fail" (i.e., not behave as expected) in counterintuitive ways. A test written in the form

      expect([interactor].[selector].isPresent).to.be.[boolean] (example)

      will pass whether the boolean comparator is true or false. Upon reflection, this is presumably because of the way that convergences behave: while waiting for a component to appear in the DOM, isPresent will return false, and thus a false comparison will pass. If the component does appear before the timeout, then a true comparison will also pass. Thus this probably is not an actual bug, but it would probably be a good idea to clarify and emphasize this behavior in the documentation. If a developer doesn't fully understand what's going on with the convergences, it's very easy to write meaningless tests using isPresent.

      TestRail: Results

        Attachments

          Activity

            People

              Emelianov Anton Emelianov
              mattjlc Matt Connolly
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                TestRail: Runs

                  TestRail: Cases