Skip to content

autoSaveBaseline collides with the new alwaysSaveActualImage flag #1085

@dragosMC91

Description

@dragosMC91

Environment (please complete the following information):

  • Node.js version: 22.15.0
  • NPM version: 10.9.2
  • Browser name and version: Chrome 143
  • Platform name and version: MacOS ARM
  • WebdriverIO version: 9.23.0
  • @wdio/visual-service version: 9.1.0

Config of WebdriverIO + @wdio/visual-service

        services: [
            [
                'visual',
                {
                    baselineFolder: baselineImageFolder,
                    formatImageName: `{tag}`,
                    screenshotPath: screenshotsFolderPath, // The /actual is added automatically by wdio as a subfolder of screenshotPath.
                    autoSaveBaseline: true,
                    blockOutToolBar: true,
                    scaleImagesToSameSize: true,
                    ignoreAntialiasing: true,
                    ignoreAlpha: true,
                    autoElementScroll: false,
                    alwaysSaveActualImage: false,
                },
            ],
        ],

Describe the bug
When autoSaveBaseline is true and alwaysSaveActualImage is false, actual images are still saved.

To Reproduce
Just use the config above.

Expected behavior
When autoSaveBaseline is true and alwaysSaveActualImage is false, the actual images should only be saved on disk if there is a diff associated to them

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions