Merge lp:~josharenson/unity8/dashboard-manager into lp:unity8

Proposed by Josh Arenson
Status: Needs review
Proposed branch: lp:~josharenson/unity8/dashboard-manager
Merge into: lp:unity8
Diff against target: 459 lines (+362/-3)
10 files modified
qml/Dash/DashSectionHeader.qml (+3/-1)
qml/Dash/Dashboard/DashboardManager.qml (+61/-0)
qml/Dash/Dashboard/DashboardManagerCategory.qml (+85/-0)
qml/Dash/Dashboard/DashboardManagerScope.qml (+91/-0)
tests/CMakeLists.txt (+16/-1)
tests/mocks/Unity/CMakeLists.txt (+1/-0)
tests/mocks/Unity/fake_scopesoverview.cpp (+1/-1)
tests/qmltests/CMakeLists.txt (+1/-0)
tests/qmltests/Dash/Dashboard/tst_DashboardManager.qml (+85/-0)
tests/utils/modules/Unity/Test/UnityTestCase.qml (+18/-0)
To merge this branch: bzr merge lp:~josharenson/unity8/dashboard-manager
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Matthew Paul Thomas (community) design Needs Information
Andrea Cimitan (community) Needs Fixing
Review via email: mp+319522@code.launchpad.net

Commit message

Implement the scopes Dashboard Manger window

Description of the change

* Are there any related MPs required for this MP to build/function as expected? Please list.
No, originally this depended on Lukas's Dashboard branch, but I've removed that dependency

 * Did you perform an exploratory manual test run of your code change and any related functionality?
Yes, but not with a real scope, only the mocks. I have some concerns about how the model's artowrk will behave in production.

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

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

To post a comment you must log in.
2844. By Josh Arenson

Add license

2845. By Josh Arenson

Cleanup

2846. By Josh Arenson

One more cleanup

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
2847. By Josh Arenson

Fix tests

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 :

PASSED: Continuous integration, rev:2847
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3333/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4384
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2623
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2623
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4412
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4245
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4245/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4245
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4245/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4245
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4245/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4245
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4245/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4245
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4245/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4245
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4245/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

comments inline - will think of other small tests we can possibly add

review: Needs Fixing
2848. By Josh Arenson

Work around dividers

2849. By Josh Arenson

Resolve most review comments

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
2850. By Josh Arenson

Fix whitespace

2851. By Josh Arenson

Merge trunk

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

FAILED: Continuous integration, rev:2850
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3376/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4450
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2668
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2668
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4478
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4308
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4308/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4308
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4308/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4308
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4308/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4308
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4308/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4308
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4308/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4308
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4308/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2851
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3381/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4455
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2671
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2671
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4483
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4312
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4312/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4312
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4312/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4312
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4312/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4312
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4312/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4312
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4312/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4312
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4312/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) :
Revision history for this message
Andrea Cimitan (cimi) :
2852. By Josh Arenson

Review fixes

2853. By Josh Arenson

Add animation

2854. By Josh Arenson

Match ui of system settings

Revision history for this message
Josh Arenson (josharenson) wrote :

Fixed some things and added a "displacement" animation but I'm not crazy about it. Welcome any suggestions for improving.

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

FAILED: Continuous integration, rev:2852
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3429/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4521
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2720
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2720
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4549
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4376
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4376/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4376
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4376/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4376
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4376/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4376
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4376/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4376
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4376/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4376
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4376/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:2854
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3430/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4522
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2721
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2721
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4550
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4377
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4377/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4377
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4377/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4377
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4377/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4377
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4377/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4377
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4377/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4377
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4377/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

> Fixed some things and added a "displacement" animation but I'm not crazy about
> it. Welcome any suggestions for improving.

I spent a lot of time this morning playing with different animations, I think it's good enough, it's hard to achieve something better because the unpinned item disappears and we can't animate that. FastDuration is correct duration as you used - great. Please put the end bracket in line or add indentation to the rest of the transition :)

Still if you can do the suggestion to make the delegate model-agnostic, exposing properties like title and icon source... thanks!

2855. By Josh Arenson

Abstract better

Revision history for this message
Josh Arenson (josharenson) wrote :

Broke the delegate into 2 separate files and removed all knowledge of parent models to help with abstraction

