summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtesthelpers_p.h
Commit message (Collapse)AuthorAgeFilesLines
* ensurePositionTopLeft - always return true on AndroidFrédéric Lefebvre2025-05-141-0/+3
| | | | | | | | | | Due to synchronous position handling, it is not necessary to wait for event based geometry updates. Always return true on Android. Change-Id: Iad1da66e38b2ec1193c5569b4d1764c7202ea319 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* Add QTestPrivate::ensurePositionTopLeft() for reliable positioningFrédéric Lefebvre2025-03-261-0/+19
| | | | | | | | | | | | | | | | Implement ensurePositionTopLeft() to set a window's position to the available top-left corner and verify that it is correctly positioned. Incorrect updates to window.position and window.framePosition have been identified as one of the main sources of flakiness on Opensuse. This test function addresses this issue and improves test reliablity. Task-number: QTQAINFRA-7050 Change-Id: I946f74c7d2c1db9cfe4fec7db272e12876b3ed43 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
* QTestLib: Add helper function to check for keychain access issuesTimur Pocheptsov2025-01-241-0/+33
| | | | | | | | | | | | To be used in network-related tests where we potentially are using private/public keys and (on macOS) end-up with keychain access blocking a test with dialogs requesting a permission to access the keychain. Task-number: QTBUG-132645 Pick-to: 6.9 6.8 Change-Id: Ide74633bf88b0453d5d8f8de56282c8cf8207380 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Introduce QTestPrivate::androidCompatibleShow() helper functionIvan Solovev2022-03-291-0/+13
| | | | | | | | | | | | | | This function should be used in QWidget-related test cases instead of QWidget::show() when you need to move or resize the widget and then compare its position or geometry with the expected value. The reason for introducing it is that on Android QWidget::show() is showing the widget maximized by default, so its position and size can't be changed. Task-number: QTBUG-87668 Pick-to: 6.3 6.2 Change-Id: I8ec5c07b73968b98d924a41e5d41ddb4d7be1ced Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Make sure all qtbase private headers include at least one otherThiago Macieira2022-02-241-0/+1
| | | | | | | | | | See script in qtbase/util/includeprivate for the rules. Since these files are being touched anyway, I also ran the updatecopyright.pl script too. Change-Id: Ib056b47dde3341ef9a52ffff13ef677e471674b6 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* testlib: start sharing common helper functionsGatis Paeglis2017-11-041-0/+112
... by moving them in QTestPrivate namespace (qtesthelpers_p.h). This header file is a convenient staging area for helper APIs, eventually some could be moved to public QTest API. This header file utilizes the same pattern as other qtestlib header files - wrapping functions with QT_${LIBNAME}_LIB to automatically enable certain APIs based on what is in the projects dependencies, e.g. QT += widgets. Change-Id: Ic0266429939c1f3788912ad8b84fc6e0d5edd68b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>