Merge lp:~3v1n0/unity8/fake-indicators-model into lp:unity8

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Lukáš Tinkl
Approved revision: 2449
Merged at revision: 2647
Proposed branch: lp:~3v1n0/unity8/fake-indicators-model
Merge into: lp:unity8
Prerequisite: lp:~3v1n0/unity8/indicators-client-load-fix
Diff against target: 1251 lines (+1141/-7)
4 files modified
tests/mocks/Unity/Indicators/CMakeLists.txt (+1/-0)
tests/mocks/Unity/Indicators/IndicatorsModel.qml (+32/-7)
tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js (+1106/-0)
tests/mocks/Unity/Indicators/fakeplugin.cpp (+2/-0)
To merge this branch: bzr merge lp:~3v1n0/unity8/fake-indicators-model
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Needs Fixing
Lukáš Tinkl (community) Approve
Michał Sawicz Needs Fixing
Albert Astals Cid (community) Approve
Michael Terry Needs Fixing
Nick Dedekind Pending
Review via email: mp+297509@code.launchpad.net

Commit message

Indicators, mocks: add fake indicators menuitem to populate mocks with different menu types

Also allow to use fake indicators model in IndicatorsClient

Description of the change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

Nope

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes. make tryShell (or make tryMenuContent) is enough, or this will also allow to launch indicators-client with a fake data model when QML2_IMPORT_PATH points to the mocks path (i.e. builddir/tests/mocks:builddir/tests/utils/modules:builddir/plugins)

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

No debian change here

 * If you changed the UI, has there been a design review?

No UI change, although the indicators used in mocks will show some fake data.

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2445
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1497/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/1996/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2024
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/1941
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/1941
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/1941
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/1932/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1932
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/1932/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1497/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

Looks like we're missing modelprinter.cpp and modelprinter.h

Revision history for this message
Michael Terry (mterry) :
review: Needs Fixing
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Looks like we're missing modelprinter.cpp and modelprinter.h

Actually they are already provided by unity8. I'm just ensuring they are added to the fake lib here.

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2447
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1787/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2341
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1250
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1250
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1250
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2369
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2256
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2256
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2256
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2249/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2249
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2249/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1787/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

Text conflict in tests/mocks/Unity/Indicators/IndicatorsModel.qml
1 conflicts encountered.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

And... Fixed :-)

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2448
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1903/
Executed test runs:
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build/2479/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2507
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2393
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2393
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2393
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2386/artifact/output/*zip*/output.zip
    FAILURE: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2386/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2386/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2386
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2386/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1903/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Albert Astals Cid (aacid) wrote :

* Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

* Did CI run pass? If not, please explain why.
Yes, except broken yakkety

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2448
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1928/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2521
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1357
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1357
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1357
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2549
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/2430
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/2430
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-1-sourcepkg/release=yakkety/2430
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2423/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2423
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2423/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/1928/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

Failing tests:

qmltestrunner.IndicatorItemRow::test_validCurrentItem
qmltestrunner.IndicatorsBar::test_expandSelectedItem
qmltestrunner.IndicatorsMenu::test_swipeForCurrentItem
qmltestrunner.Panel::test_drag_show

review: Needs Fixing
Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :
2448. By Marco Trevisan (Treviño)

Merging with trunk

2449. By Marco Trevisan (Treviño)

fakeindicatorsmodeldata.js: mark indicator-files always visible

This fixes tests using mocks

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Tests should run properly here... Let's wait CI confirmation.

Revision history for this message
Lukáš Tinkl (lukas-kde) wrote :

Yup, tests work fine now, thanks!

* Did you perform an exploratory manual test run of the code change and any related functionality?

Yes

* Did CI run pass? If not, please explain why.

Nope. not yet

