Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • P Plasma Workspace
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 113
    • Merge requests 113
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • Plasma Workspace
  • Merge requests
  • !2334

wallpapers/image: add basic unit test for frontend

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Fushan Wen requested to merge work/fuf/image/testfrontend into master Nov 16, 2022
  • Overview 6
  • Commits 2
  • Pipelines 6
  • Changes 6

This adds 3 tests for the frontend, each with different fill modes and background colors.

  1. Load image with the default settings
  2. Load image with blur enabled and PreserveAspectFit fill mode
  3. Load image with Pad fill mode

This uses QQuickItem::grabImage to check the color is coorect in each test case.

Local test result:

> ./testimagefrontend 
********* Start testing of ImageFrontendTest *********
Config: Using QtTest library 5.15.7, Qt 5.15.7 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 12.2.1 20221020 [revision 0aaef83351473e8f4eb774f8f999bbe87a4866d7]), opensuse-tumbleweed 20221111
PASS   : ImageFrontendTest::initTestCase()
QWARN  : ImageFrontendTest::testLoadWallpaper(Default) Could not create scene graph context for backend 'automaticbackend' - check that plugins are installed correctly in /usr/lib64/qt5/plugins
PASS   : ImageFrontendTest::testLoadWallpaper(Default)
PASS   : ImageFrontendTest::testLoadWallpaper(Blur enabled)
PASS   : ImageFrontendTest::testLoadWallpaper(Background color)
PASS   : ImageFrontendTest::cleanupTestCase()
Totals: 5 passed, 0 failed, 0 skipped, 0 blacklisted, 739ms
********* Finished testing of ImageFrontendTest *********
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: work/fuf/image/testfrontend