Skip to content

Test: do not assume FrontConsent is missing from the plugins folder - #372

Open
Castellon-ACM wants to merge 1 commit into
trunkfrom
fix/cookie-notice-test-environment
Open

Castellon-ACM wants to merge 1 commit into
trunkfrom
fix/cookie-notice-test-environment

Conversation

@Castellon-ACM

@Castellon-ACM Castellon-ACM commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Problem

CookieNoticeDeprecationNoticeTest::test_promo_tab_shows_the_install_cta_with_install_plugins_capability fails on any development site that already has FrontConsent in wp-content/plugins, and passes on the CI.

CookieNoticeDeprecationNotice::get_frontconsent_action_url() returns an activate link when frontconsent/frontconsent.php (or front-consent/frontconsent.php) exists and an install link otherwise. The test always expected action=install-plugin, so it silently assumed a clean plugins folder. It is not a bug in the code: the activate link is the right output when the plugin is on disk.

Change

The test now expects the link that matches what is on disk (action=activate or action=install-plugin) and is renamed to say so. No production code changes.

Verification

Ran the test class twice against the same code:

  • Plugins folder with FrontConsent installed: 6 tests pass (before this change: 1 failure).
  • Plugins folder without it, like the CI: 6 tests pass.

Not checked

  • The rest of the suite (only this test file changed).
  • Only one of the two branches runs on a given machine, so each run covers the install link or the activate link, not both.
Open WordPress Playground Preview

get_frontconsent_action_url() returns an activate link when FrontConsent is already in wp-content/plugins and an
install link otherwise. The test always expected the install link, so it passed on the CI (clean install) and failed
on any development site that has FrontConsent. It now expects the link that matches what is on disk.
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-12-01T10:03:14.774921Z
We couldn’t complete this review. Comment @codex review to try again.
75f3b6d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant