Merge lp:~renatofilho/address-book-app/new-visual-contact-editor into lp:~phablet-team/address-book-app/staging

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Tiago Salem Herrmann
Approved revision: 215
Merged at revision: 190
Proposed branch: lp:~renatofilho/address-book-app/new-visual-contact-editor
Merge into: lp:~phablet-team/address-book-app/staging
Prerequisite: lp:~renatofilho/address-book-app/new-visual-contact-view
Diff against target: 1303 lines (+540/-278)
24 files modified
src/app/imagescalethread.cpp (+1/-1)
src/imports/Common/ContactDetailItem.qml (+1/-0)
src/imports/ContactEdit/AddFieldDialog.qml (+142/-0)
src/imports/ContactEdit/AvatarImport.qml (+78/-0)
src/imports/ContactEdit/CMakeLists.txt (+2/-0)
src/imports/ContactEdit/ContactDetailAvatarEditor.qml (+45/-94)
src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml (+4/-30)
src/imports/ContactEdit/ContactDetailNameEditor.qml (+1/-0)
src/imports/ContactEdit/ContactDetailSyncTargetEditor.qml (+8/-2)
src/imports/ContactEdit/ContactDetailWithTypeEditor.qml (+27/-27)
src/imports/ContactEdit/ContactEditor.qml (+95/-28)
src/imports/ContactEdit/TextInputDetail.qml (+1/-0)
src/imports/ContactEdit/ValueSelector.qml (+12/-15)
src/imports/ContactList/ContactListPage.qml (+1/-4)
src/imports/ContactView/BasicFieldView.qml (+2/-2)
src/imports/ContactView/ContactDetailAvatarView.qml (+6/-2)
src/imports/ContactView/ContactDetailGroupWithTypeView.qml (+2/-0)
src/imports/ContactView/ContactView.qml (+2/-1)
src/imports/Ubuntu/Contacts/ContactAvatar.qml (+11/-3)
src/imports/Ubuntu/Contacts/MultipleSelectionListView.qml (+9/-1)
tests/autopilot/address_book_app/pages/_contact_editor.py (+42/-20)
tests/autopilot/address_book_app/tests/__init__.py (+1/-2)
tests/autopilot/address_book_app/tests/test_add_contact.py (+20/-32)
tests/autopilot/address_book_app/tests/test_edit_contact.py (+27/-14)
To merge this branch: bzr merge lp:~renatofilho/address-book-app/new-visual-contact-editor
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tiago Salem Herrmann (community) Approve
Review via email: mp+223009@code.launchpad.net

Commit message

Update contact editor page visuals.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:193
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/133/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/839
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/776
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/133
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/133
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/133/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/133/console
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1254
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1539
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1539/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8374
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/688/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/915
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/915/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/133/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:194
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/136/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/850
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/783
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/136
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/136
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/136/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/136
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1260
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1565
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1565/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8395
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/923
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/923/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/136/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:199
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/140/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/875
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/793
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/140
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/140
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/140/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/140
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1287
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1604
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1604/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8439
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/702
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/933
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/933/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/140/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:201
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/143/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/916
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/832
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/143
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/143
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/143/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/143
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1317
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1664
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1664/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8494
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/727
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/972
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/972/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/143/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:204
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/144/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/919
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/835
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/144
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/144
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/144/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/144
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1321
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1669
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1669/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8500
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/730
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/975
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/975/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/144/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:205
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/147/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/922
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/838
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/147
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/147
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/147/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/147
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1323
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1672
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1672/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8503
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/733
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/978
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/978/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/147/rebuild

review: Approve (continuous-integration)
Revision history for this message
Leo Arias (elopio) :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:206
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/149/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/957
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/866/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/149
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/149
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/149/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/149
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1350
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1714
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1714/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8540
    FAILURE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/750/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1006
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1006/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/149/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:209
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/151/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/967
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/873
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/151
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/151
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/151/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/151
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1357
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1726
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1726/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8549
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/755
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1013
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1013/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/151/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:209
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/152/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/968
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/874
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/152
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/152
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/152/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/152
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1358
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1727
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1727/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8550
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/756
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1014
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1014/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/152/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:210
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/153/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/971
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/877
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/153
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/153
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/153/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/153
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1359
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1731
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1731/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8552
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/757
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1018
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1018/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/153/rebuild

review: Approve (continuous-integration)
Revision history for this message
Tiago Salem Herrmann (tiagosh) wrote :

looks good to me now.
Thanks.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:211
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/154/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/973/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/879
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/154
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/154
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/154/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/154
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1361/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1735
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1735/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8557
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/759
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1020
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1020/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/154/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-autolanding/15/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/974/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/880
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-autolanding/15
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-autolanding/15
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-autolanding/15/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-autolanding/15
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1362/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1736
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1736/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8558
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/760
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1021
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1021/artifact/work/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:215
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-ci/157/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/998
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/899
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-ci/157
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/157
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-ci/157/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-ci/157
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1382
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1768
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1768/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8583
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/776
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1041
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1041/artifact/work/output/*zip*/output.zip

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/phablet-team-address-book-app-staging-ci/157/rebuild

