Merge lp:~jonas-drange/ubuntu-system-settings/add-usc-test-dep into lp:ubuntu-system-settings

Proposed by Jonas G. Drange
Status: Superseded
Proposed branch: lp:~jonas-drange/ubuntu-system-settings/add-usc-test-dep
Merge into: lp:ubuntu-system-settings
Diff against target: 498 lines (+102/-151)
9 files modified
debian/control (+4/-3)
plugins/wifi/CMakeLists.txt (+0/-1)
plugins/wifi/CertDialog.qml (+37/-10)
plugins/wifi/CertPicker.qml (+0/-58)
plugins/wifi/OtherNetwork.qml (+34/-12)
plugins/wifi/certhandler.cpp (+24/-22)
plugins/wifi/certhandler.h (+3/-4)
tests/autopilot/ubuntu_system_settings/__init__.py (+0/-32)
tests/autopilot/ubuntu_system_settings/tests/test_vpn.py (+0/-9)
To merge this branch: bzr merge lp:~jonas-drange/ubuntu-system-settings/add-usc-test-dep
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
Ubuntu Touch System Settings Pending
Review via email: mp+308771@code.launchpad.net

This proposal has been superseded by a proposal from 2016-10-19.

Commit message

adds test dep on usc

To post a comment you must log in.
1660. By Jonas G. Drange

add usc test dep

1661. By Jonas G. Drange

be specific of version in usc test dep

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:1729
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/215/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/1866/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1867
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1707/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1707
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1707/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1707/console

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-system-settings-ci/215/rebuild

review: Needs Fixing (continuous-integration)
1662. By Jonas G. Drange

merge prereq

1663. By Jonas G. Drange

bump test dep

Unmerged revisions

1663. By Jonas G. Drange

bump test dep

1662. By Jonas G. Drange

merge prereq

1661. By Jonas G. Drange

be specific of version in usc test dep

1660. By Jonas G. Drange

add usc test dep

1659. By Jonas G. Drange

