Skip to content

Commit 9dc281f

Browse files
authored
Fix animation timeouts in tests (#115)
1 parent 42c9506 commit 9dc281f

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

qml/table/tst_MpvqcCommentList.qml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ TestCase {
5454
}
5555

5656
function onEditTimeMenuSeekBack(tableRow: int): point {
57-
const xCoordinate = columnTime + 10;
57+
const xCoordinate = columnTime + 20;
5858
const yCoordinate = rowHeight * tableRow;
5959
return Qt.point(xCoordinate, yCoordinate);
6060
}
6161

6262
function onEditTimeMenuSeekForward(tableRow: int): point {
63-
const xCoordinate = columnTime + 10 + 100;
63+
const xCoordinate = columnTime + 110;
6464
const yCoordinate = rowHeight * tableRow;
6565
return Qt.point(xCoordinate, yCoordinate);
6666
}
@@ -76,6 +76,7 @@ TestCase {
7676

7777
readonly property int timeoutShort: 100
7878
readonly property int timeoutLong: 300
79+
readonly property int timeoutLongCI: 750
7980

8081
width: 600
8182
height: 400
@@ -401,7 +402,7 @@ TestCase {
401402
waitForRendering(control, timeoutShort);
402403

403404
mouseClick(control, _clickHelper.columnTime, _clickHelper.row1Center);
404-
wait(timeoutShort);
405+
wait(timeoutLongCI);
405406

406407
const btn = _clickHelper.onEditTimeMenuSeekBack(1);
407408
mouseClick(control, btn.x, btn.y);
@@ -417,7 +418,7 @@ TestCase {
417418
waitForRendering(control, timeoutShort);
418419

419420
mouseClick(control, _clickHelper.columnTime, _clickHelper.row1Center);
420-
wait(timeoutShort);
421+
wait(timeoutLongCI);
421422

422423
const btn = _clickHelper.onEditTimeMenuSeekForward(1);
423424
mouseClick(control, btn.x, btn.y);
@@ -433,14 +434,14 @@ TestCase {
433434
waitForRendering(control, timeoutShort);
434435

435436
mouseClick(control, _clickHelper.columnTime, _clickHelper.row1Center);
436-
wait(timeoutShort);
437+
wait(timeoutLongCI);
437438

438439
const btn = _clickHelper.onEditTimeMenuSeekBack(1);
439440
mouseClick(control, btn.x, btn.y);
440441
tryVerify(() => control.calledJumpToTimeArgs[control.calledJumpToTimeArgs.length - 1] === 0);
441442

442443
keyPress(Qt.Key_Escape);
443-
wait(timeoutShort);
444+
wait(timeoutLongCI);
444445

445446
tryVerify(() => control.calledJumpToTimeArgs[control.calledJumpToTimeArgs.length - 1] === 1);
446447
verify(!control.model.calledUpateTime);
@@ -453,16 +454,16 @@ TestCase {
453454

454455
// test if editing aborted via escape
455456
mouseClick(control, _clickHelper.columnCommentType, _clickHelper.row1Center);
456-
wait(timeoutShort);
457+
wait(timeoutLongCI);
457458

458459
keyPress(Qt.Key_Escape);
459-
wait(timeoutShort);
460+
wait(timeoutLongCI);
460461

461462
verify(!control.model.calledUpateCommentType);
462463

463464
// test if editing has been successful
464465
mouseClick(control, _clickHelper.columnCommentType, _clickHelper.row1Center);
465-
wait(timeoutShort);
466+
wait(timeoutLongCI);
466467

467468
const btn = _clickHelper.onEditCommentTypeMenu(3, 1);
468469
mouseClick(control, btn.x, btn.y);
@@ -477,27 +478,27 @@ TestCase {
477478

478479
// test if text has not changed
479480
mouseClick(control, _clickHelper.columnComment, _clickHelper.row1Center);
480-
wait(timeoutShort);
481+
wait(timeoutLongCI);
481482

482483
keyPress(Qt.Key_Return);
483-
wait(timeoutShort);
484+
wait(timeoutLongCI);
484485

485486
verify(!control.model.calledUpateComment);
486487

487488
// test if editing aborted via escape
488489
mouseClick(control, _clickHelper.columnComment, _clickHelper.row1Center);
489-
wait(timeoutShort);
490+
wait(timeoutLongCI);
490491

491492
keyPress("h");
492493
keyPress("i");
493494
keyPress(Qt.Key_Escape);
494-
wait(timeoutShort);
495+
wait(timeoutLongCI);
495496

496497
verify(!control.model.calledUpateComment);
497498

498499
// test if editing has been successful
499500
mouseClick(control, _clickHelper.columnComment, _clickHelper.row1Center);
500-
wait(timeoutShort);
501+
wait(timeoutLongCI);
501502

502503
keyPress("h");
503504
keyPress("i");

0 commit comments

Comments
 (0)