[MGNLTEST-24] ContentApp provides facility to assert values in specific columns/cells Created: 24/Oct/19  Updated: 09/Nov/23

Status: Selected
Project: Magnolia Test Framework
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Christoph Meier Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: QA&Testing
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MGNLUI-6850 Choose appropriate deprecation strate... Closed
duplicate
is duplicated by MGNLTEST-110 Implement support for cell selection Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: core-TF-features-bugs-improvements
Story Points: 2
Team: Foundation
Work Started:

 Description   

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
  • ..

.

 



 Comments   
Comment by Šimon Demočko [ 03/Jan/20 ]

Page object Row }}would be helpful for more fine grained manipulations and state checking.{{ isFocused, isSelected could be used at least in tests regarding shortcuts. 

Comment by Mikaël Geljić [ 17/Dec/20 ]

worth generalizing from current support for activationStatus?

see also use case & proposed API by aichimescu in MGNLTEST-110 (closing as dup)

Suggestion for API extension:
for ContentApp

boolean hasGridColumn(String columnName)
RowPageObject selectRowByPath(rowPath)

for RowPageObject

  String getCellContentByColumnName(String columnName)
Comment by Maxime Michel [ 27/Sep/21 ]

rkovarik do you have an ETA for the porting of Configuration?

Comment by Roman Kovařík [ 27/Sep/21 ]

Migrations are on hold, we are in maintenance mode till the end of this year.

Generated at Mon Feb 12 07:44:48 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.