We can't set the objectName to a ActionSelectionPopover Action
Bug #1205144 reported by
Leo Arias
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Committed
|
Undecided
|
Unassigned | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
High
|
Cris Dywan |
Bug Description
I'm writing tests to the ubuntu-
I'd like autopilot to click the rename button, but currently I can only do it selecting the object by its text. This is bad as the text can change and it will fail on a machine with a different language. It would be better to select it by objectName.
But, if I do something like this:
Action {
}
The objectName I assigned is not present on the element.
Related branches
lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/actionSelectionPopoverItem
- Tim Peeters: Approve
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 166 lines (+89/-10)4 files modifiedsrc/Ubuntu/Components/Popups/1.2/ActionSelectionPopover.qml (+3/-1)
src/Ubuntu/Components/Popups/1.3/ActionSelectionPopover.qml (+3/-1)
tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/popups.py (+27/-6)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_popups.py (+56/-2)
Changed in ubuntu-ui-toolkit: | |
status: | New → Confirmed |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Confirmed |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
assignee: | nobody → Christian Dywan (kalikiana) |
status: | Confirmed → In Progress |
importance: | Undecided → High |
To post a comment you must log in.
ActionSelection Popover uses a delegate to create the actual visual component that represents the Action.
If you set the objectName to the Action, it's not directly available in the ActionSelection Popover elements if you don't set a unique objectName to the delegate element as well.
If you are using ListItems.Standard as your delegate the Action is available from Standard.action property, so in theory at least you should be able to access the objectName you set to the Action through:
<delegate> .action. objectName
I'm only guessing here right now, so please provide some example code what you are trying to do.