Uploaded image for project: 'Magnolia Test Framework'
  1. Magnolia Test Framework
  2. MGNLTEST-24

ContentApp provides facility to assert values in specific columns/cells

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • None

      Context

      For the UI-tests, we need to know the status of items of content apps. For the time being these concerns mainly the status of JCR nodes of JCR content apps.

      Current existing method selectRowByPath(String absolutePath) right now can take a path of a node as argument such as 
      /modules/publishing-core/config/receivers/magnoliaPublic9080
      IF we would allow an argument like 
      /modules/publishing-core/config/receivers/magnoliaPublic9080@enabled, this would allow to execute the action Edit property, something which currently is not possible.
      ... and actually also fails quite often (due to timing issues).
      Maybe we can make

       

      Possible new methods and their context

      Item status

      Status regarding "not published", "published", "updated", "marked for deletion" (trash bin icon)

      Use case: Testing pages app and several "core JCR functions"

      Sasha proposed to expose methods delivering such info on the existing page object info.magnolia.testframework.ContentApp.
      E.g.:

      • String itemStatus(String label)
      • String itemStatus(String nodePath)
      • boolean isMarkedForDeletion(String label)
      • boolean isMarkedForDeletion(String nodePath)

      Origin of icon (for resources)

      Provide a method which returns the origin of a resource item (file, JCR, classpath)

      Use case: Various tests in the Resources app.

      possible method: String resourceOrigin (String itemPath)

      Possibly updated methods

      selectRowByPath(String absolutePath) ... enabling both 

      • path of a node
      • path of a property of a node

      allowing code like this:

      ContentApp app = expect.contentApp("Configuration")
                      .selectRowByPath("/server/filters/servlets/DamDownloadServlet@enabled")
      assertTrue(app.rowIsSelected("true"))
      

      Further "discussion"

      Row page object?

      There once was also the idea (also from Sasha) to probably expose a page object Row.

      Content apps with non JCR items

      We also should keep in mind, that not all the content apps we are interested in contain only JCR nodes.
      This concerns so far:

      • Definitions app
      • Resources app
      • ..

      .

       

        Acceptance criteria

              Unassigned Unassigned
              cmeier Christoph Meier
              Foundation
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Work Started:

                  Task DoR