review: Approve
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2449
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2134/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/2805
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=vivid+overlay,testname=qmluitests.sh/1553
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/1553/console
    FAILURE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=yakkety,testname=qmluitests.sh/1553/console
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/2833
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=vivid+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=yakkety/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=vivid+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=yakkety/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=vivid+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/2692/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2692
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=yakkety/2692/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/2134/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/mocks/Unity/Indicators/CMakeLists.txt'
2--- tests/mocks/Unity/Indicators/CMakeLists.txt 2015-03-02 14:42:27 +0000
3+++ tests/mocks/Unity/Indicators/CMakeLists.txt 2016-09-08 16:44:47 +0000
4@@ -16,6 +16,7 @@
5 fakeunitymenumodelcache.cpp
6 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/indicators.h
7 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/menucontentactivator.cpp
8+ ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/modelprinter.cpp
9 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/sharedunitymenumodel.cpp
10 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/unitymenumodelcache.cpp
11 ${CMAKE_SOURCE_DIR}/plugins/Unity/Indicators/unitymenumodelstack.cpp
12
13=== modified file 'tests/mocks/Unity/Indicators/IndicatorsModel.qml'
14--- tests/mocks/Unity/Indicators/IndicatorsModel.qml 2016-07-30 16:15:23 +0000
15+++ tests/mocks/Unity/Indicators/IndicatorsModel.qml 2016-09-08 16:44:47 +0000
16@@ -18,6 +18,7 @@
17 import Unity.Indicators 0.1 as Indicators
18 import Unity.InputInfo 0.1
19 import AccountsService 0.1
20+import "fakeindicatorsmodeldata.js" as FakeIndicators
21
22 Indicators.FakeIndicatorsModel {
23 id: root
24@@ -60,7 +61,7 @@
25 }
26 },
27 {
28- "identifier": "fake-indicator-sound",
29+ "identifier": "fake-indicator-files",
30 "indicatorProperties": {
31 "enabled": true,
32 "busName": "com.canonical.indicators.fake4",
33@@ -69,7 +70,7 @@
34 }
35 },
36 {
37- "identifier": "fake-indicator-power",
38+ "identifier": "fake-indicator-sound",
39 "indicatorProperties": {
40 "enabled": true,
41 "busName": "com.canonical.indicators.fake5",
42@@ -78,7 +79,7 @@
43 }
44 },
45 {
46- "identifier": "fake-indicator-datetime",
47+ "identifier": "fake-indicator-power",
48 "indicatorProperties": {
49 "enabled": true,
50 "busName": "com.canonical.indicators.fake6",
51@@ -87,13 +88,22 @@
52 }
53 },
54 {
55- "identifier": "fake-indicator-session",
56+ "identifier": "fake-indicator-datetime",
57 "indicatorProperties": {
58 "enabled": true,
59 "busName": "com.canonical.indicators.fake7",
60 "menuObjectPath": "/com/canonical/indicators/fake7",
61 "actionsObjectPath": "/com/canonical/indicators/fake7"
62 }
63+ },
64+ {
65+ "identifier": "fake-indicator-session",
66+ "indicatorProperties": {
67+ "enabled": true,
68+ "busName": "com.canonical.indicators.fake8",
69+ "menuObjectPath": "/com/canonical/indicators/fake8",
70+ "actionsObjectPath": "/com/canonical/indicators/fake8"
71+ }
72 }
73 ]
74
75@@ -133,21 +143,26 @@
76 "",
77 [ "image://theme/messages-new" ]));
78 Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake4",
79+ getUnityMenuModelData("fake-indicator-files",
80+ "Files (F)",
81+ "",
82+ [ "image://theme/transfer-progress" ]));
83+ Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake5",
84 getUnityMenuModelData("fake-indicator-sound",
85 "Sound (F)",
86 "",
87 [ "image://theme/audio-volume-high" ]));
88- Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake5",
89+ Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake6",
90 getUnityMenuModelData("fake-indicator-power",
91 "Battery (F)",
92 "",
93 [ "image://theme/battery-020" ]));
94- Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake6",
95+ Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake7",
96 getUnityMenuModelData("fake-indicator-datetime",
97 "Upcoming Events (F)",
98 "12:04",
99 []));
100- Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake7",
101+ Indicators.UnityMenuModelCache.setCachedModelData("/com/canonical/indicators/fake8",
102 getUnityMenuModelData("fake-indicator-session",
103 "System (F)",
104 "",
105@@ -155,6 +170,16 @@
106 }
107
108 function getUnityMenuModelData(identifier, title, label, icons) {
109+ var menudata = FakeIndicators.fakeMenuData[identifier];
110+
111+ if (menudata !== undefined) {
112+ var rootState = menudata[0]["rowData"].actionState;
113+ rootState.title = title;
114+ rootState.label = label;
115+ rootState.icons = icons;
116+ return menudata;
117+ }
118+
119 var root = [{
120 "rowData": { // 1
121 "label": "",
122
123=== added file 'tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js'
124--- tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js 1970-01-01 00:00:00 +0000
125+++ tests/mocks/Unity/Indicators/fakeindicatorsmodeldata.js 2016-09-08 16:44:47 +0000
126@@ -0,0 +1,1106 @@
127+var usageScenario = (typeof shell != 'undefined') ? shell.usageScenario : "desktop";
128+
129+var fakeMenuData = {
130+ "fake-indicator-messages": [
131+ {
132+ "rowData": {
133+ "action": "indicator._header",
134+ "actionState": {
135+ "icons": [ "image://theme/messages-new" ],
136+ "label": "",
137+ "title": "Messages (F)",
138+ "visible": true
139+ },
140+ "icon": "",
141+ "isCheck": false,
142+ "isRadio": false,
143+ "isSeparator": false,
144+ "isToggled": false,
145+ "label": "",
146+ "sensitive": true,
147+ "type": "com.canonical.indicator.root"
148+ },
149+ "submenu": [
150+ {
151+ "rowData": {
152+ "label": "There's an updated system image.",
153+ "sensitive": true,
154+ "isSeparator": false,
155+ "icon": "file:///usr/share/ubuntu/settings/system/icons/settings-system-update.svg",
156+ "type": "com.canonical.indicator.messages.messageitem",
157+ "ext": {
158+ "icon": "file:///usr/share/ubuntu/settings/system/icons/settings-system-update.svg",
159+ "xCanonicalAppIcon": "file:///usr/share/ubuntu/settings/system/system-settings.png",
160+ "xCanonicalMessageActions": null,
161+ "xCanonicalText": "Tap to open the system updater.",
162+ "xCanonicalTime": ((new Date).getTime() - 350 * 1000) * 1000,
163+ },
164+ "action": "indicator.ubuntu-system-settings",
165+ "actionState": {},
166+ "isCheck": false,
167+ "isRadio": false,
168+ "isToggled": false,
169+ }
170+ },
171+ {
172+ "rowData": {
173+ "action": "indicator.telephony-service-sms.msg.MSG_ID",
174+ "actionState": {},
175+ "ext": {},
176+ "icon": "file:///usr/share/telephony-service/assets/avatar-default@18.png",
177+ "type": "com.canonical.indicator.messages.messageitem",
178+ "ext": {
179+ "icon": "file:///usr/share/telephony-service/assets/avatar-default@18.png",
180+ "xCanonicalAppIcon": "image://theme/telephony-service-message",
181+ "xCanonicalMessageActions": "",
182+ "xCanonicalText": "This is a message sent to an awesome Ubuntu phone.",
183+ "xCanonicalTime": ((new Date).getTime() - 35 * 1000) * 1000
184+ },
185+ "isCheck": false,
186+ "isRadio": false,
187+ "isSeparator": false,
188+ "isToggled": false,
189+ "label": "+44391234567 - [SIM 1]",
190+ "sensitive": true
191+ }
192+ },
193+ {
194+ "rowData": {
195+ "action": "indicator.remove-all",
196+ "actionState": {},
197+ "ext": {},
198+ "icon": "",
199+ "isCheck": false,
200+ "isRadio": false,
201+ "isSeparator": false,
202+ "isToggled": false,
203+ "label": "Clear All",
204+ "sensitive": true,
205+ "type": "com.canonical.indicator.button"
206+ }
207+ },
208+ ]
209+ }
210+ ],
211+
212+ "fake-indicator-session": [
213+ {
214+ "rowData": {
215+ "action": "indicator._header",
216+ "actionState": {
217+ "icons": [],
218+ "label": "",
219+ "title": "Session (F)",
220+ "visible": usageScenario == "desktop"
221+ },
222+ "icon": "",
223+ "isCheck": false,
224+ "isRadio": false,
225+ "isSeparator": false,
226+ "isToggled": false,
227+ "label": "",
228+ "sensitive": true,
229+ "type": "com.canonical.indicator.root"
230+ },
231+ "submenu": [
232+ {
233+ "rowData": {
234+ "action": "indicator.about",
235+ "actionState": {},
236+ "ext": {},
237+ "icon": "",
238+ "isCheck": false,
239+ "isRadio": false,
240+ "isSeparator": false,
241+ "isToggled": false,
242+ "label": "About this " + usageScenario,
243+ "sensitive": true,
244+ "type": ""
245+ }
246+ },
247+ {
248+ "rowData": {
249+ "action": "indicator.help",
250+ "actionState": {},
251+ "ext": {},
252+ "icon": "",
253+ "isCheck": false,
254+ "isRadio": false,
255+ "isSeparator": false,
256+ "isToggled": false,
257+ "label": "Ubuntu Help",
258+ "sensitive": true,
259+ "type": ""
260+ }
261+ },
262+ {
263+ "rowData": {
264+ "action": "",
265+ "actionState": {},
266+ "ext": {},
267+ "icon": "",
268+ "isCheck": false,
269+ "isRadio": false,
270+ "isSeparator": true,
271+ "isToggled": false,
272+ "label": "",
273+ "sensitive": true,
274+ "type": ""
275+ }
276+ },
277+ {
278+ "rowData": {
279+ "action": "indicator.settings",
280+ "actionState": {},
281+ "ext": {},
282+ "icon": "",
283+ "isCheck": false,
284+ "isRadio": false,
285+ "isSeparator": false,
286+ "isToggled": false,
287+ "label": "System Settings...",
288+ "sensitive": true,
289+ "type": ""
290+ }
291+ },
292+ {
293+ "rowData": {
294+ "action": "",
295+ "actionState": {},
296+ "ext": {},
297+ "icon": "",
298+ "isCheck": false,
299+ "isRadio": false,
300+ "isSeparator": true,
301+ "isToggled": false,
302+ "label": "",
303+ "sensitive": true,
304+ "type": ""
305+ }
306+ },
307+ {
308+ "rowData": {
309+ "action": "indicator.switch-to-screensaver",
310+ "actionState": {},
311+ "ext": {},
312+ "icon": "",
313+ "isCheck": false,
314+ "isRadio": false,
315+ "isSeparator": false,
316+ "isToggled": false,
317+ "label": "Lock",
318+ "sensitive": true,
319+ "type": ""
320+ }
321+ },
322+ {
323+ "rowData": {
324+ "action": "indicator.switch-to-guest",
325+ "actionState": {},
326+ "ext": {},
327+ "icon": "",
328+ "isCheck": false,
329+ "isRadio": false,
330+ "isSeparator": false,
331+ "isToggled": false,
332+ "label": "Guest Session",
333+ "sensitive": true,
334+ "type": "indicator.guest-menu-item"
335+ }
336+ },
337+ {
338+ "rowData": {
339+ "action": "indicator.switch-to-user",
340+ "actionState": {},
341+ "ext": {},
342+ "icon": "",
343+ "isCheck": false,
344+ "isRadio": true,
345+ "isSeparator": false,
346+ "isToggled": false,
347+ "label": "Marco",
348+ "sensitive": true,
349+ "type": "indicator.user-menu-item"
350+ }
351+ },
352+ {
353+ "rowData": {
354+ "action": "indicator.switch-to-user",
355+ "actionState": {},
356+ "ext": {},
357+ "icon": "",
358+ "isCheck": false,
359+ "isRadio": true,
360+ "isSeparator": false,
361+ "isToggled": false,
362+ "label": "Unity8",
363+ "sensitive": true,
364+ "type": "indicator.user-menu-item"
365+ }
366+ },
367+ {
368+ "rowData": {
369+ "action": "",
370+ "actionState": {},
371+ "ext": {},
372+ "icon": "",
373+ "isCheck": false,
374+ "isRadio": false,
375+ "isSeparator": true,
376+ "isToggled": false,
377+ "label": "",
378+ "sensitive": true,
379+ "type": ""
380+ }
381+ },
382+ {
383+ "rowData": {
384+ "action": "indicator.logout",
385+ "actionState": {},
386+ "ext": {},
387+ "icon": "",
388+ "isCheck": false,
389+ "isRadio": false,
390+ "isSeparator": false,
391+ "isToggled": false,
392+ "label": "Logout...",
393+ "sensitive": true,
394+ "type": ""
395+ }
396+ },
397+ {
398+ "rowData": {
399+ "action": "",
400+ "actionState": {},
401+ "ext": {},
402+ "icon": "",
403+ "isCheck": false,
404+ "isRadio": false,
405+ "isSeparator": true,
406+ "isToggled": false,
407+ "label": "",
408+ "sensitive": true,
409+ "type": ""
410+ }
411+ },
412+ {
413+ "rowData": {
414+ "action": "indicator.suspend",
415+ "actionState": {},
416+ "ext": {},
417+ "icon": "",
418+ "isCheck": false,
419+ "isRadio": false,
420+ "isSeparator": false,
421+ "isToggled": false,
422+ "label": "Suspend",
423+ "sensitive": true,
424+ "type": ""
425+ }
426+ },
427+ {
428+ "rowData": {
429+ "action": "indicator.power-off",
430+ "actionState": {},
431+ "ext": {},
432+ "icon": "",
433+ "isCheck": false,
434+ "isRadio": false,
435+ "isSeparator": false,
436+ "isToggled": false,
437+ "label": "Power off...",
438+ "sensitive": true,
439+ "type": ""
440+ }
441+ }
442+ ]
443+ }
444+ ],
445+
446+ "fake-indicator-power": [
447+ {
448+ "rowData": {
449+ "action": "indicator._header",
450+ "actionState": {
451+ "icons": [ "image://theme/battery-020" ],
452+ "label": "",
453+ "title": "Battery (F)",
454+ "visible": true
455+ },
456+ "icon": "",
457+ "isCheck": false,
458+ "isRadio": false,
459+ "isSeparator": false,
460+ "isToggled": false,
461+ "label": "",
462+ "sensitive": true,
463+ "type": "com.canonical.indicator.root"
464+ },
465+ "submenu": [
466+ {
467+ "rowData": {
468+ "action": "indicator.activate-statistics",
469+ "actionState": {},
470+ "ext": {},
471+ "icon": "image://theme/battery-full-charged-symbolic",
472+ "isCheck": false,
473+ "isRadio": false,
474+ "isSeparator": false,
475+ "isToggled": false,
476+ "label": "Battery (full charged)",
477+ "sensitive": true,
478+ "type": "com.canonical.indicator.basic"
479+ }
480+ },
481+ {
482+ "rowData": {
483+ "action": "indicator.activate-statistics",
484+ "actionState": {},
485+ "ext": {},
486+ "icon": "image://theme/battery-100",
487+ "isCheck": false,
488+ "isRadio": false,
489+ "isSeparator": false,
490+ "isToggled": false,
491+ "label": "Battery",
492+ "sensitive": true,
493+ "type": "com.canonical.indicator.basic"
494+ }
495+ },
496+ {
497+ "rowData": {
498+ "action": "",
499+ "actionState": {},
500+ "ext": {},
501+ "icon": "",
502+ "isCheck": false,
503+ "isRadio": false,
504+ "isSeparator": true,
505+ "isToggled": false,
506+ "label": " ",
507+ "sensitive": true,
508+ "type": ""
509+ }
510+ },
511+ {
512+ "rowData": {
513+ "action": "indicator.show-time",
514+ "actionState": false,
515+ "ext": {},
516+ "icon": "",
517+ "isCheck": true,
518+ "isRadio": false,
519+ "isSeparator": false,
520+ "isToggled": false,
521+ "label": "Show time on menubar",
522+ "sensitive": true,
523+ "type": ""
524+ }
525+ },
526+ {
527+ "rowData": {
528+ "action": "indicator.show-percentage",
529+ "actionState": false,
530+ "ext": {},
531+ "icon": "",
532+ "isCheck": true,
533+ "isRadio": false,
534+ "isSeparator": false,
535+ "isToggled": false,
536+ "label": "Show percentage on menubar",
537+ "sensitive": true,
538+ "type": ""
539+ }
540+ },
541+ {
542+ "rowData": {
543+ "action": "indicator.activate-settings",
544+ "actionState": {},
545+ "ext": {},
546+ "icon": "",
547+ "isCheck": false,
548+ "isRadio": false,
549+ "isSeparator": false,
550+ "isToggled": false,
551+ "label": "Power Settings...",
552+ "sensitive": true,
553+ "type": ""
554+ }
555+ }
556+ ]
557+ }
558+ ],
559+
560+ "fake-indicator-sound": [
561+ {
562+ "rowData": {
563+ "action": "indicator._header",
564+ "actionState": {
565+ "icons": [ "image://theme/audio-volume-high" ],
566+ "label": "",
567+ "title": "Sound (F)",
568+ "visible": true
569+ },
570+ "icon": "",
571+ "isCheck": false,
572+ "isRadio": false,
573+ "isSeparator": false,
574+ "isToggled": false,
575+ "label": "",
576+ "sensitive": true,
577+ "type": "com.canonical.indicator.root"
578+ },
579+ "submenu": [
580+ {
581+ "rowData": {
582+ "action": "indicator.silent-mode",
583+ "actionState": true,
584+ "ext": {},
585+ "icon": "",
586+ "isCheck": true,
587+ "isRadio": false,
588+ "isSeparator": false,
589+ "isToggled": false,
590+ "label": "Silent Mode",
591+ "sensitive": true,
592+ "type": "com.canonical.indicator.switch"
593+ }
594+ },
595+ {
596+ "rowData": {
597+ "action": "indicator.volume",
598+ "actionState": 0.35,
599+ "ext": {
600+ "maxIcon": "image://theme/audio-volume-high-panel",
601+ "maxValue": 1,
602+ "minIcon": "image://theme/audio-volume-low-zero-panel",
603+ "minValue": 0,
604+ "xCanonicalSyncAction": "indicator.volume-sync"
605+ },
606+ "icon": "",
607+ "isCheck": false,
608+ "isRadio": true,
609+ "isSeparator": false,
610+ "isToggled": false,
611+ "label": "Volume",
612+ "sensitive": true,
613+ "type": "com.canonical.unity.slider"
614+ }
615+ },
616+ {
617+ "rowData": {
618+ "action": "",
619+ "actionState": {},
620+ "ext": {},
621+ "icon": "",
622+ "isCheck": false,
623+ "isRadio": false,
624+ "isSeparator": true,
625+ "isToggled": false,
626+ "label": "",
627+ "sensitive": true,
628+ "type": ""
629+ }
630+ },
631+ {
632+ "rowData": {
633+ "action": "indicator.mediaplayer-app.desktop",
634+ "actionState": {
635+ "running": true,
636+ "state": "Stopped"
637+ },
638+ "ext": {},
639+ "icon": "file:///usr/share/mediaplayer-app/mediaplayer-app.png",
640+ "isCheck": false,
641+ "isRadio": false,
642+ "isSeparator": false,
643+ "isToggled": false,
644+ "label": "Media Player",
645+ "sensitive": false,
646+ "type": "com.canonical.unity.media-player"
647+ }
648+ },
649+ {
650+ "rowData": {
651+ "actionState": {},
652+ "ext": {
653+ "action": ""
654+ },
655+ "icon": "",
656+ "isCheck": false,
657+ "isRadio": false,
658+ "isSeparator": false,
659+ "isToggled": false,
660+ "label": "",
661+ "sensitive": true,
662+ "type": "com.canonical.unity.playback-item"
663+ }
664+ },
665+ {
666+ "rowData": {
667+ "action": "indicator.phone-settings",
668+ "actionState": {},
669+ "ext": {},
670+ "icon": "",
671+ "isCheck": false,
672+ "isRadio": false,
673+ "isSeparator": false,
674+ "isToggled": false,
675+ "label": "Sound Settings…",
676+ "sensitive": true,
677+ "type": ""
678+ }
679+ }
680+ ]
681+ }
682+ ],
683+
684+
685+ "fake-indicator-datetime": [
686+ {
687+ "rowData": {
688+ "action": "indicator._header",
689+ "actionState": {
690+ "icons": [],
691+ "label": "16.10",
692+ "title": "Upcoming Events (F)",
693+ "visible": true
694+ },
695+ "icon": "",
696+ "isCheck": false,
697+ "isRadio": false,
698+ "isSeparator": false,
699+ "isToggled": false,
700+ "label": "",
701+ "sensitive": true,
702+ "type": "com.canonical.indicator.root"
703+ },
704+ "submenu": [
705+ {
706+ "rowData": {
707+ "action": "indicator.phone.open-calendar-app",
708+ "actionState": {},
709+ "ext": {},
710+ "icon": "image://theme/calendar",
711+ "isCheck": false,
712+ "isRadio": false,
713+ "isSeparator": false,
714+ "isToggled": false,
715+ "label": "Saturday, 31 December 2016",
716+ "sensitive": true,
717+ "type": ""
718+ }
719+ },
720+ {
721+ "rowData": {
722+ "action": "",
723+ "actionState": {},
724+ "ext": {},
725+ "icon": "fake-indicator-datetime",
726+ "isCheck": false,
727+ "isRadio": false,
728+ "isSeparator": true,
729+ "isToggled": false,
730+ "label": "",
731+ "sensitive": true,
732+ "type": ""
733+ }
734+ },
735+ {
736+ "rowData": {
737+ "action": "indicator.phone.open-alarm-app",
738+ "actionState": {},
739+ "ext": {},
740+ "icon": "image://theme/clock",
741+ "isCheck": false,
742+ "isRadio": false,
743+ "isSeparator": false,
744+ "isToggled": false,
745+ "label": "Clock",
746+ "sensitive": true,
747+ "type": ""
748+ }
749+ },
750+ {
751+ "rowData": {
752+ "action": "indicator.phone.open-appointment",
753+ "actionState": {},
754+ "ext": {
755+ "xCanonicalColor": Qt.rgba(32,74,135,1),
756+ "xCanonicalTime": (new Date).getTime() / 1000 + 35000
757+ },
758+ "icon": "",
759+ "isCheck": false,
760+ "isRadio": false,
761+ "isSeparator": false,
762+ "isToggled": false,
763+ "label": "Finish Indicator mocks",
764+ "sensitive": true,
765+ "type": "com.canonical.indicator.appointment"
766+ }
767+ },
768+ {
769+ "rowData": {
770+ "action": "indicator.phone.open-appointment",
771+ "actionState": {},
772+ "ext": {
773+ "xCanonicalColor": Qt.rgba(32,74,135,1),
774+ "xCanonicalTime": (new Date).getTime() / 1000 + 50474
775+ },
776+ "icon": "",
777+ "isCheck": false,
778+ "isRadio": false,
779+ "isSeparator": false,
780+ "isToggled": false,
781+ "label": "Implement Desktop version",
782+ "sensitive": true,
783+ "type": "com.canonical.indicator.appointment"
784+ }
785+ },
786+ {
787+ "rowData": {
788+ "action": "indicator.phone.open-appointment",
789+ "actionState": {},
790+ "ext": {
791+ "xCanonicalColor": Qt.rgba(32,74,135,1),
792+ "xCanonicalTime": (new Date).getTime() / 1000 + 385000
793+ },
794+ "icon": "",
795+ "isCheck": false,
796+ "isRadio": false,
797+ "isSeparator": false,
798+ "isToggled": false,
799+ "label": "Ubuntu drinks event",
800+ "sensitive": true,
801+ "type": "com.canonical.indicator.appointment"
802+ }
803+ },
804+ {
805+ "rowData": {
806+ "action": "indicator.phone.open-appointment",
807+ "actionState": {},
808+ "ext": {
809+ "xCanonicalColor": Qt.rgba(32,74,135,1),
810+ "xCanonicalTime": (new Date).getTime() / 1000 + 3500050
811+ },
812+ "icon": "",
813+ "isCheck": false,
814+ "isRadio": false,
815+ "isSeparator": false,
816+ "isToggled": false,
817+ "label": "Land unity8",
818+ "sensitive": true,
819+ "type": "com.canonical.indicator.appointment"
820+ }
821+ },
822+ {
823+ "rowData": {
824+ "action": "",
825+ "actionState": {},
826+ "ext": {},
827+ "icon": "",
828+ "isCheck": false,
829+ "isRadio": false,
830+ "isSeparator": true,
831+ "isToggled": false,
832+ "label": "",
833+ "sensitive": true,
834+ "type": ""
835+ }
836+ },
837+ {
838+ "rowData": {
839+ "action": "indicator.phone.open-settings-app",
840+ "actionState": {},
841+ "ext": {},
842+ "icon": "",
843+ "isCheck": false,
844+ "isRadio": false,
845+ "isSeparator": false,
846+ "isToggled": false,
847+ "label": "Date and Time settings…",
848+ "sensitive": true,
849+ "type": ""
850+ }
851+ }
852+ ]
853+ }
854+ ],
855+
856+
857+ "fake-indicator-files": [
858+ {
859+ "rowData": {
860+ "action": "indicator._header",
861+ "actionState": {
862+ "icons": [],
863+ "label": "Files",
864+ "title": "Files",
865+ "visible": true
866+ },
867+ "icon": "",
868+ "isCheck": false,
869+ "isRadio": false,
870+ "isSeparator": false,
871+ "isToggled": false,
872+ "label": "",
873+ "sensitive": true,
874+ "type": "com.canonical.indicator.root"
875+ },
876+ "submenu": [
877+ {
878+ "rowData": {
879+ "action": "indicator.pause-all",
880+ "actionState": {},
881+ "ext": {
882+ "xCanonicalExtraLabel": "Pause all"
883+ },
884+ "icon": "",
885+ "isCheck": false,
886+ "isRadio": false,
887+ "isSeparator": false,
888+ "isToggled": false,
889+ "label": "",
890+ "sensitive": true,
891+ "type": "com.canonical.indicator.button-section"
892+ }
893+ },
894+ {
895+ "rowData": {
896+ "action": "indicator.activate-transfer",
897+ "actionState": {},
898+ "ext": {
899+ "xCanonicalUid": 1003
900+ },
901+ "icon": "file:///usr/share/webbrowser-app/webbrowser-app.png",
902+ "isCheck": false,
903+ "isRadio": false,
904+ "isSeparator": false,
905+ "isToggled": false,
906+ "label": "Ubuntu daily.iso",
907+ "sensitive": true,
908+ "type": "com.canonical.indicator.transfer"
909+ }
910+ },
911+ {
912+ "rowData": {
913+ "action": "",
914+ "actionState": {},
915+ "ext": {},
916+ "icon": "",
917+ "isCheck": false,
918+ "isRadio": false,
919+ "isSeparator": true,
920+ "isToggled": false,
921+ "label": "",
922+ "sensitive": true,
923+ "type": ""
924+ }
925+ },
926+ {
927+ "rowData": {
928+ "action": "indicator.clear-all",
929+ "actionState": {},
930+ "ext": {
931+ "xCanonicalExtraLabel": "Clear all"
932+ },
933+ "icon": "",
934+ "isCheck": false,
935+ "isRadio": false,
936+ "isSeparator": false,
937+ "isToggled": false,
938+ "label": "Successful Transfers",
939+ "sensitive": true,
940+ "type": "com.canonical.indicator.button-section"
941+ }
942+ },
943+ {
944+ "rowData": {
945+ "action": "indicator.activate-transfer",
946+ "actionState": {},
947+ "ext": {
948+ "xCanonicalUid": 1002
949+ },
950+ "icon": "file:///usr/share/webbrowser-app/webbrowser-app.png",
951+ "isCheck": false,
952+ "isRadio": false,
953+ "isSeparator": false,
954+ "isToggled": false,
955+ "label": "Ubuntu Guide.pdf",
956+ "sensitive": true,
957+ "type": "com.canonical.indicator.transfer"
958+ }
959+ },
960+ {
961+ "rowData": {
962+ "action": "indicator.activate-transfer",
963+ "actionState": {},
964+ "ext": {
965+ "xCanonicalUid": 1001
966+ },
967+ "icon": "file:///usr/share/webbrowser-app/webbrowser-app.png",
968+ "isCheck": false,
969+ "isRadio": false,
970+ "isSeparator": false,
971+ "isToggled": false,
972+ "label": "Unity8 Hacking.pdf",
973+ "sensitive": true,
974+ "type": "com.canonical.indicator.transfer"
975+ }
976+ }
977+ ]
978+ }
979+ ],
980+
981+ "fake-indicator-network": [
982+ {
983+ "rowData": {
984+ "action": "indicator._header",
985+ "actionState": {
986+ "icons": [],
987+ "label": "",
988+ "title": "Network",
989+ "visible": true
990+ },
991+ "icon": "",
992+ "isCheck": false,
993+ "isRadio": false,
994+ "isSeparator": false,
995+ "isToggled": false,
996+ "label": "",
997+ "sensitive": true,
998+ "type": "com.canonical.indicator.root"
999+ },
1000+ "submenu": [
1001+ {
1002+ "rowData": {
1003+ "action": "indicator.airplane.enabled",
1004+ "actionState": false,
1005+ "ext": {},
1006+ "icon": "",
1007+ "isCheck": true,
1008+ "isRadio": false,
1009+ "isSeparator": false,
1010+ "isToggled": false,
1011+ "label": "Flight Mode",
1012+ "sensitive": true,
1013+ "type": "com.canonical.indicator.switch"
1014+ }
1015+ },
1016+ /* Anything to see here, since no fake modem actions are implemented
1017+ {
1018+ "rowData": {
1019+ "actionState": false,
1020+ "ext": {},
1021+ "icon": "",
1022+ "isCheck": false,
1023+ "isRadio": false,
1024+ "isSeparator": true,
1025+ "isToggled": false,
1026+ "label": "",
1027+ "sensitive": true,
1028+ "type": ""
1029+ }
1030+ },
1031+ {
1032+ "rowData": {
1033+ "actionState": false,
1034+ "ext": {
1035+ "xCanonicalModemConnectivityIconAction": "indicator.modem.1::connectivity-icon",
1036+ "xCanonicalModemLockedAction": "indicator.modem.1::locked",
1037+ "xCanonicalModemRoamingAction": "indicator.modem.1::roaming",
1038+ "xCanonicalModemSimIdentifierLabelAction": "indicator.modem.1::sim-identifier-label",
1039+ "xCanonicalModemStatusIconAction": "indicator.modem.1::status-icon",
1040+ "xCanonicalModemStatusLabelAction": "indicator.modem.1::status-label"
1041+ },
1042+ "icon": "",
1043+ "isCheck": false,
1044+ "isRadio": false,
1045+ "isSeparator": false,
1046+ "isToggled": false,
1047+ "label": "",
1048+ "sensitive": true,
1049+ "type": "com.canonical.indicator.network.modeminfoitem",
1050+ "visible": false
1051+ }
1052+ },
1053+ */
1054+ {
1055+ "rowData": {
1056+ "action": "indicator.wifi.enable",
1057+ "actionState": true,
1058+ "ext": {},
1059+ "icon": "",
1060+ "isCheck": true,
1061+ "isRadio": false,
1062+ "isSeparator": false,
1063+ "isToggled": true,
1064+ "label": "Wi-Fi",
1065+ "sensitive": true,
1066+ "type": "com.canonical.indicator.switch"
1067+ }
1068+ },
1069+ {
1070+ "rowData": {
1071+ "action": "",
1072+ "actionState": {},
1073+ "ext": {},
1074+ "icon": "",
1075+ "isCheck": false,
1076+ "isRadio": false,
1077+ "isSeparator": true,
1078+ "isToggled": false,
1079+ "label": "",
1080+ "sensitive": true,
1081+ "type": ""
1082+ }
1083+ },
1084+ {
1085+ "rowData": {
1086+ "action": "indicator.accesspoint.1",
1087+ "actionState": true,
1088+ "ext": {
1089+ "xCanonicalWifiApIsAdhoc": 0,
1090+ "xCanonicalWifiApIsSecure": 1,
1091+ "xCanonicalWifiApStrengthAction": "indicator.accesspoint.1::strength"
1092+ },
1093+ "icon": "",
1094+ "isCheck": true,
1095+ "isRadio": false,
1096+ "isSeparator": false,
1097+ "isToggled": true,
1098+ "label": "Canonical",
1099+ "sensitive": true,
1100+ "type": "unity.widgets.systemsettings.tablet.accesspoint"
1101+ }
1102+ },
1103+ {
1104+ "rowData": {
1105+ "action": "indicator.accesspoint.2",
1106+ "actionState": false,
1107+ "ext": {
1108+ "xCanonicalWifiApIsAdhoc": 0,
1109+ "xCanonicalWifiApIsSecure": 1,
1110+ "xCanonicalWifiApStrengthAction": "indicator.accesspoint.2::strength"
1111+ },
1112+ "icon": "",
1113+ "isCheck": true,
1114+ "isRadio": false,
1115+ "isSeparator": false,
1116+ "isToggled": false,
1117+ "label": "Ubuntu",
1118+ "sensitive": true,
1119+ "type": "unity.widgets.systemsettings.tablet.accesspoint"
1120+ }
1121+ },
1122+ {
1123+ "rowData": {
1124+ "action": "indicator.accesspoint.3",
1125+ "actionState": false,
1126+ "ext": {
1127+ "xCanonicalWifiApIsAdhoc": 0,
1128+ "xCanonicalWifiApIsSecure": 0,
1129+ "xCanonicalWifiApStrengthAction": "indicator.accesspoint.3::strength"
1130+ },
1131+ "icon": "",
1132+ "isCheck": true,
1133+ "isRadio": false,
1134+ "isSeparator": false,
1135+ "isToggled": false,
1136+ "label": "Linux",
1137+ "sensitive": true,
1138+ "type": "unity.widgets.systemsettings.tablet.accesspoint"
1139+ }
1140+ },
1141+ {
1142+ "rowData": {
1143+ "action": "indicator.accesspoint.4",
1144+ "actionState": false,
1145+ "ext": {
1146+ "xCanonicalWifiApIsAdhoc": 0,
1147+ "xCanonicalWifiApIsSecure": 0,
1148+ "xCanonicalWifiApStrengthAction": "indicator.accesspoint.4::strength"
1149+ },
1150+ "icon": "",
1151+ "isCheck": true,
1152+ "isRadio": false,
1153+ "isSeparator": false,
1154+ "isToggled": false,
1155+ "label": "for Human Beings",
1156+ "sensitive": true,
1157+ "type": "unity.widgets.systemsettings.tablet.accesspoint"
1158+ }
1159+ },
1160+ {
1161+ "rowData": {
1162+ "action": "indicator.wifi.settings",
1163+ "actionState": {},
1164+ "ext": {},
1165+ "icon": "",
1166+ "isCheck": false,
1167+ "isRadio": false,
1168+ "isSeparator": false,
1169+ "isToggled": false,
1170+ "label": "Wi-Fi settings…",
1171+ "sensitive": true,
1172+ "type": ""
1173+ }
1174+ }
1175+ ]
1176+ }
1177+ ],
1178+
1179+ "fake-indicator-bluetooth": [
1180+ {
1181+ "rowData": {
1182+ "action": "indicator._header",
1183+ "actionState": {
1184+ "icons": [],
1185+ "label": "",
1186+ "title": "Network",
1187+ "visible": true
1188+ },
1189+ "icon": "",
1190+ "isCheck": false,
1191+ "isRadio": false,
1192+ "isSeparator": false,
1193+ "isToggled": false,
1194+ "label": "",
1195+ "sensitive": true,
1196+ "type": "com.canonical.indicator.root"
1197+ },
1198+ "submenu": [
1199+ {
1200+ "rowData": {
1201+ "action": "indicator.bluetooth.enable",
1202+ "actionState": true,
1203+ "ext": {},
1204+ "icon": "",
1205+ "isCheck": true,
1206+ "isRadio": false,
1207+ "isSeparator": false,
1208+ "isToggled": true,
1209+ "label": "Bluetooth",
1210+ "sensitive": true,
1211+ "type": "com.canonical.indicator.switch"
1212+ }
1213+ },
1214+ {
1215+ "rowData": {
1216+ "action": "indicator.bluetooth.settings",
1217+ "actionState": {},
1218+ "ext": {},
1219+ "icon": "",
1220+ "isCheck": false,
1221+ "isRadio": false,
1222+ "isSeparator": false,
1223+ "isToggled": false,
1224+ "label": "Bluetooth settings…",
1225+ "sensitive": true,
1226+ "type": ""
1227+ }
1228+ }
1229+ ]
1230+ }
1231+ ]
1232+}
1233
1234=== modified file 'tests/mocks/Unity/Indicators/fakeplugin.cpp'
1235--- tests/mocks/Unity/Indicators/fakeplugin.cpp 2015-01-20 16:21:07 +0000
1236+++ tests/mocks/Unity/Indicators/fakeplugin.cpp 2016-09-08 16:44:47 +0000
1237@@ -29,6 +29,7 @@
1238 #include "sharedunitymenumodel.h"
1239 #include "fakeunitymenumodelcache.h"
1240 #include "unitymenumodelstack.h"
1241+#include "modelprinter.h"
1242
1243 #include <unitymenumodel.h>
1244
1245@@ -49,6 +50,7 @@
1246 qmlRegisterType<MenuContentActivator>(uri, 0, 1, "MenuContentActivator");
1247 qmlRegisterType<UnityMenuModelStack>(uri, 0, 1, "UnityMenuModelStack");
1248 qmlRegisterType<SharedUnityMenuModel>(uri, 0, 1, "SharedUnityMenuModel");
1249+ qmlRegisterType<ModelPrinter>(uri, 0, 1, "ModelPrinter");
1250
1251 qmlRegisterSingletonType<FakeUnityMenuModelCache>(uri, 0, 1, "UnityMenuModelCache", menuModelCacheSingleton);
1252

Subscribers

People subscribed via source and target branches