~tpeeters/ubuntu-ui-toolkit/toolbarActions-hide

« back to all changes in this revision

Viewing changes to tests/unit/tst_components/tst_page.qml

merge lp:~fboucault/ubuntu-ui-toolkit/theme_relative_path_fix. All API tests pass now

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    width: 200
23
23
    height: 200
24
24
 
 
25
    Action {
 
26
        id: action0
 
27
    }
 
28
 
25
29
    Flickable {
26
30
        id: testFlickable
27
31
    }
59
63
            compare(page.__propagated.header, mainView.__propagated.header, "page header equals mainView header")
60
64
            compare(page.__propagated.header.title, page.title, "header title is same as page title")
61
65
            compare(page.__propagated.header.visible, false, "header is not visible initially because there is no title")
 
66
            compare(page.actions.length, 0, "page actions list empty by default")
62
67
        }
63
68
 
64
69
        function test_0_noHeader_bug1162028_bug1161910() {
97
102
            compare(page.pageStack, null, "is not set by default")
98
103
        }
99
104
 
 
105
        function test_actions() {
 
106
            // FIXME: Check the contents of page.actions. This is currently not
 
107
            //  possible because UnityActions.ActionContext.actions does not support it,
 
108
            //  so changes to UnityActions are needed.
 
109
            page.actions = [action0];
 
110
            compare(page.actions.length, 1, "Actions can be added to page actions");
 
111
            page.actions = [];
 
112
            compare(page.actions.length, 0, "Page action list can be cleared");
 
113
        }
100
114
        function test_flickable_bug1200642_bug1192591() {
101
115
            compare(page.flickable, pageFlickable, "page flickable is correctly detected");
102
116
            compare(page.__propagated.header.flickable, pageFlickable, "header flickable is correctly detected"); // bug 1200642 FAIL