Skip to content

Reset fixture between suites#24469

Open
caddoo wants to merge 1 commit into5.x-devfrom
dev-20198-privacy-manager
Open

Reset fixture between suites#24469
caddoo wants to merge 1 commit into5.x-devfrom
dev-20198-privacy-manager

Conversation

@caddoo
Copy link
Copy Markdown
Contributor

@caddoo caddoo commented May 1, 2026

Description

Fix PrivacyManager UI tests when running under --plugin

This change fixes a UI test state leak that showed up when PrivacyManager was run as an isolated plugin job in CI.

Why it happened:

  • The screenshot test runner treats PrivacyManager and --plugin=PrivacyManager differently.
  • Passing the suite name alone runs the matching suite, but --plugin=PrivacyManager switches the runner into plugin mode and reuses persisted fixture state differently.
  • Under --persist-fixture-data, that let PrivacyManager settings from previous tests carry into later runs, which caused Anonymize Order ID and Anonymize Referrer to appear in the wrong state.

How to reproduce:

  • ddev matomo:console tests:run-ui PrivacyManager --persist-fixture-data
  • ddev matomo:console tests:run-ui --plugin=PrivacyManager --persist-fixture-data

What changed:

  • Reset PrivacyManager instance-level settings and site-specific overrides before and after the affected UI suites.
  • This keeps the screenshot tests self-contained even when fixture data is persisted across runs.

Why this matters:

  • CI is being split to target individual plugins, so these tests need to behave correctly when PrivacyManager runs in isolation instead of as part of a larger shared UI batch.

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@caddoo caddoo added this to the 5.11.0 milestone May 1, 2026
@caddoo caddoo added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 1, 2026
@caddoo caddoo requested a review from a team May 1, 2026 04:22
@caddoo caddoo marked this pull request as ready for review May 1, 2026 04:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Development

Successfully merging this pull request may close these issues.

1 participant