diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-02 09:49:21 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-02 09:49:21 +0100 |
commit | cdd6f78d9330b5dac516ec27edf4c691217119c0 (patch) | |
tree | 6ce221ba805cc5e309767df0083d8f1723bf4389 /tests/auto | |
parent | d204d96355f5facf8d01ff75bf035ab0734a4398 (diff) | |
parent | a3ba1a532f92a933141d4671ce644053a0cb6fea (diff) | |
download | qtquickcontrols-cdd6f78d9330b5dac516ec27edf4c691217119c0.tar.gz |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
tests/auto/controls/data/tst_menubar.qml
Change-Id: I23c3299e6f6cef14093aa4f79b3e7d769c063064
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_menubar.qml | 24 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_slider.qml | 4 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_spinbox.qml | 3 | ||||
-rw-r--r-- | tests/auto/controls/data/tst_treeview.qml | 27 | ||||
-rw-r--r-- | tests/auto/extras/data/tst_piemenu.qml | 11 |
5 files changed, 65 insertions, 4 deletions
diff --git a/tests/auto/controls/data/tst_menubar.qml b/tests/auto/controls/data/tst_menubar.qml index e268b059..329b43e7 100644 --- a/tests/auto/controls/data/tst_menubar.qml +++ b/tests/auto/controls/data/tst_menubar.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.2 -import QtQuick.Controls 1.3 +import QtQuick.Controls 1.4 import QtTest 1.0 TestCase { @@ -58,7 +58,7 @@ TestCase { Menu { title: "&File"; objectName: "fileMenu" Menu { - title: "&Recent Files"; objectName: "actionSubMenu" + title: "&Recent Files"; objectName: "recentFilesSubMenu" MenuItem { text: "RecentFile1"; objectName: "recentFile1MenuItem" } MenuItem { text: "RecentFile2"; objectName: "recentFile2MenuItem" } } @@ -126,4 +126,24 @@ TestCase { keyPress(Qt.Key_Escape) compare(fileMenu.__popupVisible, false) } + + function test_qtBug47295() + { + if (Qt.platform.os === "osx") + skip("MenuBar cannot be reliably tested on OS X") + + var window = windowComponent.createObject() + waitForRendering(window.contentItem) + var fileMenu = findChild(window, "fileMenu") + verify(fileMenu) + tryCompare(fileMenu, "__popupVisible", false) + mousePress(fileMenu.__visualItem) + wait(200); + tryCompare(fileMenu, "__popupVisible", true) + mouseMove(fileMenu.__contentItem, 0, -10) + wait(200) + mouseRelease(fileMenu.__contentItem, 0, -10) + tryCompare(fileMenu, "__popupVisible", true) + wait(200) + } } diff --git a/tests/auto/controls/data/tst_slider.qml b/tests/auto/controls/data/tst_slider.qml index 1589f2ab..83ba299e 100644 --- a/tests/auto/controls/data/tst_slider.qml +++ b/tests/auto/controls/data/tst_slider.qml @@ -280,6 +280,8 @@ Item { } function test_sliderOffset() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var control = Qt.createQmlObject('import QtQuick.Controls 1.2; Slider {x: 20; y: 20; width: 100; height: 50}', container, '') // Don't move slider value if mouse is inside handle regtion mouseMove(control, control.width/2, control.height/2) @@ -309,6 +311,8 @@ Item { } function test_dragThreshold() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var control = Qt.createQmlObject('import QtQuick.Controls 1.2; Slider {x: 20; y: 20; width: 100; height: 50}', container, '') var pt = { x: control.width/2, y: control.height/2 } diff --git a/tests/auto/controls/data/tst_spinbox.qml b/tests/auto/controls/data/tst_spinbox.qml index a5da7b91..610aa452 100644 --- a/tests/auto/controls/data/tst_spinbox.qml +++ b/tests/auto/controls/data/tst_spinbox.qml @@ -39,6 +39,7 @@ ****************************************************************************/ import QtQuick 2.2 +import QtQuick.Controls.Private 1.0 import QtTest 1.0 Item { @@ -367,6 +368,8 @@ Item { } function test_get_active_focus_when_up_or_down_was_pressed(){ + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var test_control = 'import QtQuick 2.2; \ import QtQuick.Controls 1.2; \ Column { \ diff --git a/tests/auto/controls/data/tst_treeview.qml b/tests/auto/controls/data/tst_treeview.qml index 33e64e65..d144b9c1 100644 --- a/tests/auto/controls/data/tst_treeview.qml +++ b/tests/auto/controls/data/tst_treeview.qml @@ -41,6 +41,7 @@ import QtQuick 2.4 import QtTest 1.0 import QtQuick.Controls 1.4 +import QtQuick.Controls.Private 1.0 import QtQuickControlsTests 1.0 Item { @@ -103,6 +104,8 @@ Item { function test_clicked_signals() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -152,6 +155,8 @@ Item { function test_headerHidden() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -175,6 +180,8 @@ Item { function test_expand_collapse() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -239,6 +246,8 @@ Item { function test_pressAndHold() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -263,6 +272,8 @@ Item { function test_keys_navigation() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_2.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -317,6 +328,8 @@ Item { function test_selection_singleSelection() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -442,6 +455,8 @@ Item { function test_selection_multiSelection() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -551,6 +566,8 @@ Item { function test_selection_extendedSelection() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -637,6 +654,8 @@ Item { function test_selection_contiguousSelection() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -732,6 +751,8 @@ Item { } function test_indexAt() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); @@ -747,8 +768,8 @@ Item { if (treeIndex.row !== modelIndex.row || treeIndex.column !== modelIndex.column || treeIndex.internalId !== modelIndex.internalId) { - console.log("Test about to fail: row = " + row + ", __listView.count =" + __listView.count) - console.log(" . . . . . . . . . x =" + x + ", getColumn(0).width =" + getColumn(0).width) + console.log("Test about to fail: row = " + row + ", __listView.count =" + tree.__listView.count) + console.log(" . . . . . . . . . x =" + x + ", getColumn(0).width =" + tree.getColumn(0).width) } compare(treeIndex.row, modelIndex.row) compare(treeIndex.column, modelIndex.column) @@ -800,6 +821,8 @@ Item { function test_QTBUG_46891_selection_collapse_parent() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var component = Qt.createComponent("treeview/treeview_1.qml") compare(component.status, Component.Ready) var tree = component.createObject(container); diff --git a/tests/auto/extras/data/tst_piemenu.qml b/tests/auto/extras/data/tst_piemenu.qml index 12dbe223..d709f513 100644 --- a/tests/auto/extras/data/tst_piemenu.qml +++ b/tests/auto/extras/data/tst_piemenu.qml @@ -41,6 +41,7 @@ import QtTest 1.0 import QtQuick 2.1 import QtQuick.Controls 1.1 +import QtQuick.Controls.Private 1.0 import QtQuick.Extras 1.4 import QtQuick.Extras.Private 1.0 import QtQuick.Extras.Private.CppUtils 1.0 @@ -354,6 +355,8 @@ Item { } function test_selectionAngle(data) { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml"); tryCompare(pieMenuComponent, "status", Component.Ready); root = pieMenuComponent.createObject(container); @@ -505,6 +508,8 @@ Item { } function test_hideItem(data) { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml"); tryCompare(pieMenuComponent, "status", Component.Ready); root = pieMenuComponent.createObject(container); @@ -605,6 +610,8 @@ Item { } function test_selectionItemOnMouseMove_QTRD3024() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); // Check when an item is hovered by the mouse, it gets made current // as expected and the current item is cleared when the mouse moves outside the menu var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml"); @@ -676,6 +683,8 @@ Item { function test_QTRD3027() { // Check that an item's selection is cleared when the mouse moves outside // its boundaries without changing the selectionAngle + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var pieMenuComponent = Qt.createComponent("PieMenu3Items.qml"); tryCompare(pieMenuComponent, "status", Component.Ready); root = pieMenuComponent.createObject(container); @@ -702,6 +711,8 @@ Item { } function test_rotatedBoundingItem() { + if (Settings.hasTouchScreen) + skip("Fails with touch screens"); var pieMenuComponent = Qt.createComponent("PieMenuRotatedBoundingItem.qml"); tryCompare(pieMenuComponent, "status", Component.Ready); root = pieMenuComponent.createObject(container); |