apply filepicker patch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/control'
--- debian/control 2016-09-30 13:48:06 +0000
+++ debian/control 2016-10-19 07:36:02 +0000
@@ -45,7 +45,8 @@
45 dpkg-dev,45 dpkg-dev,
46 qml-module-qttest,46 qml-module-qttest,
47 qml-module-qtquick2,47 qml-module-qtquick2,
48 qtdeclarative5-ubuntu-ui-toolkit-plugin | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles,48 qml-module-ubuntu-components | qml-module-ubuntu-components-gles,
49 qtdeclarative5-ubuntu-settings-components,
49 libubuntuoneauth-2.0-dev,50 libubuntuoneauth-2.0-dev,
50 libqtdbusmock1-dev (>= 0.2+14.04.20140724),51 libqtdbusmock1-dev (>= 0.2+14.04.20140724),
51 libqtdbustest1-dev,52 libqtdbustest1-dev,
@@ -95,8 +96,8 @@
95 qml-module-ofono (>=0.90~),96 qml-module-ofono (>=0.90~),
96 qml-module-qtsysteminfo,97 qml-module-qtsysteminfo,
97 qtdeclarative5-ubuntu-content1,98 qtdeclarative5-ubuntu-content1,
98 qtdeclarative5-ubuntu-settings-components (>= 0.8),99 qtdeclarative5-ubuntu-settings-components (>= 0.9),
99 qtdeclarative5-ubuntu-ui-toolkit-plugin (>= 1.3.1584) | qtdeclarative5-ubuntu-ui-toolkit-plugin-gles (>= 1.3.1584),100 qml-module-ubuntu-components (>= 1.3.1584) | qml-module-ubuntu-components-gles (>= 1.3.1584),
100 suru-icon-theme (>= 14.04+15.04.20150813~),101 suru-icon-theme (>= 14.04+15.04.20150813~),
101 whoopsie-preferences (>= 0.9),102 whoopsie-preferences (>= 0.9),
102 libsystemsettings1 (= ${binary:Version}),103 libsystemsettings1 (= ${binary:Version}),
103104
=== modified file 'plugins/wifi/CMakeLists.txt'
--- plugins/wifi/CMakeLists.txt 2016-08-16 23:50:33 +0000
+++ plugins/wifi/CMakeLists.txt 2016-10-19 07:36:02 +0000
@@ -1,7 +1,6 @@
1set(QML_SOURCES1set(QML_SOURCES
2AccessPoint.qml2AccessPoint.qml
3BaseMenuItem.qml3BaseMenuItem.qml
4CertPicker.qml
5CertDialog.qml4CertDialog.qml
6Common.qml5Common.qml
7DivMenuItem.qml6DivMenuItem.qml
87
=== modified file 'plugins/wifi/CertDialog.qml'
--- plugins/wifi/CertDialog.qml 2015-08-10 13:31:45 +0000
+++ plugins/wifi/CertDialog.qml 2016-10-19 07:36:02 +0000
@@ -27,6 +27,30 @@
27 }27 }
28 }28 }
2929
30 Component {
31 id: failedToImportComponent
32 Dialog {
33 id: failedToImportDialog
34 title: {
35 if (certType === 0) { // certificate
36 return i18n.tr("Could not save certificate.")
37 } else if (certType === 1) { // privatekey
38 return i18n.tr("Could not save key.")
39 } else if (certType === 2) { // pacFile
40 return i18n.tr("Could not save pack file.")
41 }
42 }
43
44 Button {
45 text: i18n.tr("OK")
46 onClicked: {
47 PopupUtils.close(failedToImportDialog);
48 PopupUtils.close(certDialog);
49 }
50 }
51 }
52 }
53
30 FileHandler {54 FileHandler {
31 id: fileHandler55 id: fileHandler
32 }56 }
@@ -64,7 +88,6 @@
64 Layout.fillWidth: true88 Layout.fillWidth: true
65 text: i18n.tr("Cancel")89 text: i18n.tr("Cancel")
66 onClicked: {90 onClicked: {
67 fileHandler.removeFile(certDialog.fileName);
68 PopupUtils.close(certDialog);91 PopupUtils.close(certDialog);
69 }92 }
70 }93 }
@@ -74,19 +97,23 @@
74 text: i18n.tr("Save")97 text: i18n.tr("Save")
75 Layout.fillWidth: true98 Layout.fillWidth: true
76 enabled: (certDialog.certContent.text !== "")99 enabled: (certDialog.certContent.text !== "")
77 onClicked: { if (certType === 0) { // certificate100 onClicked: {
78 fileHandler.moveCertFile(certDialog.fileName);101 var ret;
102 if (certType === 0) { // certificate
103 ret = fileHandler.copyCertFile(certDialog.fileName);
79 } else if (certType === 1) { // privatekey104 } else if (certType === 1) { // privatekey
80 fileHandler.moveKeyFile(certDialog.fileName);105 ret = fileHandler.copyKeyFile(certDialog.fileName);
81 } else if (certType === 2) { // pacFile106 } else if (certType === 2) { // pacFile
82 fileHandler.movePacFile(certDialog.fileName);107 ret = fileHandler.copyPacFile(certDialog.fileName);
83 }108 }
84109
85 /* Just to be sure source file will be deleted if move was110 // If the cert/key/pac doesn't compute, warn.
86 not successfull */111 if (!ret) {
87 fileHandler.removeFile(certDialog.fileName);112 PopupUtils.open(failedToImportComponent);
88 certDialog.updateSignal(true);113 } else {
89 PopupUtils.close(certDialog);114 certDialog.updateSignal(true);
115 PopupUtils.close(certDialog);
116 }
90 }117 }
91 }118 }
92 }119 }
93120
=== removed file 'plugins/wifi/CertPicker.qml'
--- plugins/wifi/CertPicker.qml 2016-03-16 16:26:18 +0000
+++ plugins/wifi/CertPicker.qml 1970-01-01 00:00:00 +0000
@@ -1,58 +0,0 @@
1import QtQuick 2.4
2import QtQuick.Layouts 1.1
3import Ubuntu.Components 1.3
4import Ubuntu.Components.Popups 1.3
5import Ubuntu.Content 1.3
6
7PopupBase {
8 id: picker
9
10 signal fileImportSignal (var file)
11 property var activeTransfer
12
13 Rectangle {
14 anchors.fill: parent
15
16 ContentTransferHint {
17 id: transferHint
18 anchors.fill: parent
19 activeTransfer: picker.activeTransfer
20 }
21
22 ContentStore {
23 id: appStore
24 scope: ContentScope.App
25 }
26
27 ContentPeerPicker {
28 id: peerPicker
29 anchors.fill: parent
30 visible: true
31 contentType: ContentType.Documents
32 handler: ContentHandler.Source
33 onPeerSelected: {
34 peer.selectionType = ContentTransfer.Single;
35 picker.activeTransfer = peer.request(appStore);
36 }
37 onCancelPressed: PopupUtils.close(picker)
38 }
39 }
40
41 Connections {
42 target: picker.activeTransfer ? picker.activeTransfer : null
43 onStateChanged: {
44 if (picker.activeTransfer.state === ContentTransfer.Charged) {
45 if (picker.activeTransfer.items.length > 0) {
46 var fileUrl = picker.activeTransfer.items[0].url;
47 picker.fileImportSignal(
48 fileUrl.toString().replace("file://", "")
49 );
50 PopupUtils.close(picker);
51 }
52 } else if (picker.activeTransfer.state === ContentTransfer.Aborted){
53 picker.fileImportSignal(false);
54 PopupUtils.close(picker);
55 }
56 }
57 }
58}
590
=== modified file 'plugins/wifi/OtherNetwork.qml'
--- plugins/wifi/OtherNetwork.qml 2016-08-17 11:26:03 +0000
+++ plugins/wifi/OtherNetwork.qml 2016-10-19 07:36:02 +0000
@@ -20,18 +20,25 @@
20import Ubuntu.Components 1.320import Ubuntu.Components 1.3
21import Ubuntu.Components.ListItems 1.3 as ListItems21import Ubuntu.Components.ListItems 1.3 as ListItems
22import Ubuntu.Components.Popups 1.322import Ubuntu.Components.Popups 1.3
23import Ubuntu.Settings.Components 0.1
23import Ubuntu.SystemSettings.Wifi 1.024import Ubuntu.SystemSettings.Wifi 1.0
2425
25Component {26Component {
2627
27 Dialog {28 Dialog {
2829
30 Component {
31 id: filePickerComponent
32 FilePicker {}
33 }
34
29 id: otherNetworkDialog35 id: otherNetworkDialog
30 objectName: "otherNetworkDialog"36 objectName: "otherNetworkDialog"
31 anchorToKeyboard: true37 anchorToKeyboard: true
3238
33 property string ssid39 property string ssid
34 property string bssid40 property string bssid
41 property string keyMgmt
3542
36 function settingsValid () {43 function settingsValid () {
37 if (networkname.length === 0) {44 if (networkname.length === 0) {
@@ -59,11 +66,10 @@
59 var pickerDialog;66 var pickerDialog;
60 var certDialog;67 var certDialog;
6168
62 pickerDialog = PopupUtils.open(69 pickerDialog = PopupUtils.open(filePickerComponent);
63 Qt.resolvedUrl("./CertPicker.qml")70 pickerDialog.accept.connect(function (file) {
64 );71 PopupUtils.close(pickerDialog);
65 pickerDialog.fileImportSignal.connect(function (file) {72 if (file) {
66 if (!file === false) {
67 certDialogLoader.source = Qt.resolvedUrl(73 certDialogLoader.source = Qt.resolvedUrl(
68 "./CertDialog.qml"74 "./CertDialog.qml"
69 );75 );
@@ -84,12 +90,13 @@
84 });90 });
85 }91 }
86 });92 });
93 pickerDialog.reject.connect(function () {
94 PopupUtils.close(pickerDialog);
95 });
87 }96 }
8897
89 title: ssid ?98 title: ssid ?
90 /* TODO(jgdx): Hack to avoid breaking string freeze. This will be99 i18n.tr("Connect to %1").arg(ssid) :
91 changed to i18n.tr("Connect to %1").arg(ssid) per spec. */
92 i18n.tr("Connect to Wi‑Fi") + " " + ssid :
93 i18n.tr("Connect to Hidden Network")100 i18n.tr("Connect to Hidden Network")
94 text: feedback.enabled ? feedback.text : "";101 text: feedback.enabled ? feedback.text : "";
95102
@@ -322,7 +329,22 @@
322 i18n.tr("Dynamic WEP (802.1x)"), // index: 4329 i18n.tr("Dynamic WEP (802.1x)"), // index: 4
323 i18n.tr("LEAP"), // index: 5330 i18n.tr("LEAP"), // index: 5
324 ]331 ]
325 selectedIndex: 1332 selectedIndex: {
333 switch(keyMgmt) {
334 case 'none': // WEP
335 return 0;
336 case 'wpa-eap': // WPA-Enterprise
337 return 2;
338 case 'wep': // WEP
339 return 3;
340 case 'ieee8021x': // Dynamic WEP
341 return 4;
342 case 'wpa-none': // Ad-Hoc WPA-PSK
343 case 'wpa-psk': // infrastructure WPA-PSK
344 default: // Default is WPA
345 return 1;
346 }
347 }
326 }348 }
327349
328 Label {350 Label {
@@ -357,7 +379,6 @@
357 visible: securityList.selectedIndex === 2 ||379 visible: securityList.selectedIndex === 2 ||
358 securityList.selectedIndex === 4380 securityList.selectedIndex === 4
359 }381 }
360
361 Label {382 Label {
362 id: p2authListLabel383 id: p2authListLabel
363 text : i18n.tr("Inner authentication")384 text : i18n.tr("Inner authentication")
@@ -791,7 +812,7 @@
791 font.bold: false812 font.bold: false
792 color: Theme.palette.normal.baseText813 color: Theme.palette.normal.baseText
793 elide: Text.ElideRight814 elide: Text.ElideRight
794 visible: securityList.selectedIndex !== 0815 visible: password.visible
795 }816 }
796817
797 TextField {818 TextField {
@@ -799,6 +820,7 @@
799 objectName: "password"820 objectName: "password"
800 width: parent.width821 width: parent.width
801 visible: securityList.selectedIndex !== 0822 visible: securityList.selectedIndex !== 0
823
802 echoMode: passwordVisibleSwitch.checked ?824 echoMode: passwordVisibleSwitch.checked ?
803 TextInput.Normal : TextInput.Password825 TextInput.Normal : TextInput.Password
804 inputMethodHints: Qt.ImhNoPredictiveText826 inputMethodHints: Qt.ImhNoPredictiveText
@@ -809,7 +831,7 @@
809 id: passwordVisiblityRow831 id: passwordVisiblityRow
810 layoutDirection: Qt.LeftToRight832 layoutDirection: Qt.LeftToRight
811 spacing: units.gu(2)833 spacing: units.gu(2)
812 visible: securityList.selectedIndex !== 0834 visible: password.visible
813835
814 CheckBox {836 CheckBox {
815 id: passwordVisibleSwitch837 id: passwordVisibleSwitch
816838
=== modified file 'plugins/wifi/certhandler.cpp'
--- plugins/wifi/certhandler.cpp 2015-06-15 19:28:23 +0000
+++ plugins/wifi/certhandler.cpp 2016-10-19 07:36:02 +0000
@@ -32,19 +32,19 @@
32 }32 }
33}33}
3434
35QString FileHandler::moveCertFile(QString filename){35QString FileHandler::copyCertFile(QString filename){
36 QDir certPath(CERTS_PATH);36 QDir certPath(CERTS_PATH);
37 if (!certPath.exists(CERTS_PATH)){37 if (!certPath.exists(CERTS_PATH)){
38 certPath.mkpath(CERTS_PATH);38 certPath.mkpath(CERTS_PATH);
39 }39 }
40 QFile file(filename);
41 QByteArray certificate = getCertContent(filename);40 QByteArray certificate = getCertContent(filename);
42 QList<QSslCertificate> SslCertificateList = QSslCertificate::fromData(certificate, QSsl::Pem);41 QList<QSslCertificate> SslCertificateList = QSslCertificate::fromData(certificate, QSsl::Pem);
43 if ( !SslCertificateList.isEmpty() ){42 if ( !SslCertificateList.isEmpty() ){
44 QStringList subject = SslCertificateList[0].subjectInfo(QSslCertificate::CommonName);43 QStringList subject = SslCertificateList[0].subjectInfo(QSslCertificate::CommonName);
45 QString modFileName = CERTS_PATH+subject[0]+".pem";44 QString modFileName = CERTS_PATH+subject[0]+".pem";
46 if(file.rename(modFileName.replace(" ", "_"))){45 modFileName = modFileName.replace(" ", "_");
47 return file.fileName();46 if(QFile::copy(filename, modFileName)){
47 return modFileName;
48 } else {48 } else {
49 return "";49 return "";
50 }50 }
@@ -52,7 +52,7 @@
52 return "";52 return "";
53}53}
5454
55QString FileHandler::moveKeyFile(QString filename){55QString FileHandler::copyKeyFile(QString filename){
56 QDir keyPath(KEYS_PATH);56 QDir keyPath(KEYS_PATH);
57 if (!keyPath.exists(KEYS_PATH)){57 if (!keyPath.exists(KEYS_PATH)){
58 keyPath.mkpath(KEYS_PATH);58 keyPath.mkpath(KEYS_PATH);
@@ -64,8 +64,8 @@
64 if ( !checkKey.isNull() ){64 if ( !checkKey.isNull() ){
65 QFileInfo fileInfo(file);65 QFileInfo fileInfo(file);
66 QString modFileName = KEYS_PATH + fileInfo.fileName().replace(" ", "_");66 QString modFileName = KEYS_PATH + fileInfo.fileName().replace(" ", "_");
67 if(file.rename(modFileName)){67 if(QFile::copy(filename, modFileName)){
68 return file.fileName();68 return modFileName;
69 } else {69 } else {
70 return "" ;70 return "" ;
71 }71 }
@@ -73,7 +73,7 @@
73 return "";73 return "";
74}74}
7575
76QString FileHandler::movePacFile(QString filename){76QString FileHandler::copyPacFile(QString filename){
77 QDir keyPath(PACS_PATH);77 QDir keyPath(PACS_PATH);
78 if (!keyPath.exists(PACS_PATH)){78 if (!keyPath.exists(PACS_PATH)){
79 keyPath.mkpath(PACS_PATH);79 keyPath.mkpath(PACS_PATH);
@@ -81,17 +81,12 @@
81 QFile file(filename);81 QFile file(filename);
82 QFileInfo fileInfo(file);82 QFileInfo fileInfo(file);
83 QString modFileName = PACS_PATH + fileInfo.baseName().replace(" ", "_") + ".pac";83 QString modFileName = PACS_PATH + fileInfo.baseName().replace(" ", "_") + ".pac";
84 if(file.rename(modFileName)){84 if(QFile::copy(filename, modFileName)){
85 return file.fileName();85 return modFileName;
86 }86 }
87 return "" ;87 return "" ;
88}88}
8989
90bool FileHandler::removeFile(QString filename){
91 QFile file(filename);
92 return file.remove();
93}
94
95struct CertificateListModel::Private {90struct CertificateListModel::Private {
96 QStringList data;91 QStringList data;
97};92};
@@ -144,8 +139,9 @@
144}139}
145140
146QVariant CertificateListModel::data(const QModelIndex &index, int role) const {141QVariant CertificateListModel::data(const QModelIndex &index, int role) const {
142 QVariant rv;
147 if(!index.isValid() || index.row() >= ( p->data.size()) ) {143 if(!index.isValid() || index.row() >= ( p->data.size()) ) {
148 return QVariant();144 return rv;
149 } else if (index.row() == 0){145 } else if (index.row() == 0){
150 const QString &row0 = p->data[index.row()];146 const QString &row0 = p->data[index.row()];
151147
@@ -168,13 +164,19 @@
168 const QString &row = CERTS_PATH+p->data[index.row()];164 const QString &row = CERTS_PATH+p->data[index.row()];
169 QList<QSslCertificate> certificate = QSslCertificate::fromPath(row, QSsl::Pem, QRegExp::Wildcard);165 QList<QSslCertificate> certificate = QSslCertificate::fromPath(row, QSsl::Pem, QRegExp::Wildcard);
170166
167 if (certificate.size() == 0) {
168 return rv;
169 }
170
171 switch(role) {171 switch(role) {
172172 case CNRole:
173 case CNRole : return certificate[0].subjectInfo(QSslCertificate::CommonName)[0];173 return certificate[0].subjectInfo(QSslCertificate::CommonName).value(0, "");
174 case ORole : return certificate[0].subjectInfo(QSslCertificate::Organization)[0];174 case ORole:
175 case expDateRole : return certificate[0].expiryDate().toString("dd.MM.yyyy");175 return certificate[0].subjectInfo(QSslCertificate::Organization).value(0, "");
176176 case expDateRole:
177 default : return QVariant();177 return certificate[0].expiryDate().toString("dd.MM.yyyy");
178 default:
179 return rv;
178 }180 }
179}181}
180182
181183
=== modified file 'plugins/wifi/certhandler.h'
--- plugins/wifi/certhandler.h 2015-06-03 19:35:09 +0000
+++ plugins/wifi/certhandler.h 2016-10-19 07:36:02 +0000
@@ -11,10 +11,9 @@
11 Q_OBJECT11 Q_OBJECT
12public:12public:
13 Q_INVOKABLE QByteArray getCertContent(QString filename);13 Q_INVOKABLE QByteArray getCertContent(QString filename);
14 Q_INVOKABLE QString moveCertFile(QString filename);14 Q_INVOKABLE QString copyCertFile(QString filename);
15 Q_INVOKABLE QString moveKeyFile(QString filename);15 Q_INVOKABLE QString copyKeyFile(QString filename);
16 Q_INVOKABLE QString movePacFile(QString filename);16 Q_INVOKABLE QString copyPacFile(QString filename);
17 Q_INVOKABLE bool removeFile(QString filename);
18};17};
1918
2019
2120
=== modified file 'tests/autopilot/ubuntu_system_settings/__init__.py'
--- tests/autopilot/ubuntu_system_settings/__init__.py 2016-08-19 12:49:41 +0000
+++ tests/autopilot/ubuntu_system_settings/__init__.py 2016-10-19 07:36:02 +0000
@@ -1754,38 +1754,6 @@
1754 self._openvpn_port_field.write(port)1754 self._openvpn_port_field.write(port)
17551755
1756 @autopilot.logging.log_action(logger.debug)1756 @autopilot.logging.log_action(logger.debug)
1757 def set_openvpn_ca(self, paths):
1758 self.set_openvpn_file(self._openvpn_ca_field, paths)
1759
1760 @autopilot.logging.log_action(logger.debug)
1761 def set_openvpn_file(self, field, paths):
1762 utils.dismiss_osk()
1763 self.get_root_instance().main_view.scroll_to_and_click(field)
1764
1765 # Wait for expanded animation.
1766 sleep(0.5)
1767
1768 # file = field.wait_select_single(objectName='vpnFileSelectorItem0')
1769 choose = field.wait_select_single(objectName='vpnFileSelectorItem1')
1770 self.pointing_device.click_object(choose)
1771 self.get_root_instance().main_view.scroll_to_and_click(choose)
1772 file_dialog = self.get_root_instance().wait_select_single(
1773 objectName='vpnDialogFile'
1774 )
1775
1776 # Go to root /
1777 root = file_dialog.wait_select_single(objectName='vpnFilePathItem_/')
1778 self.pointing_device.click_object(root)
1779
1780 for path in paths:
1781 list_view = file_dialog.wait_select_single(
1782 'QQuickListView', objectName='vpnFileList'
1783 )
1784 list_view.click_element('vpnFileItem_%s' % path)
1785 accept = file_dialog.wait_select_single(objectName='vpnFileAccept')
1786 self.pointing_device.click_object(accept)
1787
1788 @autopilot.logging.log_action(logger.debug)
1789 def openvpn_okay(self):1757 def openvpn_okay(self):
1790 utils.dismiss_osk()1758 utils.dismiss_osk()
1791 self.get_root_instance().main_view.scroll_to_and_click(1759 self.get_root_instance().main_view.scroll_to_and_click(
17921760
=== modified file 'tests/autopilot/ubuntu_system_settings/tests/test_vpn.py'
--- tests/autopilot/ubuntu_system_settings/tests/test_vpn.py 2016-03-09 14:03:57 +0000
+++ tests/autopilot/ubuntu_system_settings/tests/test_vpn.py 2016-10-19 07:36:02 +0000
@@ -35,10 +35,6 @@
35 page.set_openvpn_server('vpn.ubuntu.com')35 page.set_openvpn_server('vpn.ubuntu.com')
36 page.set_openvpn_custom_port('1000')36 page.set_openvpn_custom_port('1000')
3737
38 page.set_openvpn_ca(
39 # Any file will do.
40 ['etc', 'apt', 'sources.list']
41 )
42 page.openvpn_okay()38 page.openvpn_okay()
4339
44 self.assertThat(40 self.assertThat(
@@ -47,11 +43,6 @@
47 )43 )
4844
49 self.assertThat(45 self.assertThat(
50 lambda: conn_obj.Get(VPN_CONN_OPENVPN_IFACE, 'ca'),
51 Eventually(Equals('/etc/apt/sources.list'))
52 )
53
54 self.assertThat(
55 lambda: conn_obj.Get(VPN_CONN_OPENVPN_IFACE, 'portSet'),46 lambda: conn_obj.Get(VPN_CONN_OPENVPN_IFACE, 'portSet'),
56 Eventually(Equals(True))47 Eventually(Equals(True))
57 )48 )

Subscribers

People subscribed via source and target branches