Use findChild to test role names in models
Bug #1215818 reported by
Cris Dywan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
U1DB Qt/ QML |
Confirmed
|
Low
|
Unassigned |
Bug Description
The unit tests for the model are incomplete in particular when it comes to testing role names because at the time I didn't find a way to properly retrieve values from delegates. I've learnt about a method we can use:
import Ubuntu.Test 0.1
UbuntuTestCase {
when: windowShown
ListView {
delegate: Item {
objectName: "roleItem"
property bool roleEnabled: model.enabled
test_modelRoles () {
verify(
var item = findChild(roleTest, "roleItem");
verify(item, "has children");
verify(
}
Changed in u1db-qt: | |
status: | New → Confirmed |
importance: | Undecided → Low |
To post a comment you must log in.