summaryrefslogtreecommitdiffstats
path: root/tests/baseline
Commit message (Collapse)AuthorAgeFilesLines
* Never handle scrollbars styled with box or border changes as transientVolker Hilsheimer2021-11-293-0/+92
| | | | | | | | | | | | | | | | If scrollbars are styled with a style sheet that includes a box or removes off the native border, then we never treat them as transient or overlapping. Otherwise, the layout logic in QAbstractScrollArea will show them on top of the viewport, overlapping the content. Add case to the style sheet test baseline test. It's a test for scrollbars in a scroll area, rather than a test for the styling of the scrollbars themselves. Fixes: QTBUG-98289 Pick-to: 6.2 Change-Id: Ic53ad248b3eedd54722ac7b2fe5256a27092dbc1 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Share common code for baseline-testing widget UIsVolker Hilsheimer2021-11-267-251/+270
| | | | | | | | | | | Setting up the baseline tests, creating an appearance identifier, and basic image-grabbing functionality doesn't need to be reinvented for each test case that wants to use baseline testing of widget UIs. As a drive-by, remove unneeded Qt 5 meta tags from .pri file. Change-Id: I1562e1b377946305cac018e0f0f0175c2c07cd31 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Fix and complete style sheet support for QToolButtonVolker Hilsheimer2021-11-2613-0/+390
| | | | | | | | | | | | | | | | | | | Amends 2b2e7b2ac50e5b4f6e1888e594f6e32338dd2a80, which rewrote the rendering to remove the conflation of menu arrows and arrow icons, but introduced double rendering of the arrow icons if only the border was styled. Add a baseline test for style sheets, with a test function for QToolButton configured in various ways and styled with different style sheets. The new test case includes a Qt 5 build system so that we can compare Qt 5.15 with Qt 6. Fixes: QTBUG-98286 Pick-to: 6.2 6.2.2 Change-Id: I09cdc829c1a7e7913df4c3768dbe44b6dba4778b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* Update baseline testing frameworkEirik Aavitsland2021-11-245-68/+40
| | | | | | | | | | | | | | | | | | | Merge in various minor changes and fixes that have been done to the branched copy in qtquick3d, and clean out some outdated code. Mostly just coding style fixes and cleanups, but also: - adds -keeprunning command line parameter, intended for tests that by default exits early if it seems the platform is too unstable (e.g. crashing) for a meaningful testrun. - Changes behaviour for fuzzy matches, from SKIP to PASS. The (mis)use of QSKIP was done to force log output; now the output is just printed by qInfo() instead. Pick-to: 6.2 Change-Id: I46e77a94cc5b1980ac420086c2ae88dc9b84ef12 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add variations of QPushButton with default property setVolker Hilsheimer2021-11-241-0/+6
| | | | | Change-Id: Ie928575b131c7031da9a4d735159ba3d14ccad6c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add baseline test that allows comparing the rendering of widgetsVolker Hilsheimer2021-11-183-0/+304
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide basic boiler plate that sets up the baseline (aka lancelot) framework specifically for comparing the appearance of widgets, and implement test functions for QSlider and QPushButton. Widgets should always look the same if the QPA platform, the OS version, and certain UI-impacting attributes are identical. Ie. on any macOS 10.15 machine that runs in "Light" mode, widgets look the same. On a macOS 11 machine, they might look different. On an OpenSUSE machine using the fusion style things might look different from a Ubuntu machine. The helper function removes DPR differences - images are always scaled to a DPR of 1.0, which allows us to compare the image\ content and not get distracted by them having different dimensions (and the fuzzy comparison of images might make the system tolerate scaling artefacts). Note: For now, this test is meant to be run locally, either when testing changes to style code, or when checking how QWidget based UIs would look on newer version of an operating system. In CI the test is run, but then skipped in CI as the baseline server is not configured. Change-Id: Ie33a9d979d934f0df6883757333ce2c5e2f7ef84 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Rename and restructure the baseline (lancelot) testing codeEirik Aavitsland2021-11-16119-0/+14113
In preparation for addition of new baseline tests, establish a new test category, "baseline". This is similar to the category "benchmarks" in that it contains tests that use the QTest framework, but conceptually are not unit tests, in contrast to those under auto/. Move the existing QPainter baseline test, tst_lancelot, into this new category, and rename it accordingly. Baseline tests use the QBaselineTest extension to QTest. Move that extension too into the tests/baseline directory, allowing the clean out of the baselineserver directory. Pick-to: 6.2 Change-Id: I1b527f5867c953b1d22be73798fcf7d1494712ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>