2856. By Josh Arenson

Use listDividers

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

PASSED: Continuous integration, rev:2855
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3486/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4601
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2781
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2781
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4629
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4456
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4456/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4456
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4456/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4456
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4456/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4456
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4456/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4456
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4456/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4456
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4456/artifact/output/*zip*/output.zip

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

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

PASSED: Continuous integration, rev:2856
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3487/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4602
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2782
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2782
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4630
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4457
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4457/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4457
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4457/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4457
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4457/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4457
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4457/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4457
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4457/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4457
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4457/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

Pretty good so far, just two minor things:
- why do the dividers have margins?
- we can get rid of the _source and "../" if we change the mocks to return a QVariant with qrc like we do in fake_previewwidgetmodel.cpp? we can add the dash icon to that same resource or create a new one (then fix where it needs to be adjusted)

Revision history for this message
Andrea Cimitan (cimi) wrote :

Also, we don't neet QtQuick.Window in qml/Dash/Dashboard/DashboardManagerScope.qml

2857. By Josh Arenson

Remove unused import

2858. By Josh Arenson

Prelim solution

2859. By Josh Arenson

Autogen qrc file

2860. By Josh Arenson

Filter pngs

Revision history for this message
Josh Arenson (josharenson) wrote :

Added some, cmake magic (that is either neat, or unacceptable...) that serves up graphics using the qt resource system. This allowed for deleting the nastyness in the qml view. There are a few options here:

1. You like this idea and keep it as is
  1a. Refactor tests that depend on tests/graphics to use qrc

2. Ditch the cmake magic, keep a hardcoded qrc file
   2a. Do this and implement 1a.

3. Something else entirely

As for the margins, I saw that they were in dragItem and not really thinking about how thats an entirely different use case, added them here. I'll remove them in the next commit.

2861. By Josh Arenson

Remove margins

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 :
review: Needs Fixing (continuous-integration)
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

FAILED: Continuous integration, rev:2861
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3512/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4646
    UNSTABLE: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2808
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2808
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4674
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4501/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4501
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4501/artifact/output/*zip*/output.zip

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

review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Cimitan (cimi) wrote :

the qrc doesn't work for me (trying rebranching), also be sure that the other files/tests using that art will still work (maybe something around genericoscopeview or dashcontent)

2862. By Josh Arenson

Fix changed path

2863. By Josh Arenson

Switch back to old list divider

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

PASSED: Continuous integration, rev:2862
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3537/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4684
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2842
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2842
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4712
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4535
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4535/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4535
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4535/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4535
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4535/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4535
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4535/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4535
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4535/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4535
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4535/artifact/output/*zip*/output.zip

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

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

PASSED: Continuous integration, rev:2863
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3542/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4693
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/2849
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/2849
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4721
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4544
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4544/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4544
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4544/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4544
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4544/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4544
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4544/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4544
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4544/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4544
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4544/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

If you’d like a design review, please link before-and-after movies or screenshots, as appropriate.

review: Needs Information (design)
Revision history for this message
Andrea Cimitan (cimi) wrote :

http://i.imgur.com/NOZMTFA.png

Left is current system settings, middle this dashboard manager, right the current overview scope list - we tried being consistent with the system settings app, we might also tweak the font for the categories names to be of the same color and style of system settings now that I see

2864. By Josh Arenson

merge trunk

2865. By Josh Arenson

Change header font/color to look like system-settings

Revision history for this message
Andrea Cimitan (cimi) wrote :

> http://i.imgur.com/NOZMTFA.png
>
> Left is current system settings, middle this dashboard manager, right the
> current overview scope list - we tried being consistent with the system
> settings app, we might also tweak the font for the categories names to be of
> the same color and style of system settings now that I see

we just changed into http://imgur.com/TyWha5U.png

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

PASSED: Continuous integration, rev:2865
https://unity8-jenkins.ubuntu.com/job/lp-unity8-ci/3695/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4909
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=xenial+overlay,testname=qmluitests.sh/3012
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/test-0-autopkgtest/label=amd64,release=zesty,testname=qmluitests.sh/3012
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4937
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4745
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4745/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4745
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4745/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4745
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4745/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4745
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4745/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4745
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4745/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4745
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4745/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)

Unmerged revisions