review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-autolanding/16/
Executed test runs:
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-utopic-touch/999
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-utopic/900
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-amd64-autolanding/16
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-autolanding/16
        deb: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-armhf-autolanding/16/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/phablet-team-address-book-app-staging-utopic-i386-autolanding/16
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-mako/1383
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1769
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-armhf/1769/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/8584
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-utopic/777
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1042
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-utopic-amd64/1042/artifact/work/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/imagescalethread.cpp'
--- src/app/imagescalethread.cpp 2013-10-15 14:34:03 +0000
+++ src/app/imagescalethread.cpp 2014-06-18 14:13:24 +0000
@@ -57,7 +57,7 @@
57 }57 }
5858
59 // Create the temporary file59 // Create the temporary file
60 m_tmpFile = new QTemporaryFile();60 m_tmpFile = new QTemporaryFile("avatar_XXXXXX.png");
61 if (!m_tmpFile->open()) {61 if (!m_tmpFile->open()) {
62 return;62 return;
63 }63 }
6464
=== modified file 'src/imports/Common/ContactDetailItem.qml'
--- src/imports/Common/ContactDetailItem.qml 2014-05-16 00:06:46 +0000
+++ src/imports/Common/ContactDetailItem.qml 2014-06-18 14:13:24 +0000
@@ -23,6 +23,7 @@
2323
24 readonly property alias fieldDelegates: fieldsColumn.children24 readonly property alias fieldDelegates: fieldsColumn.children
25 property Component fieldDelegate: null25 property Component fieldDelegate: null
26 property alias spacing: fieldsColumn.spacing
2627
27 implicitHeight: fieldsColumn.height28 implicitHeight: fieldsColumn.height
28 Column {29 Column {
2930
=== added file 'src/imports/ContactEdit/AddFieldDialog.qml'
--- src/imports/ContactEdit/AddFieldDialog.qml 1970-01-01 00:00:00 +0000
+++ src/imports/ContactEdit/AddFieldDialog.qml 2014-06-18 14:13:24 +0000
@@ -0,0 +1,142 @@
1/*
2 * Copyright (C) 2012-2014 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.2
18import Ubuntu.Components 0.1
19import QtContacts 5.0
20import Ubuntu.Components.Popups 0.1 as Popups
21
22
23Item {
24 id: root
25
26 property QtObject contact: null
27 property var currentDialog: null
28 readonly property var validDetails: [ ContactDetail.PhoneNumber,
29 ContactDetail.Email,
30 ContactDetail.Address,
31 ContactDetail.OnlineAccount,
32 ContactDetail.Organization
33 // TODO: Not supported yet
34 // ContactDetail.Birthday,
35 // ContactDetail.Note,
36 // ContactDetail.Url
37 ]
38 readonly property var singleValueDetails: [ ContactDetail.Organization ]
39 signal fieldSelected(string fieldName, string qmlTypeName)
40
41 function showOptions()
42 {
43 if (currentDialog == null) {
44 // make sure the OSK disappear
45 root.forceActiveFocus()
46 currentDialog = PopupUtils.open(addFieldDialog, null)
47 }
48 }
49
50 function nameFromEnum(value)
51 {
52 switch (value)
53 {
54 case ContactDetail.PhoneNumber:
55 return i18n.tr("Phone")
56 case ContactDetail.Email:
57 return i18n.tr("Email")
58 case ContactDetail.Address:
59 return i18n.tr("Address")
60 case ContactDetail.OnlineAccount:
61 return i18n.tr("Social")
62 case ContactDetail.Organization:
63 return i18n.tr("Professional Details")
64 default:
65 console.error("Invalid contact detail enum value:" + value)
66 return ""
67 }
68 }
69
70 function qmlTypeFromEnum(value)
71 {
72 switch (value)
73 {
74 case ContactDetail.PhoneNumber:
75 return "PhoneNumber"
76 case ContactDetail.Email:
77 return "EmailAddress"
78 case ContactDetail.Address:
79 return "Address"
80 case ContactDetail.OnlineAccount:
81 return "OnlineAccount"
82 case ContactDetail.Organization:
83 return "Organization"
84 default:
85 console.error("Invalid contact detail enum value:" + value)
86 return ""
87 }
88 }
89
90 // check which details will be allowed to create
91 // some details we only support one value
92 function filterSingleDetails(details, contact)
93 {
94 var result = []
95 for(var i=0; i < details.length; i++) {
96 var det = details[i]
97 if (singleValueDetails.indexOf(det) != -1) {
98 if (contact.details(det).length === 0) {
99 result.push(det)
100 }
101 } else {
102 result.push(det)
103 }
104 }
105 return result
106 }
107
108 visible: false
109 Component {
110 id: addFieldDialog
111
112 Popups.Dialog {
113 id: dialogue
114 objectName: "addFieldDialog"
115
116 title: i18n.tr("Select a field")
117 Repeater {
118 model: root.filterSingleDetails(validDetails, root.contact)
119 Button {
120 objectName: text
121
122 text: root.nameFromEnum(modelData)
123 onClicked: {
124 root.fieldSelected(text, root.qmlTypeFromEnum(modelData))
125 PopupUtils.close(root.currentDialog)
126 root.currentDialog = null
127 }
128 }
129 }
130 Button {
131 objectName: "cancel"
132
133 text: i18n.tr("Cancel")
134 gradient: UbuntuColors.greyGradient
135 onClicked: {
136 PopupUtils.close(root.currentDialog)
137 root.currentDialog = null
138 }
139 }
140 }
141 }
142}
0143
=== added file 'src/imports/ContactEdit/AvatarImport.qml'
--- src/imports/ContactEdit/AvatarImport.qml 1970-01-01 00:00:00 +0000
+++ src/imports/ContactEdit/AvatarImport.qml 2014-06-18 14:13:24 +0000
@@ -0,0 +1,78 @@
1/*
2 * Copyright (C) 2012-2014 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.2
18import Ubuntu.Components 0.1
19import Ubuntu.Components.Popups 0.1 as Popups
20import Ubuntu.Content 0.1 as ContentHub
21
22Item {
23 id: root
24
25 property var activeTransfer: null
26 property var loadingDialog: null
27
28 signal avatarReceived(string avatarUrl)
29
30 function requestNewAvatar()
31 {
32 if (!root.loadingDialog) {
33 root.loadingDialog = PopupUtils.open(loadingDialog, null)
34 root.activeTransfer = defaultSource.request();
35 }
36 }
37
38 ContentHub.ContentPeer {
39 id: defaultSource
40
41 contentType: ContentHub.ContentType.Pictures
42 handler: ContentHub.ContentHandler.Source
43 selectionType: ContentHub.ContentTransfer.Single
44 }
45
46 Connections {
47 target: root.activeTransfer
48 onStateChanged: {
49 var done = ((root.activeTransfer.state === ContentHub.ContentTransfer.Charged) ||
50 (root.activeTransfer.state === ContentHub.ContentTransfer.Aborted));
51
52 if (root.activeTransfer.state === ContentHub.ContentTransfer.Charged) {
53 if (root.activeTransfer.items.length > 0) {
54 root.avatarReceived(root.activeTransfer.items[0].url)
55 }
56 }
57
58 if (done) {
59 PopupUtils.close(root.loadingDialog)
60 root.loadingDialog = null
61 }
62 }
63 }
64
65 Component {
66 id: loadingDialog
67
68 Popups.Dialog {
69 id: dialogue
70
71 title: i18n.tr("Loading")
72 ActivityIndicator {
73 running: true
74 visible: running
75 }
76 }
77 }
78}
079
=== modified file 'src/imports/ContactEdit/CMakeLists.txt'
--- src/imports/ContactEdit/CMakeLists.txt 2014-06-09 22:45:19 +0000
+++ src/imports/ContactEdit/CMakeLists.txt 2014-06-18 14:13:24 +0000
@@ -1,4 +1,6 @@
1set(CONTACT_EDIT_QMLS1set(CONTACT_EDIT_QMLS
2 AvatarImport.qml
3 AddFieldDialog.qml
2 ContactDetailAddressesEditor.qml4 ContactDetailAddressesEditor.qml
3 ContactDetailAvatarEditor.qml5 ContactDetailAvatarEditor.qml
4 ContactDetailEmailsEditor.qml6 ContactDetailEmailsEditor.qml
57
=== modified file 'src/imports/ContactEdit/ContactDetailAvatarEditor.qml'
--- src/imports/ContactEdit/ContactDetailAvatarEditor.qml 2014-05-06 13:18:07 +0000
+++ src/imports/ContactEdit/ContactDetailAvatarEditor.qml 2014-06-18 14:13:24 +0000
@@ -17,15 +17,13 @@
17import QtQuick 2.217import QtQuick 2.2
18import Ubuntu.Components 0.118import Ubuntu.Components 0.1
19import QtContacts 5.019import QtContacts 5.0
20import Ubuntu.Content 0.1
21import Ubuntu.Components.Popups 0.1 as Popups
2220
23import "../Common"21import "../Common"
2422
25ContactDetailBase {23ContactDetailBase {
26 id: root24 id: root
2725
28 readonly property string defaultAvatar: Qt.resolvedUrl("../../artwork/contact-default-profile.png")26 readonly property string defaultAvatar: "image://theme/contact"
2927
30 function isEmpty() {28 function isEmpty() {
31 return false;29 return false;
@@ -62,98 +60,51 @@
62 }60 }
6361
64 detail: contact ? contact.detail(ContactDetail.Avatar) : null62 detail: contact ? contact.detail(ContactDetail.Avatar) : null
65 implicitHeight: units.gu(17)63 implicitHeight: units.gu(8)
6664 implicitWidth: units.gu(8)
67 Image {65
68 id: avatarImage66 UbuntuShape {
6967 id: avatar
70 anchors.fill: parent68
71 source: root.getAvatar(root.detail)69 radius: "medium"
72 asynchronous: true70 anchors.fill: parent
73 fillMode: Image.PreserveAspectCrop71 image: Image {
74 // When updating the avatar using the content picker the temporary file returned72 id: avatarImage
75 // can contain the same name as the previous one and if the cache is enabled this73
76 // will cause the image to not be updated74 fillMode: Image.PreserveAspectCrop
77 cache: false75 asynchronous: true
7876 source: root.getAvatar(root.detail)
79 Component {77 height: units.gu(8)
80 id: loadingDialog78 width: units.gu(8)
8179
82 Popups.Dialog {80 // When updating the avatar using the content picker the temporary file returned
83 id: dialogue81 // can contain the same name as the previous one and if the cache is enabled this
8482 // will cause the image to not be updated
85 title: i18n.tr("Loading")83 cache: false
8684 }
87 ActivityIndicator {85 }
88 id: activity86
8987 AvatarImport {
90 anchors.centerIn: parent88 id: avatarImport
91 running: true89
92 visible: running90 onAvatarReceived: {
93 }91 // remove the previous image, this is nessary to make sure that the new image
94 }92 // get updated otherwise if the new image has the same name the image will not
95 }93 // be updated
9694 avatarImage.source = ""
97 Icon {95 // Update with the new value
98 anchors {96 avatarImage.source = application.copyImage(root.contact, avatarUrl);
99 right: parent.right97 }
100 rightMargin: units.gu(1.5)98 }
101 bottom: parent.bottom99
102 bottomMargin: units.gu(2)100 MouseArea {
103 }101 anchors.fill: parent
104 width: units.gu(3)102 onClicked: {
105 height: width103 // make sure the OSK disappear
106 name: "import-image"104 root.forceActiveFocus()
107 color: "white"105 avatarImport.requestNewAvatar()
108 }
109
110 ContentPeer {
111 id: defaultSource
112 contentType: ContentType.Pictures
113 handler: ContentHandler.Source
114 selectionType: ContentTransfer.Single
115 }
116
117 MouseArea {
118 id: changeButton
119
120 property var activeTransfer
121 property var loadingDialog: null
122
123 anchors.fill: parent
124 onClicked: {
125 // make sure the OSK disappear
126 root.forceActiveFocus()
127 if (!changeButton.loadingDialog) {
128 changeButton.loadingDialog = PopupUtils.open(loadingDialog, null)
129 changeButton.activeTransfer = defaultSource.request();
130 }
131 }
132
133 Connections {
134 target: changeButton.activeTransfer != null ? changeButton.activeTransfer : null
135 onStateChanged: {
136 var done = ((changeButton.activeTransfer.state === ContentTransfer.Charged) ||
137 (changeButton.activeTransfer.state === ContentTransfer.Aborted));
138
139 if (changeButton.activeTransfer.state === ContentTransfer.Charged) {
140 if (changeButton.activeTransfer.items.length > 0) {
141 // remove the previous image, this is nessary to make sure that the new image
142 // get updated otherwise if the new image has the same name the image will not
143 // be updated
144 avatarImage.source = ""
145 // Update with the new valu
146 avatarImage.source = application.copyImage(root.contact, changeButton.activeTransfer.items[0].url);
147 }
148 }
149
150 if (done) {
151 PopupUtils.close(changeButton.loadingDialog)
152 changeButton.loadingDialog = null
153 }
154 }
155 }
156 }106 }
157 }107 }
158}108}
159109
110
160111
=== modified file 'src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml'
--- src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml 2014-05-22 06:56:03 +0000
+++ src/imports/ContactEdit/ContactDetailGroupWithTypeEditor.qml 2014-06-18 14:13:24 +0000
@@ -95,7 +95,7 @@
9595
96 return changed96 return changed
97 }97 }
98 minimumHeight: units.gu(5)98
99 headerDelegate: ListItem.Empty {99 headerDelegate: ListItem.Empty {
100 id: header100 id: header
101 highlightWhenPressed: false101 highlightWhenPressed: false
@@ -104,6 +104,9 @@
104 height: units.gu(5)104 height: units.gu(5)
105 // disable listview mouse area105 // disable listview mouse area
106 __mouseArea.visible: false106 __mouseArea.visible: false
107 divider.anchors.leftMargin: units.gu(2)
108 divider.anchors.rightMargin: units.gu(2)
109
107 Label {110 Label {
108 anchors {111 anchors {
109 verticalCenter: parent.verticalCenter112 verticalCenter: parent.verticalCenter
@@ -117,35 +120,6 @@
117 // style120 // style
118 fontSize: "medium"121 fontSize: "medium"
119 }122 }
120
121 Icon {
122 objectName: "newDetailButton"
123
124 anchors {
125 verticalCenter: parent.verticalCenter
126 right: parent.right
127 rightMargin: units.gu(2)
128 }
129 width: units.gu(2)
130 height: units.gu(2)
131 name: "add"
132 }
133
134 // Mouse area fill all title area to avoid problems with swipe from the right gesture
135 MouseArea {
136 anchors.fill: parent
137 onClicked: {
138 if (detailQmlTypeName) {
139 var newDetail = Qt.createQmlObject("import QtContacts 5.0; " + detailQmlTypeName + "{}", root)
140 if (newDetail) {
141 var newDetailsCopy = root.newDetails
142 newDetailsCopy.push(newDetail)
143 root.newDetails = newDetailsCopy
144 root.contact.addDetail(newDetail)
145 }
146 }
147 }
148 }
149 }123 }
150124
151 detailDelegate: ContactDetailWithTypeEditor {125 detailDelegate: ContactDetailWithTypeEditor {
152126
=== modified file 'src/imports/ContactEdit/ContactDetailNameEditor.qml'
--- src/imports/ContactEdit/ContactDetailNameEditor.qml 2014-05-09 20:00:09 +0000
+++ src/imports/ContactEdit/ContactDetailNameEditor.qml 2014-06-18 14:13:24 +0000
@@ -51,6 +51,7 @@
51 return changed51 return changed
52 }52 }
5353
54 spacing: units.gu(1)
54 detail: root.contact ? root.contact.name : null55 detail: root.contact ? root.contact.name : null
55 fields: [ QtContacts.Name.FirstName, QtContacts.Name.LastName ]56 fields: [ QtContacts.Name.FirstName, QtContacts.Name.LastName ]
5657
5758
=== modified file 'src/imports/ContactEdit/ContactDetailSyncTargetEditor.qml'
--- src/imports/ContactEdit/ContactDetailSyncTargetEditor.qml 2014-05-28 15:22:38 +0000
+++ src/imports/ContactEdit/ContactDetailSyncTargetEditor.qml 2014-06-18 14:13:24 +0000
@@ -84,6 +84,12 @@
84 height: units.gu(4)84 height: units.gu(4)
85 }85 }
8686
87 ListItem.ThinDivider {
88 id: divider
89
90 anchors.top: label.bottom
91 }
92
87 OptionSelector {93 OptionSelector {
88 id: sources94 id: sources
8995
@@ -91,8 +97,8 @@
91 anchors {97 anchors {
92 left: parent.left98 left: parent.left
93 leftMargin: units.gu(2)99 leftMargin: units.gu(2)
94 top: label.bottom100 top: divider.bottom
95 topMargin: units.gu(1)101 topMargin: units.gu(2)
96 right: parent.right102 right: parent.right
97 rightMargin: units.gu(2)103 rightMargin: units.gu(2)
98 bottom: parent.bottom104 bottom: parent.bottom
99105
=== modified file 'src/imports/ContactEdit/ContactDetailWithTypeEditor.qml'
--- src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2014-05-16 01:59:36 +0000
+++ src/imports/ContactEdit/ContactDetailWithTypeEditor.qml 2014-06-18 14:13:24 +0000
@@ -73,41 +73,19 @@
73 enabled: root.detail ? !root.detail.readOnly : false73 enabled: root.detail ? !root.detail.readOnly : false
74 implicitHeight: detailTypeSelector.height + fieldValues.height + units.gu(2)74 implicitHeight: detailTypeSelector.height + fieldValues.height + units.gu(2)
75 opacity: enabled ? 1.0 : 0.575 opacity: enabled ? 1.0 : 0.5
76 ValueSelector {76
77 id: detailTypeSelector77 Column {
78 objectName: detail ? "type_" + detailToString(detail.type, -1) + "_" + index : ""78 id: fieldValues
7979
80 readOnly: root.detail ? root.detail.readOnly : false
81 visible: (currentIndex != -1)
82 active: root.active
83 anchors {80 anchors {
84 left: parent.left81 left: parent.left
85 leftMargin: units.gu(3)82 leftMargin: units.gu(2)
86 right: parent.right83 right: parent.right
87 rightMargin: units.gu(2)84 rightMargin: units.gu(2)
88 top: parent.top85 top: parent.top
89 topMargin: units.gu(1)86 topMargin: units.gu(1)
90 }87 }
91
92 height: visible ? (root.active ? units.gu(4) : units.gu(3)) : 0
93 onExpandedChanged: {
94 // Make sure that the inputfield get focus when clicking on type selector
95 if (expanded) {
96 root.forceActiveFocus()
97 }
98 }
99 }
100
101 Column {
102 id: fieldValues
103
104 anchors {
105 left: detailTypeSelector.left
106 right: detailTypeSelector.right
107 top: detailTypeSelector.bottom
108 }
109 height: childrenRect.height88 height: childrenRect.height
110
111 Repeater {89 Repeater {
112 id: fieldRepeater90 id: fieldRepeater
11391
@@ -141,4 +119,26 @@
141 }119 }
142 }120 }
143 }121 }
122
123 ValueSelector {
124 id: detailTypeSelector
125 objectName: detail ? "type_" + detailToString(detail.type, -1) + "_" + index : ""
126
127 anchors {
128 left: fieldValues.left
129 right: fieldValues.right
130 top: fieldValues.bottom
131 }
132
133 readOnly: root.detail ? root.detail.readOnly : false
134 visible: (currentIndex != -1)
135 active: root.active
136 height: visible ? (root.active ? units.gu(4) : units.gu(3)) : 0
137 onExpandedChanged: {
138 // Make sure that the inputfield get focus when clicking on type selector
139 if (expanded) {
140 root.forceActiveFocus()
141 }
142 }
143 }
144}144}
145145
=== modified file 'src/imports/ContactEdit/ContactEditor.qml'
--- src/imports/ContactEdit/ContactEditor.qml 2014-06-16 12:59:15 +0000
+++ src/imports/ContactEdit/ContactEditor.qml 2014-06-18 14:13:24 +0000
@@ -161,7 +161,7 @@
161 fill: parent161 fill: parent
162 bottomMargin: keyboard.height162 bottomMargin: keyboard.height
163 }163 }
164 contentHeight: contents.height164 contentHeight: contents.height + units.gu(2)
165 contentWidth: parent.width165 contentWidth: parent.width
166166
167 //after add a new field we need to wait for the contentHeight to change to scroll to the correct position167 //after add a new field we need to wait for the contentHeight to change to scroll to the correct position
@@ -172,32 +172,48 @@
172172
173 anchors {173 anchors {
174 top: parent.top174 top: parent.top
175 topMargin: units.gu(2)
175 left: parent.left176 left: parent.left
176 right: parent.right177 right: parent.right
177 }178 }
178 height: childrenRect.height179 height: childrenRect.height
179180
180 ContactDetailNameEditor {181 Row {
181 id: nameEditor182 function save()
182183 {
183184 var avatarSave = avatarEditor.save()
184 anchors {185 var nameSave = nameEditor.save();
185 left: parent.left186
186 right: parent.right187 return (nameSave || avatarSave);
187 }188 }
188 height: nameEditor.implicitHeight + units.gu(3)189
189 contact: contactEditor.contact190 function isEmpty()
190 }191 {
191192 return (avatarEditor.isEmpty() && nameEditor.isEmpty())
192 ContactDetailAvatarEditor {193 }
193 id: avatarEditor194
194195 anchors {
195 contact: contactEditor.contact196 left: parent.left
196 anchors {197 leftMargin: units.gu(2)
197 left: parent.left198 right: parent.right
198 right: parent.right199 }
199 }200 height: Math.max(avatarEditor.height, nameEditor.height) - units.gu(4)
200 height: implicitHeight201
202 ContactDetailAvatarEditor {
203 id: avatarEditor
204
205 contact: contactEditor.contact
206 height: implicitHeight
207 width: implicitWidth
208 }
209
210 ContactDetailNameEditor {
211 id: nameEditor
212
213 width: parent.width - avatarEditor.width
214 height: nameEditor.implicitHeight + units.gu(3)
215 contact: contactEditor.contact
216 }
201 }217 }
202218
203 ContactDetailPhoneNumbersEditor {219 ContactDetailPhoneNumbersEditor {
@@ -272,13 +288,48 @@
272 height: implicitHeight288 height: implicitHeight
273 }289 }
274290
275 // We need this extra element to correct align the deleteButton291 ListItem.ThinDivider {}
292
276 Item {293 Item {
277 anchors {294 anchors {
278 left: parent.left295 left: parent.left
279 right: parent.right296 right: parent.right
280 }297 }
281 height: deleteButton.height + units.gu(2)298 height: units.gu(2)
299 }
300
301 Row {
302 anchors {
303 left: parent.left
304 right: parent.right
305 margins: units.gu(2)
306 }
307 height: units.gu(6)
308 spacing: units.gu(2)
309
310 // WORKAROUND: SDK uses a old version of qtquick components
311 activeFocusOnTab: true
312 onActiveFocusChanged: {
313 if (activeFocus) {
314 addNewFieldButton.forceActiveFocus()
315 }
316 }
317
318 Button {
319 id: addNewFieldButton
320 objectName: "addNewFieldButton"
321
322 text: i18n.tr("Add Field")
323 gradient: UbuntuColors.greyGradient
324 anchors {
325 top: parent.top
326 bottom: parent.bottom
327 bottomMargin: units.gu(2)
328 }
329 width: (parent.width / 2) - units.gu(1)
330
331 onClicked: addFieldDialog.showOptions()
332 }
282333
283 Button {334 Button {
284 id: deleteButton335 id: deleteButton
@@ -286,12 +337,11 @@
286 text: i18n.tr("Delete")337 text: i18n.tr("Delete")
287 visible: !contactEditor.isNewContact338 visible: !contactEditor.isNewContact
288 anchors {339 anchors {
289 margins: units.gu(2)
290 top: parent.top340 top: parent.top
291 left: parent.left341 bottom: parent.bottom
292 right: parent.right342 bottomMargin: units.gu(2)
293 }343 }
294344 width: (parent.width / 2) - units.gu(1)
295 onClicked: {345 onClicked: {
296 var dialog = Popups.PopupUtils.open(removeContactDialog, null)346 var dialog = Popups.PopupUtils.open(removeContactDialog, null)
297 dialog.contacts = [contactEditor.contact]347 dialog.contacts = [contactEditor.contact]
@@ -351,6 +401,23 @@
351 }401 }
352 }402 }
353403
404 AddFieldDialog {
405 id: addFieldDialog
406
407 contact: contactEditor.contact
408 onFieldSelected: {
409 if (qmlTypeName) {
410 var newDetail = Qt.createQmlObject("import QtContacts 5.0; " + qmlTypeName + "{}", addFieldDialog)
411 if (newDetail) {
412 var newDetailsCopy = contactEditor.newDetails
413 newDetailsCopy.push(newDetail)
414 contactEditor.newDetails = newDetailsCopy
415 contactEditor.contact.addDetail(newDetail)
416 }
417 }
418 }
419 }
420
354 Component {421 Component {
355 id: removeContactDialog422 id: removeContactDialog
356423
357424
=== modified file 'src/imports/ContactEdit/TextInputDetail.qml'
--- src/imports/ContactEdit/TextInputDetail.qml 2014-05-28 15:19:53 +0000
+++ src/imports/ContactEdit/TextInputDetail.qml 2014-06-18 14:13:24 +0000
@@ -80,6 +80,7 @@
80 overlaySpacing: 080 overlaySpacing: 0
81 frameSpacing: 081 frameSpacing: 0
82 background: Item {}82 background: Item {}
83 color: UbuntuColors.lightAubergine
83 }84 }
84 onActiveFocusChanged: {85 onActiveFocusChanged: {
85 if (activeFocus) {86 if (activeFocus) {
8687
=== modified file 'src/imports/ContactEdit/ValueSelector.qml'
--- src/imports/ContactEdit/ValueSelector.qml 2014-06-06 17:52:58 +0000
+++ src/imports/ContactEdit/ValueSelector.qml 2014-06-18 14:13:24 +0000
@@ -59,22 +59,12 @@
5959
60 // FIXME: workaround to close list after a while.60 // FIXME: workaround to close list after a while.
61 // we cant rely on focus since it hides the keyboard.61 // we cant rely on focus since it hides the keyboard.
62 MouseArea {
63 anchors.fill: parent
64 visible: expanded
65 onPressed: {
66 mouse.accepted = false
67 timer.restart()
68 }
69 propagateComposedEvents: true
70 z: 1
71 }
72
73 Timer {62 Timer {
74 id: timer63 id: timer
64
75 interval: 500065 interval: 5000
66 running: false
76 onTriggered: state = ""67 onTriggered: state = ""
77 running: false
78 }68 }
7969
80 Item {70 Item {
@@ -119,8 +109,12 @@
119109
120 MouseArea {110 MouseArea {
121 anchors.fill: parent111 anchors.fill: parent
122 propagateComposedEvents: true112 onClicked: {
123 onClicked: if (!readOnly) root.state = "expanded"113 if (!readOnly) {
114 root.state = "expanded"
115 timer.restart()
116 }
117 }
124 }118 }
125119
126 ListView {120 ListView {
@@ -160,7 +154,10 @@
160 width: parent.width + units.gu(0.5)154 width: parent.width + units.gu(0.5)
161 height: parent.height + units.gu(0.5)155 height: parent.height + units.gu(0.5)
162 anchors.centerIn: parent156 anchors.centerIn: parent
163 onClicked: currentIndex = index157 onClicked: {
158 currentIndex = index
159 timer.restart()
160 }
164 }161 }
165 }162 }
166163
167164
=== modified file 'src/imports/ContactList/ContactListPage.qml'
--- src/imports/ContactList/ContactListPage.qml 2014-06-16 12:59:54 +0000
+++ src/imports/ContactList/ContactListPage.qml 2014-06-18 14:13:24 +0000
@@ -43,10 +43,7 @@
43 function createEmptyContact(phoneNumber) {43 function createEmptyContact(phoneNumber) {
44 var details = [ {detail: "PhoneNumber", field: "number", value: phoneNumber},44 var details = [ {detail: "PhoneNumber", field: "number", value: phoneNumber},
45 {detail: "EmailAddress", field: "emailAddress", value: ""},45 {detail: "EmailAddress", field: "emailAddress", value: ""},
46 {detail: "OnlineAccount", field: "accountUri", value: ""},46 {detail: "Name", field: "firstName", value: ""}
47 {detail: "Address", field: "street", value: ""},
48 {detail: "Name", field: "firstName", value: ""},
49 {detail: "Organization", field: "name", value: ""}
50 ]47 ]
5148
52 var newContact = Qt.createQmlObject("import QtContacts 5.0; Contact{ }", mainPage)49 var newContact = Qt.createQmlObject("import QtContacts 5.0; Contact{ }", mainPage)
5350
=== modified file 'src/imports/ContactView/BasicFieldView.qml'
--- src/imports/ContactView/BasicFieldView.qml 2014-06-12 18:54:18 +0000
+++ src/imports/ContactView/BasicFieldView.qml 2014-06-18 14:13:24 +0000
@@ -50,8 +50,8 @@
50 objectName: detail && fields ? "label_" + detailToString(detail.type, fields[index]) + "_" + root.parentIndex + "." + index : ""50 objectName: detail && fields ? "label_" + detailToString(detail.type, fields[index]) + "_" + root.parentIndex + "." + index : ""
5151
52 anchors {52 anchors {
53 left: parent ? parent.left : null53 left: parent ? parent.left : undefined
54 right: parent ? parent.right : null54 right: parent ? parent.right : undefined
55 }55 }
56 height: root.lineHeight56 height: root.lineHeight
57 verticalAlignment: Text.AlignVCenter57 verticalAlignment: Text.AlignVCenter
5858
=== modified file 'src/imports/ContactView/ContactDetailAvatarView.qml'
--- src/imports/ContactView/ContactDetailAvatarView.qml 2014-06-12 18:53:50 +0000
+++ src/imports/ContactView/ContactDetailAvatarView.qml 2014-06-18 14:13:24 +0000
@@ -24,9 +24,14 @@
24ContactDetailBase {24ContactDetailBase {
25 id: root25 id: root
2626
27 implicitHeight: units.gu(10)27 implicitHeight: units.gu(8)
28 implicitWidth: units.gu(10)28 implicitWidth: units.gu(10)
2929
30 Connections {
31 target: root.contact.avatar
32 onDetailChanged: avatar.reload()
33 }
34
30 ContactsUI.ContactAvatar {35 ContactsUI.ContactAvatar {
31 id: avatar36 id: avatar
3237
@@ -34,7 +39,6 @@
34 anchors {39 anchors {
35 fill: parent40 fill: parent
36 leftMargin: units.gu(2)41 leftMargin: units.gu(2)
37 topMargin: units.gu(2)
38 }42 }
39 }43 }
40}44}
4145
=== modified file 'src/imports/ContactView/ContactDetailGroupWithTypeView.qml'
--- src/imports/ContactView/ContactDetailGroupWithTypeView.qml 2014-06-12 18:54:18 +0000
+++ src/imports/ContactView/ContactDetailGroupWithTypeView.qml 2014-06-18 14:13:24 +0000
@@ -31,6 +31,8 @@
31 headerDelegate: ListItem.Empty {31 headerDelegate: ListItem.Empty {
32 highlightWhenPressed: false32 highlightWhenPressed: false
3333
34 divider.anchors.leftMargin: units.gu(2)
35 divider.anchors.rightMargin: units.gu(2)
34 width: root.width36 width: root.width
35 height: units.gu(5)37 height: units.gu(5)
36 Label {38 Label {
3739
=== modified file 'src/imports/ContactView/ContactView.qml'
--- src/imports/ContactView/ContactView.qml 2014-06-13 15:05:40 +0000
+++ src/imports/ContactView/ContactView.qml 2014-06-18 14:13:24 +0000
@@ -67,7 +67,7 @@
67 anchors.fill: parent67 anchors.fill: parent
68 //WORKAROUND: There is a bug on SDK page that causes the page to appear flicked with small contents68 //WORKAROUND: There is a bug on SDK page that causes the page to appear flicked with small contents
69 // see bug #122305069 // see bug #1223050
70 contentHeight: Math.max(contents.height, parent.height)70 contentHeight: Math.max(contents.height, parent.height) + units.gu(2)
71 contentWidth: parent.width71 contentWidth: parent.width
72 visible: !busyIndicator.visible72 visible: !busyIndicator.visible
7373
@@ -77,6 +77,7 @@
77 height: childrenRect.height77 height: childrenRect.height
78 anchors {78 anchors {
79 top: parent.top79 top: parent.top
80 topMargin: units.gu(2)
80 left: parent.left81 left: parent.left
81 right: parent.right82 right: parent.right
82 }83 }
8384
=== modified file 'src/imports/Ubuntu/Contacts/ContactAvatar.qml'
--- src/imports/Ubuntu/Contacts/ContactAvatar.qml 2014-06-06 17:52:58 +0000
+++ src/imports/Ubuntu/Contacts/ContactAvatar.qml 2014-06-18 14:13:24 +0000
@@ -24,7 +24,12 @@
2424
25 property var contactElement: null25 property var contactElement: null
26 property string displayName: ContactsJS.formatToDisplay(contactElement, ContactDetail.Name, [Name.FirstName, Name.LastName])26 property string displayName: ContactsJS.formatToDisplay(contactElement, ContactDetail.Name, [Name.FirstName, Name.LastName])
27 readonly property string avatarUrl: ContactsJS.getAvatar(contactElement, "")27 property string avatarUrl: ContactsJS.getAvatar(contactElement, "")
28
29 function reload()
30 {
31 avatarUrl = ContactsJS.getAvatar(contactElement, "")
32 }
2833
29 radius: "medium"34 radius: "medium"
30 color: Theme.palette.normal.overlay35 color: Theme.palette.normal.overlay
@@ -34,13 +39,16 @@
34 text: ContactsJS.getNameItials(displayName)39 text: ContactsJS.getNameItials(displayName)
35 font.pointSize: 8840 font.pointSize: 88
36 color: UbuntuColors.lightAubergine41 color: UbuntuColors.lightAubergine
37 visible: avatarUrl === ""42 visible: (img.status != Image.Ready)
38 }43 }
3944
40 image: Image {45 image: Image {
46 id: img
47
41 fillMode: Image.PreserveAspectCrop48 fillMode: Image.PreserveAspectCrop
42 asynchronous: true49 asynchronous: true
43 source: avatarUrl50 source: avatarUrl
44 visible: source !== ""51 height: avatar.height
52 width: avatar.width
45 }53 }
46}54}
4755
=== modified file 'src/imports/Ubuntu/Contacts/MultipleSelectionListView.qml'
--- src/imports/Ubuntu/Contacts/MultipleSelectionListView.qml 2014-06-06 17:52:58 +0000
+++ src/imports/Ubuntu/Contacts/MultipleSelectionListView.qml 2014-06-18 14:13:24 +0000
@@ -55,7 +55,7 @@
55 \endqml55 \endqml
56*/56*/
5757
58UbuntuListView {58ListView {
59 id: listView59 id: listView
6060
61 /*!61 /*!
@@ -188,4 +188,12 @@
188 MultipleSelectionVisualModel {188 MultipleSelectionVisualModel {
189 id: visualModel189 id: visualModel
190 }190 }
191
192 Component.onCompleted: {
193 // FIXME: workaround for qtubuntu not returning values depending on the grid unit definition
194 // for Flickable.maximumFlickVelocity and Flickable.flickDeceleration
195 var scaleFactor = units.gridUnit / 8;
196 maximumFlickVelocity = maximumFlickVelocity * scaleFactor;
197 flickDeceleration = flickDeceleration * scaleFactor;
198 }
191}199}
192200
=== modified file 'tests/autopilot/address_book_app/pages/_contact_editor.py'
--- tests/autopilot/address_book_app/pages/_contact_editor.py 2014-05-22 12:50:28 +0000
+++ tests/autopilot/address_book_app/pages/_contact_editor.py 2014-06-18 14:13:24 +0000
@@ -51,6 +51,36 @@
51class ContactEditor(_common.PageWithHeader):51class ContactEditor(_common.PageWithHeader):
52 """Custom proxy object for the Contact Editor."""52 """Custom proxy object for the Contact Editor."""
5353
54 _DETAIL_ALIAS = {
55 'phones': 'Phone',
56 'emails': 'Email',
57 'ims': 'Social',
58 'addresses': 'Address',
59 'professionalDetails': 'Professional Details'
60 }
61
62 @autopilot.logging.log_action(logger.info)
63 def add_field(self, detail_name):
64 """Create a new field into the edit contact form.
65
66 :param detail_name: The detail field name
67
68 """
69
70 add_field_button = self.select_single(
71 'Button', objectName='addNewFieldButton')
72 add_field_button.swipe_into_view()
73
74 self.pointing_device.click_object(add_field_button)
75
76 add_field_dialog = self.get_root_instance().wait_select_single(
77 'Dialog', objectName='addFieldDialog')
78 new_field_button = add_field_dialog.select_single(
79 'Button',
80 objectName=self._DETAIL_ALIAS[detail_name])
81
82 self.pointing_device.click_object(new_field_button)
83
54 @autopilot.logging.log_action(logger.info)84 @autopilot.logging.log_action(logger.info)
55 def fill_form(self, contact_information):85 def fill_form(self, contact_information):
56 """Fill the edit contact form.86 """Fill the edit contact form.
@@ -90,7 +120,7 @@
90 def _fill_detail_group(self, object_name, details):120 def _fill_detail_group(self, object_name, details):
91 editor = self.select_single(121 editor = self.select_single(
92 ContactDetailGroupWithTypeEditor, objectName=object_name)122 ContactDetailGroupWithTypeEditor, objectName=object_name)
93 editor.fill(details)123 editor.fill(self, details)
94124
95 def _get_form_values(self):125 def _get_form_values(self):
96 first_name = _get_text_field(self, 'first_name').text126 first_name = _get_text_field(self, 'first_name').text
@@ -135,12 +165,12 @@
135 'professionalDetails': 'base_unknown_{}'165 'professionalDetails': 'base_unknown_{}'
136 }166 }
137167
138 def fill(self, details):168 def fill(self, editor, details):
139 """Fill a contact detail group."""169 """Fill a contact detail group."""
140 for index, detail in enumerate(details[:-1]):170 for index, detail in enumerate(details):
171 if self.detailsCount <= index:
172 editor.add_field(self.objectName)
141 self._fill_detail(index, detail)173 self._fill_detail(index, detail)
142 self._add_detail()
143 self._fill_detail(len(details) - 1, details[-1])
144174
145 def _fill_detail(self, index, detail):175 def _fill_detail(self, index, detail):
146 detail_editor = self._get_detail_editor_by_index(index)176 detail_editor = self._get_detail_editor_by_index(index)
@@ -175,15 +205,16 @@
175 """Custom proxy object for the ContactDetailWithTypeEditor widget."""205 """Custom proxy object for the ContactDetailWithTypeEditor widget."""
176206
177 def fill(self, field, index, detail):207 def fill(self, field, index, detail):
208 self._fill_value(field, index, detail)
178 self._select_type(detail)209 self._select_type(detail)
179 self._fill_value(field, index, detail)
180210
181 def _select_type(self, detail):211 def _select_type(self, detail):
182 type_index = detail.TYPES.index(detail.type)212 type_index = detail.TYPES.index(detail.type)
183 selected_type_index = self._get_selected_type_index()213 value_selector = self.select_single('ValueSelector')
184 if type_index != selected_type_index:214
185 # TODO --elopio - 2014-03-01215 while(value_selector.currentIndex != type_index):
186 raise NotImplementedError('Type selection not yet implemented.')216 ubuntuuitoolkit.get_keyboard().press_and_release("Shift+Right")
217 time.sleep(0.1)
187218
188 def _get_selected_type_index(self):219 def _get_selected_type_index(self):
189 value_selector = self.select_single('ValueSelector')220 value_selector = self.select_single('ValueSelector')
@@ -210,16 +241,7 @@
210 self._make_field_visible_and_write(text_field, value)241 self._make_field_visible_and_write(text_field, value)
211242
212 def _make_field_visible_and_write(self, text_field, value):243 def _make_field_visible_and_write(self, text_field, value):
213 while not text_field.activeFocus:244 text_field.swipe_into_view()
214 # XXX We should just swipe the text field into view.
215 # Update this once bug http://pad.lv/1286479 is implemented.
216 # --elopio - 2014-03-01
217 text_field.keyboard.press_and_release('Tab')
218 time.sleep(0.1)
219 contact_editor = self.get_root_instance().select_single(
220 ContactEditor, objectName='contactEditorPage', active=True)
221 contact_editor.wait_to_stop_moving()
222
223 text_field.write(value)245 text_field.write(value)
224246
225 def _fill_address(self, index, address):247 def _fill_address(self, index, address):
226248
=== modified file 'tests/autopilot/address_book_app/tests/__init__.py'
--- tests/autopilot/address_book_app/tests/__init__.py 2014-06-13 00:23:37 +0000
+++ tests/autopilot/address_book_app/tests/__init__.py 2014-06-18 14:13:24 +0000
@@ -143,6 +143,7 @@
143 self.pointing_device.click_object(clear_button)143 self.pointing_device.click_object(clear_button)
144 self.assertThat(field.text, Eventually(Equals("")))144 self.assertThat(field.text, Eventually(Equals("")))
145145
146 # FIXME: Remove this function use ContactEditor.add_field
146 def create_new_detail(self, detailGroup):147 def create_new_detail(self, detailGroup):
147 detCount = detailGroup.detailsCount148 detCount = detailGroup.detailsCount
148 add_button = detailGroup.select_single("Icon",149 add_button = detailGroup.select_single("Icon",
@@ -155,9 +156,7 @@
155 list_page = self.main_window.get_contact_list_page()156 list_page = self.main_window.get_contact_list_page()
156 list_page.open_contact(index)157 list_page.open_contact(index)
157158
158 list_page = self.main_window.get_contact_list_page()
159 self.assertThat(list_page.visible, Eventually(Equals(False)))159 self.assertThat(list_page.visible, Eventually(Equals(False)))
160
161 view_page = self.main_window.get_contact_view_page()160 view_page = self.main_window.get_contact_view_page()
162 self.assertThat(view_page.visible, Eventually(Equals(True)))161 self.assertThat(view_page.visible, Eventually(Equals(True)))
163162
164163
=== modified file 'tests/autopilot/address_book_app/tests/test_add_contact.py'
--- tests/autopilot/address_book_app/tests/test_add_contact.py 2014-06-08 13:51:45 +0000
+++ tests/autopilot/address_book_app/tests/test_add_contact.py 2014-06-18 14:13:24 +0000
@@ -173,28 +173,23 @@
173 self.assertThat(list_view.count, Eventually(Equals(1)))173 self.assertThat(list_view.count, Eventually(Equals(1)))
174174
175 def test_email_label_save(self):175 def test_email_label_save(self):
176 # execute add new contact
177 contact_editor = self.app.main_window.go_to_add_contact()176 contact_editor = self.app.main_window.go_to_add_contact()
178177
179 # fill name178 my_emails = []
180 contact_editor.fill_form(179 my_emails.append(data.Email(type_="Home", address="home@email.com"))
181 data.Contact(first_name='Sherlock', last_name='Holmes'))180 my_emails.append(data.Email(type_="Work", address="work@email.com"))
181 my_emails.append(data.Email(type_="Other", address="other@email.com"))
182182
183 # Home183 test_contact = data.Contact(first_name="Sherlock",
184 self.set_email_address(0, "home@email.com", 0)184 last_name="Holmes",
185 # Work185 emails=my_emails)
186 self.set_email_address(1, "work@email.com", 1)186 contact_editor.fill_form(test_contact)
187 # Other
188 self.set_email_address(2, "other@email.com", 2)
189187
190 # Save contact188 # Save contact
191 self.app.main_window.save()189 self.app.main_window.save()
192190
193 list_page = self.app.main_window.get_contact_list_page()191 list_page = self.app.main_window.get_contact_list_page()
194 list_page.open_contact(0)192 view_page = list_page.open_contact(0)
195
196 # check if contacts was saved with the correct labels
197 view_page = self.app.main_window.get_contact_view_page()
198 self.assertThat(view_page.visible, Eventually(Equals(True)))193 self.assertThat(view_page.visible, Eventually(Equals(True)))
199194
200 # check if we have 3 emails"""195 # check if we have 3 emails"""
@@ -223,33 +218,26 @@
223 self.assertThat(len(emails), Equals(0))218 self.assertThat(len(emails), Equals(0))
224219
225 def test_phone_label_save(self):220 def test_phone_label_save(self):
226 # execute add new contact
227 contact_editor = self.app.main_window.go_to_add_contact()221 contact_editor = self.app.main_window.go_to_add_contact()
228222
229 # fill name223 my_phones = []
230 contact_editor.fill_form(224 my_phones.append(data.Phone(type_="Home", number="(000) 000-0000"))
231 data.Contact(first_name='Sherlock', last_name='Holmes'))225 my_phones.append(data.Phone(type_="Work", number="(000) 000-0001"))
226 my_phones.append(data.Phone(type_="Mobile", number="(000) 000-0002"))
227 my_phones.append(data.Phone(type_="Work Mobile", number="(000) 000-0003"))
228 my_phones.append(data.Phone(type_="Other", number="(000) 000-0004"))
232229
233 # Home230 test_contact = data.Contact(first_name="Sherlock",
234 self.set_phone_number(0, "(000) 000-0000", 0)231 last_name="Holmes",
235 # Work232 phones=my_phones)
236 self.set_phone_number(1, "(000) 000-0001", 1)233 contact_editor.fill_form(test_contact)
237 # Mobile
238 self.set_phone_number(2, "(000) 000-0002", 2)
239 # Work Mobile
240 self.set_phone_number(3, "(000) 000-0003", 3)
241 # Other
242 self.set_phone_number(4, "(000) 000-0004", 4)
243234
244 # Save contact235 # Save contact
245 self.app.main_window.save()236 self.app.main_window.save()
246237
247 # Open contact view238 # Open contact view
248 list_page = self.app.main_window.get_contact_list_page()239 list_page = self.app.main_window.get_contact_list_page()
249 list_page.open_contact(0)240 view_page = list_page.open_contact(0)
250
251 # check if contacts was saved with the correct labels
252 view_page = self.app.main_window.get_contact_view_page()
253 self.assertThat(view_page.visible, Eventually(Equals(True)))241 self.assertThat(view_page.visible, Eventually(Equals(True)))
254242
255 # check if we have five phones"""243 # check if we have five phones"""
256244
=== modified file 'tests/autopilot/address_book_app/tests/test_edit_contact.py'
--- tests/autopilot/address_book_app/tests/test_edit_contact.py 2014-05-30 07:11:42 +0000
+++ tests/autopilot/address_book_app/tests/test_edit_contact.py 2014-06-18 14:13:24 +0000
@@ -37,10 +37,7 @@
37 edit_page = self.edit_contact(0)37 edit_page = self.edit_contact(0)
3838
39 # Add a new phone39 # Add a new phone
40 phoneGroup = edit_page.select_single(40 edit_page.add_field('phones')
41 "ContactDetailGroupWithTypeEditor",
42 objectName="phones")
43 self.create_new_detail(phoneGroup)
4441
45 # fill phone number42 # fill phone number
46 phone_number_1 = self.app.main_window.select_single(43 phone_number_1 = self.app.main_window.select_single(
@@ -67,11 +64,18 @@
67 self.assertThat(phone_label_1.text, Eventually(Equals(self.PHONE_NUMBERS[1])))64 self.assertThat(phone_label_1.text, Eventually(Equals(self.PHONE_NUMBERS[1])))
6865
69 def test_remove_phone(self):66 def test_remove_phone(self):
70 self.add_contact("Fulano", "de Tal", self.PHONE_NUMBERS[1:3])67 contact_editor = self.app.main_window.go_to_add_contact()
71 edit_page = self.edit_contact(0)68 my_phones = []
69 for n in self.PHONE_NUMBERS[1:3]:
70 my_phones.append(data.Phone(type_='Mobile', number=n))
71
72 test_contact = data.Contact(first_name="Fulano",
73 last_name="de Tal",
74 phones=my_phones)
75 contact_editor.fill_form(test_contact)
7276
73 # clear phone 177 # clear phone 1
74 phone_number_1 = edit_page.select_single(78 phone_number_1 = contact_editor.wait_select_single(
75 "TextInputDetail",79 "TextInputDetail",
76 objectName="phoneNumber_1")80 objectName="phoneNumber_1")
77 self.clear_text_on_field(phone_number_1)81 self.clear_text_on_field(phone_number_1)
@@ -79,8 +83,11 @@
79 # Save contact83 # Save contact
80 self.app.main_window.save()84 self.app.main_window.save()
8185
86 # Go to contact view
87 list_page = self.main_window.get_contact_list_page()
88
82 # check if we have onlye one phone89 # check if we have onlye one phone
83 view_page = self.app.main_window.get_contact_view_page()90 view_page = list_page.open_contact(0)
84 phone_group = view_page.select_single(91 phone_group = view_page.select_single(
85 "ContactDetailGroupWithTypeView",92 "ContactDetailGroupWithTypeView",
86 objectName="phones")93 objectName="phones")
@@ -95,11 +102,7 @@
95 def test_add_email(self):102 def test_add_email(self):
96 self.add_contact("Fulano", "")103 self.add_contact("Fulano", "")
97 edit_page = self.edit_contact(0)104 edit_page = self.edit_contact(0)
98105 edit_page.add_field("emails")
99 emailGroup = edit_page.select_single(
100 "ContactDetailGroupWithTypeEditor",
101 objectName="emails")
102 self.create_new_detail(emailGroup)
103106
104 # fill email address107 # fill email address
105 email_field = edit_page.select_single(108 email_field = edit_page.select_single(
@@ -174,7 +177,17 @@
174 self.assertThat(view_page.title, Eventually(Equals("Fulano de Tal")))177 self.assertThat(view_page.title, Eventually(Equals("Fulano de Tal")))
175178
176 def test_im_type(self):179 def test_im_type(self):
177 self.add_contact("Fulano", "de Tal", im_address=["im@account.com"])180 contact_editor = self.app.main_window.go_to_add_contact()
181 alias = data.SocialAlias(type_="Skype", alias="im@account.com")
182 test_contact = data.Contact(first_name="Fulano",
183 last_name="de Tal",
184 social_aliases=[alias])
185 contact_editor.fill_form(test_contact)
186
187 # Save contact
188 self.app.main_window.save()
189
190 # edit again
178 edit_page = self.edit_contact(0)191 edit_page = self.edit_contact(0)
179192
180 # Change Im type193 # Change Im type

Subscribers

People subscribed via source and target branches