This thread is trying to answer question "When both maxDiffPixels and maxDiffPixelRatio are used in toHaveScreenshot, one from playwright test config, the other directly used as parameter of toHaveScreenshot's option, which one takes effect, the one in code, or the one in config, or both?"
Both are actually used:
It takes the minimal value.
About the merging of config I am not sure, but if it merges global config and local options then both are used.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email email@example.com.