diff options
author | Joerg Bornemann <joerg.bornemann@theqtcompany.com> | 2016-02-29 11:07:06 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2016-03-01 13:12:55 +0000 |
commit | d6c32fa215080ad8094c699f40e1823d3ca2a14c (patch) | |
tree | 56e72db3f7310d2e7db1a4d786f5daa8b2eed6af /tests | |
parent | 193a2aaabfb45bedee5e9d6e9771d539af56c7d0 (diff) |
Enable qmltests in CI
Blacklist failing tests.
Stabilize some tests.
Change-Id: I9fba81fb70f5b358108ef6935e363297e2658f79
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/quick/qmltests/BLACKLIST | 8 | ||||
-rw-r--r-- | tests/auto/quick/qmltests/data/tst_download.qml | 2 | ||||
-rw-r--r-- | tests/auto/quick/qmltests/data/tst_geopermission.qml | 19 | ||||
-rw-r--r-- | tests/auto/quick/qmltests/qmltests.pro | 1 |
4 files changed, 22 insertions, 8 deletions
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST new file mode 100644 index 000000000..035e49a83 --- /dev/null +++ b/tests/auto/quick/qmltests/BLACKLIST @@ -0,0 +1,8 @@ +[DesktopWebEngineViewLinkHovered::test_linkHovered] +* + +[WebViewGeopermission::test_deniedGeolocationByUser] +osx + +[WebViewGeopermission::test_geoPermissionRequest] +osx diff --git a/tests/auto/quick/qmltests/data/tst_download.qml b/tests/auto/quick/qmltests/data/tst_download.qml index 415318ed7..70a31d755 100644 --- a/tests/auto/quick/qmltests/data/tst_download.qml +++ b/tests/auto/quick/qmltests/data/tst_download.qml @@ -127,7 +127,7 @@ TestWebEngineView { compare(downloadState[1], WebEngineDownloadItem.DownloadInProgress) downloadFinishedSpy.wait() compare(totalBytes, receivedBytes) - compare(downloadState[2], WebEngineDownloadItem.DownloadCompleted) + tryCompare(downloadState, 2, WebEngineDownloadItem.DownloadCompleted) } function test_downloadCancelled() { diff --git a/tests/auto/quick/qmltests/data/tst_geopermission.qml b/tests/auto/quick/qmltests/data/tst_geopermission.qml index acb561825..e18b40f1d 100644 --- a/tests/auto/quick/qmltests/data/tst_geopermission.qml +++ b/tests/auto/quick/qmltests/data/tst_geopermission.qml @@ -50,7 +50,7 @@ TestWebEngineView { property bool deniedGeolocation: false property bool geoPermissionRequested: false - property string consoleErrorMessage: "" + signal consoleErrorMessage(string message) SignalSpy { id: featurePermissionSpy @@ -58,6 +58,12 @@ TestWebEngineView { signalName: "featurePermissionRequested" } + SignalSpy { + id: consoleErrorMessageSpy + target: webEngineView + signalName: "consoleErrorMessage" + } + onFeaturePermissionRequested: { if (feature === WebEngineView.Geolocation) { geoPermissionRequested = true @@ -72,7 +78,7 @@ TestWebEngineView { onJavaScriptConsoleMessage: { if (level === WebEngineView.ErrorMessageLevel) - consoleErrorMessage = message + consoleErrorMessage(message) } TestCase { @@ -81,8 +87,8 @@ TestWebEngineView { function init() { deniedGeolocation = false - consoleErrorMessage = "" featurePermissionSpy.clear() + consoleErrorMessageSpy.clear() } function test_geoPermissionRequest() { @@ -91,15 +97,16 @@ TestWebEngineView { featurePermissionSpy.wait() verify(geoPermissionRequested) compare(featurePermissionSpy.count, 1) - if (consoleErrorMessage) // Print the error message if it fails to get user's location - fail(consoleErrorMessage) + if (consoleErrorMessageSpy.count) // Print the error message if it fails to get user's location + fail(consoleErrorMessageSpy.signalArguments[0][0]) } function test_deniedGeolocationByUser() { deniedGeolocation = true webEngineView.url = Qt.resolvedUrl("geolocation.html") featurePermissionSpy.wait() - compare(consoleErrorMessage, "User denied Geolocation") + consoleErrorMessageSpy.wait() + compare(consoleErrorMessageSpy.signalArguments[0][0], "User denied Geolocation") } } } diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro index 281676b6a..57649384d 100644 --- a/tests/auto/quick/qmltests/qmltests.pro +++ b/tests/auto/quick/qmltests/qmltests.pro @@ -1,5 +1,4 @@ include(../tests.pri) -CONFIG -= testcase # remove, once this passes in the CI QT += qmltest |