aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/controls/data/tst_dialogbuttonbox.qml35
1 files changed, 11 insertions, 24 deletions
diff --git a/tests/auto/controls/data/tst_dialogbuttonbox.qml b/tests/auto/controls/data/tst_dialogbuttonbox.qml
index 0e2566e9..a651713a 100644
--- a/tests/auto/controls/data/tst_dialogbuttonbox.qml
+++ b/tests/auto/controls/data/tst_dialogbuttonbox.qml
@@ -366,27 +366,6 @@ TestCase {
}
}
- // QTBUG-72886
- function test_oneCustomButtonChangeText() {
- var control = createTemporaryObject(customButtonBox, testCase, {})
- verify(control)
-
- var listView = control.contentItem
- waitForRendering(listView)
-
- var button = control.okButton
- verify(button)
- button.text = "some longer text";
-
- // The button should never go outside of the box.
- tryVerify(function() { return button.mapToItem(control, 0, 0).x >= 0 },
- 1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
- ", but it's " + button.mapToItem(control, 0, 0).x)
- tryVerify(function() { return button.mapToItem(control, 0, 0).x + button.width <= control.width },
- 1000, "Expected right edge of button to be within right edge of DialogButtonBox (i.e. less than or equal to " +
- control.width + "), but it's " + (button.mapToItem(control, 0, 0).x + button.width))
- }
-
Component {
id: customButtonBoxTwoButtons
@@ -410,16 +389,25 @@ TestCase {
}
}
+ function test_changeCustomButtonText_data() {
+ return [
+ { tag: "oneButton", component: customButtonBox },
+ { tag: "twoButtons", component: customButtonBoxTwoButtons },
+ ]
+ }
+
// QTBUG-72886
- function test_twoCustomButtonsChangeText() {
- var control = createTemporaryObject(customButtonBoxTwoButtons, testCase, {})
+ function test_changeCustomButtonText(data) {
+ var control = createTemporaryObject(customButtonBox, testCase, {})
verify(control)
var listView = control.contentItem
waitForRendering(listView)
var button = control.okButton
+ verify(button)
button.text = "some longer text";
+
// The button should never go outside of the box.
tryVerify(function() { return button.mapToItem(control, 0, 0).x >= 0 },
1000, "Expected left edge of button to be within left edge of DialogButtonBox (i.e. greater than or equal to 0)" +
@@ -429,7 +417,6 @@ TestCase {
control.width + "), but it's " + (button.mapToItem(control, 0, 0).x + button.width))
}
-
Component {
id: noRolesDialog