2865. By Josh Arenson

Change header font/color to look like system-settings

2864. By Josh Arenson

merge trunk

2863. By Josh Arenson

Switch back to old list divider

2862. By Josh Arenson

Fix changed path

2861. By Josh Arenson

Remove margins

2860. By Josh Arenson

Filter pngs

2859. By Josh Arenson

Autogen qrc file

2858. By Josh Arenson

Prelim solution

2857. By Josh Arenson

Remove unused import

2856. By Josh Arenson

Use listDividers

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'qml/Dash/DashSectionHeader.qml'
--- qml/Dash/DashSectionHeader.qml 2016-11-04 10:38:48 +0000
+++ qml/Dash/DashSectionHeader.qml 2017-04-05 16:15:43 +0000
@@ -19,9 +19,11 @@
19import Ubuntu.Components 1.319import Ubuntu.Components 1.3
2020
21Item {21Item {
22 property alias text: label.text
23 property alias color: label.color22 property alias color: label.color
23 property alias fontSize: label.fontSize
24 property alias iconName: icon.name24 property alias iconName: icon.name
25 property alias labelOpacity: label.opacity
26 property alias text: label.text
2527
26 signal clicked(variant mouse)28 signal clicked(variant mouse)
2729
2830
=== added directory 'qml/Dash/Dashboard'
=== added file 'qml/Dash/Dashboard/DashboardManager.qml'
--- qml/Dash/Dashboard/DashboardManager.qml 1970-01-01 00:00:00 +0000
+++ qml/Dash/Dashboard/DashboardManager.qml 2017-04-05 16:15:43 +0000
@@ -0,0 +1,61 @@
1/*
2 * Copyright (C) 2017 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import QtQuick.Window 2.2
19import Ubuntu.Components 1.3
20import Unity 0.2
21import "../../Components"
22
23MainView {
24 id: root
25
26 anchors.fill: parent
27
28 Scopes { id: scopes }
29
30 PageHeader {
31 id: pageHeader
32 title: i18n.tr("Manage Dashboard")
33 }
34
35 ListView {
36 id: categoriesContainer
37 objectName: "categoriesContainer"
38
39 anchors {
40 top: pageHeader.bottom
41 bottom: parent.bottom
42 left: parent.left
43 right: parent.right
44 }
45
46 clip: true
47 model: scopes.overviewScope ? scopes.overviewScope.categories : null
48 delegate: DashboardManagerCategory {
49 categoryId: model.categoryId
50 categoryName: model.name
51 categoryResults: model.results
52 onRequestFavorite: scopes.setFavorite(scopeId, favorite);
53 }
54 }
55
56 Binding {
57 target: scopes.overviewScope
58 property: "isActive"
59 value: root.visible
60 }
61}
062
=== added file 'qml/Dash/Dashboard/DashboardManagerCategory.qml'
--- qml/Dash/Dashboard/DashboardManagerCategory.qml 1970-01-01 00:00:00 +0000
+++ qml/Dash/Dashboard/DashboardManagerCategory.qml 2017-04-05 16:15:43 +0000
@@ -0,0 +1,85 @@
1/*
2 * Copyright (C) 2017 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import "../../Components"
20import ".."
21
22ListItem {
23 id: root
24 objectName: name + "Section"
25
26 signal requestFavorite(string scopeId, bool favorite)
27
28 property alias categoryId: categoryView.categoryId
29 property alias categoryName: categoryView.categoryName
30 property alias categoryResults: categoryView.model
31
32 // Expose for testing
33 readonly property int index: model.index
34
35 implicitHeight: layout.height
36 divider.visible: false
37
38 Item {
39 id: layout
40
41 height: categoryView.contentHeight
42 width: parent.width
43
44 ListView {
45 id: categoryView
46 objectName: "categoryView"
47
48 property string categoryId
49 property string categoryName
50
51 readonly property bool isPinnedToDashboard: categoryId === "favorites"
52 readonly property bool isAlsoInstalled: categoryId === "other"
53
54 height: contentHeight
55 width: parent.width
56
57 header: DashSectionHeader {
58 visible: results.count > 0
59 fontSize: "small"
60 labelOpacity: 0.75
61 text: {
62 if (categoryName === "Favorites") {
63 return i18n.tr("Dashboard");
64 } else if (categoryName === "Non Favorites") {
65 return i18n.tr("Also Installed");
66 } else {
67 return categoryName;
68 }
69 }
70 }
71
72 displaced: Transition {
73 UbuntuNumberAnimation {
74 properties: "y"
75 duration: UbuntuAnimation.FastDuration
76 }
77 }
78
79 delegate: DashboardManagerScope {
80 scopeIcon: model.art
81 scopeId: model.scopeId
82 }
83 }
84 }
85}
086
=== added file 'qml/Dash/Dashboard/DashboardManagerScope.qml'
--- qml/Dash/Dashboard/DashboardManagerScope.qml 1970-01-01 00:00:00 +0000
+++ qml/Dash/Dashboard/DashboardManagerScope.qml 2017-04-05 16:15:43 +0000
@@ -0,0 +1,91 @@
1/*
2* Copyright (C) 2017 Canonical, Ltd.
3*
4* This program is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License as published by
6* the Free Software Foundation; version 3.
7*
8* This program is distributed in the hope that it will be useful,
9* but WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17import QtQuick 2.4
18import Ubuntu.Components 1.3
19import Ubuntu.Components.ListItems 1.3 as ListItems
20import Unity 0.2
21import "../../Components"
22
23ListItem {
24 readonly property alias innerLayoutPadding: innerLayout.padding
25
26 property alias scopeIcon: scopeArtIcon.source
27 property alias scopeId: innerLayout.scopeId
28
29 height: innerLayout.height
30 width: parent.width
31
32 divider.visible: false
33
34
35 Rectangle {
36 height: units.dp(1);
37 width: parent.width
38 anchors.top: parent.top
39 color: "#eeeeee"
40 visible: index != 0
41 }
42
43 ListItemLayout {
44 id: innerLayout
45 objectName: "layout" + index
46
47 property string scopeId
48
49 ProportionalShape {
50 id: scopeArt
51 height: units.gu(4.5)
52 SlotsLayout.position: SlotsLayout.Leading
53
54 aspect: UbuntuShape.Flat
55 source: Image {
56 id: scopeArtIcon
57
58 sourceSize.height: scopeArt.height
59 sourceSize.width: scopeArt.width
60 }
61 }
62
63 title.text: scopeId
64
65 // FIXME: update when pin icon is added to theme
66 Icon {
67 objectName: "pinIcon"
68
69 height: units.gu(2)
70 width: units.gu(2)
71 source: {
72 if (categoryView.isPinnedToDashboard) {
73 return "graphics/pinned.png"
74 } else if (categoryView.isAlsoInstalled) {
75 return "graphics/unpinned.png"
76 } else {
77 return ""
78 }
79 }
80
81 MouseArea {
82 objectName: "favoriteButton"
83
84 anchors.fill: parent
85 onClicked: {
86 root.requestFavorite(scopeId, !categoryView.isPinnedToDashboard)
87 }
88 }
89 }
90 }
91}
092
=== added directory 'qml/Dash/Dashboard/graphics'
=== added file 'qml/Dash/Dashboard/graphics/pinned@27.png'
1Binary files qml/Dash/Dashboard/graphics/pinned@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/Dashboard/graphics/pinned@27.png 2017-04-05 16:15:43 +0000 differ93Binary files qml/Dash/Dashboard/graphics/pinned@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/Dashboard/graphics/pinned@27.png 2017-04-05 16:15:43 +0000 differ
=== added file 'qml/Dash/Dashboard/graphics/unpinned@27.png'
2Binary files qml/Dash/Dashboard/graphics/unpinned@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/Dashboard/graphics/unpinned@27.png 2017-04-05 16:15:43 +0000 differ94Binary files qml/Dash/Dashboard/graphics/unpinned@27.png 1970-01-01 00:00:00 +0000 and qml/Dash/Dashboard/graphics/unpinned@27.png 2017-04-05 16:15:43 +0000 differ
=== modified file 'tests/CMakeLists.txt'
--- tests/CMakeLists.txt 2017-03-15 18:57:52 +0000
+++ tests/CMakeLists.txt 2017-04-05 16:15:43 +0000
@@ -133,7 +133,22 @@
133 FIND_PROGRAM(QDBUSXML2CPP_EXECUTABLE qdbusxml2cpp)133 FIND_PROGRAM(QDBUSXML2CPP_EXECUTABLE qdbusxml2cpp)
134endif()134endif()
135135
136136FILE(GLOB_RECURSE TEST_GRAPHICS_FILE
137 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
138 graphics/*.png
139)
140
141function(generate_qrc)
142 SET(qrc_header "<!DOCTYPE RCC><RCC version=\"1.0\"><qresource>")
143 SET(qrc_footer "</qresource></RCC>")
144 FOREACH(graphic ${TEST_GRAPHICS_FILE})
145 STRING(CONCAT qrc_header ${qrc_header} "<file>${graphic}</file>")
146 ENDFOREACH(graphic)
147 STRING(CONCAT qrc_header ${qrc_header} ${qrc_footer})
148 FILE(WRITE graphics.qrc ${qrc_header})
149endfunction()
150
151generate_qrc()
137install(DIRECTORY data graphics152install(DIRECTORY data graphics
138 DESTINATION "${SHELL_APP_DIR}/tests"153 DESTINATION "${SHELL_APP_DIR}/tests"
139)154)
140155
=== modified file 'tests/mocks/Unity/CMakeLists.txt'
--- tests/mocks/Unity/CMakeLists.txt 2017-01-31 13:35:50 +0000
+++ tests/mocks/Unity/CMakeLists.txt 2017-04-05 16:15:43 +0000
@@ -22,6 +22,7 @@
22add_definitions(-DQT_NO_KEYWORDS)22add_definitions(-DQT_NO_KEYWORDS)
2323
24set(UnityQML_SOURCES24set(UnityQML_SOURCES
25 ../../graphics.qrc
25 fake_scope.cpp26 fake_scope.cpp
26 fake_scopes.cpp27 fake_scopes.cpp
27 fake_scopesoverview.cpp28 fake_scopesoverview.cpp
2829
=== modified file 'tests/mocks/Unity/fake_scopesoverview.cpp'
--- tests/mocks/Unity/fake_scopesoverview.cpp 2016-05-26 12:52:24 +0000
+++ tests/mocks/Unity/fake_scopesoverview.cpp 2017-04-05 16:15:43 +0000
@@ -298,7 +298,7 @@
298 case RoleSubtitle:298 case RoleSubtitle:
299 return scope && scope->name() == "Videos this is long ab cd ef gh ij kl" ? "tube, movies, cinema, pictures, art, moving images, magic in a box" : QString();299 return scope && scope->name() == "Videos this is long ab cd ef gh ij kl" ? "tube, movies, cinema, pictures, art, moving images, magic in a box" : QString();
300 case RoleArt:300 case RoleArt:
301 return QString("../../tests/graphics/applicationIcons/dash.png");301 return QUrl("qrc:graphics/applicationIcons/dash.png");
302 case RoleMascot:302 case RoleMascot:
303 case RoleEmblem:303 case RoleEmblem:
304 case RoleSummary:304 case RoleSummary:
305305
=== modified file 'tests/qmltests/CMakeLists.txt'
--- tests/qmltests/CMakeLists.txt 2017-01-18 14:31:42 +0000
+++ tests/qmltests/CMakeLists.txt 2017-04-05 16:15:43 +0000
@@ -41,6 +41,7 @@
41add_unity8_qmltest_data(Dash artwork)41add_unity8_qmltest_data(Dash artwork)
42add_unity8_qmltest_data(Dash CardHelpers.js)42add_unity8_qmltest_data(Dash CardHelpers.js)
43add_unity8_qmltest_data(Dash tst_PageHeader)43add_unity8_qmltest_data(Dash tst_PageHeader)
44add_unity8_qmltest(Dash/Dashboard DashboardManager)
44add_unity8_qmltest(Dash/Previews Preview)45add_unity8_qmltest(Dash/Previews Preview)
45add_unity8_qmltest(Dash/Previews PreviewActions)46add_unity8_qmltest(Dash/Previews PreviewActions)
46add_unity8_qmltest(Dash/Previews PreviewAudioPlayback)47add_unity8_qmltest(Dash/Previews PreviewAudioPlayback)
4748
=== added directory 'tests/qmltests/Dash/Dashboard'
=== added file 'tests/qmltests/Dash/Dashboard/tst_DashboardManager.qml'
--- tests/qmltests/Dash/Dashboard/tst_DashboardManager.qml 1970-01-01 00:00:00 +0000
+++ tests/qmltests/Dash/Dashboard/tst_DashboardManager.qml 2017-04-05 16:15:43 +0000
@@ -0,0 +1,85 @@
1/*
2 * Copyright 2017 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.4
18import QtTest 1.0
19import "../../../../qml/Dash/Dashboard"
20import Ubuntu.Components 1.3
21import Unity.Test 0.1 as UT
22
23Item {
24 id: root
25 width: units.gu(40)
26 height: units.gu(80)
27
28 DashboardManager {
29 id: dashboardManager
30 }
31
32 UT.UnityTestCase {
33 name: "ManageDashboard"
34 when: windowShown
35
36 function scrollToCategory(categoryName) {
37 var container = findChild(dashboardManager, "categoriesContainer")
38 flickToYBeginning(container);
39
40 tryCompareFunction(function(){
41 var category = findChild(container, categoryName + "Section", 0)
42 if (category !== null) return true;
43 touchFlick(container, container.width / 2, units.gu(20), container.width / 2, container.y, true, true, units.gu(2))
44 tryCompare(container, "moving", false);
45 return false;
46 }, true)
47 }
48
49 function test_pinning() {
50 var container = findChild(dashboardManager, "categoriesContainer")
51
52 // Test removing a favorite
53 scrollToCategory("Favorites");
54 var favorites_category = findChild(container, "FavoritesSection")
55 var favorites = findChild(favorites_category, "categoryView")
56 var first_favorite = findChild(favorites, "layout0");
57
58 // scrollToCategory loads the delegate
59 // and this guarantees that it is visible
60 container.positionViewAtIndex(favorites_category.index, ListView.Visible);
61
62 // Check the icon path as it will be changed in the future
63 var pin_icon = findChild(first_favorite, "pinIcon");
64 compare(/graphics\/pinned\.png$/.test(pin_icon.source), true)
65
66 var initialFavoritesCount = favorites.count
67 mouseClick(findChild(first_favorite, "favoriteButton"));
68 tryCompare(favorites, "count", initialFavoritesCount - 1);
69
70 // Test adding a favorite
71 scrollToCategory("Non Favorites")
72 var non_favorites_category = findChild(container, "Non FavoritesSection")
73 var non_favorites = findChild(non_favorites_category, "categoryView")
74 var first_non_favorite = findChild(non_favorites, "layout0");
75 container.positionViewAtIndex(non_favorites_category.index, ListView.Visible);
76
77 pin_icon = findChild(first_non_favorite, "pinIcon");
78 compare(/graphics\/unpinned\.png$/.test(pin_icon.source), true)
79
80 var initialNonFavoritesCount = non_favorites.count
81 mouseClick(findChild(first_non_favorite, "favoriteButton"));
82 tryCompare(non_favorites, "count", initialNonFavoritesCount - 1);
83 }
84 }
85}
086
=== modified file 'tests/utils/modules/Unity/Test/UnityTestCase.qml'
--- tests/utils/modules/Unity/Test/UnityTestCase.qml 2017-01-19 16:30:08 +0000
+++ tests/utils/modules/Unity/Test/UnityTestCase.qml 2017-04-05 16:15:43 +0000
@@ -283,6 +283,24 @@
283 }283 }
284 }284 }
285285
286 function flickToYBeginning(item) {
287 if (!item)
288 qtest_fail("no item given", 1);
289
290 var i = 0;
291 var x = item.width / 2;
292 var y = units.gu(1);
293 var toY = item.height - units.gu(1)
294 var maxIterations = 5 + item.contentHeight / item.height;
295 while (i < maxIterations && !item.atYBeginning) {
296 touchFlick(item, x, y, x , toY);
297 tryCompare(item, "moving", false);
298 ++i;
299 }
300
301 tryCompare(item, "atYBeginning", true);
302 }
303
286 function flickToYEnd(item) {304 function flickToYEnd(item) {
287 if (!item)305 if (!item)
288 qtest_fail("no item given", 1);306 qtest_fail("no item given", 1);

Subscribers

People subscribed via source and target branches