Skip to content

IFC-2339: E2E Playwright tests for webhook custom headers#8607

Open
polmichel wants to merge 6 commits intopmi-20260314-enable-cache-on-reconcile-allfrom
pmi-20260314-e2e-webhooks-headers
Open

IFC-2339: E2E Playwright tests for webhook custom headers#8607
polmichel wants to merge 6 commits intopmi-20260314-enable-cache-on-reconcile-allfrom
pmi-20260314-e2e-webhooks-headers

Conversation

@polmichel
Copy link
Contributor

@polmichel polmichel commented Mar 14, 2026

Why

The webhook custom headers feature (INFP-445) added CoreKeyValue/CoreStaticKeyValue/CoreEnvironmentVariableKeyValue schema entities and a headers relationship on CoreWebhook. All backend work and unit tests are complete across PRs #8590, #8597, #8602, #8603, and #8604, but no E2E Playwright tests existed for this feature. The spec explicitly calls for E2E coverage.

Closes IFC-2339

What changed

  • Added 3 serial E2E Playwright tests in frontend/app/tests/e2e/webhook/webhook.spec.ts:

    1. Create a static key-value header — navigates to /objects/CoreKeyValue, creates a StaticKeyValue with name, key, and value
    2. Add header to webhook — opens the "Ansible EDA" webhook detail, navigates to the headers relationship view via ?tab=headers URL param (Attribute-kind relationships don't render visible tabs), associates the created header
    3. Remove header from webhook — dissociates the header and verifies removal
  • Tests run serially between the existing "Access webhook" and "Delete webhook" tests, reusing the "Ansible EDA" webhook created by the existing test suite

How to review

Single file change: frontend/app/tests/e2e/webhook/webhook.spec.ts

How to test

# Requires a running Infrahub instance with demo data loaded
INFRAHUB_IMAGE_VER=local uv run invoke demo.start --wait
INFRAHUB_IMAGE_VER=local uv run invoke demo.load-infra-schema
INFRAHUB_IMAGE_VER=local uv run invoke demo.load-infra-data
cd frontend/app && npx playwright test tests/e2e/webhook/webhook.spec.ts

Impact & rollout

Checklist

  • Tests added/updated
  • Internal .md docs updated (internal knowledge and AI code tools knowledge)

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (4)
  • main
  • stable
  • develop
  • release-.*

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 06b64468-2524-4a1a-aa9f-5b324bb8b311

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can suggest fixes for GitHub Check annotations.

Configure the reviews.tools.github-checks setting to adjust the time to wait for GitHub Checks to complete.

@github-actions github-actions bot added type/documentation Improvements or additions to documentation group/backend Issue related to the backend (API Server, Git Agent) group/frontend Issue related to the frontend (React) labels Mar 14, 2026
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 14, 2026

Merging this PR will improve performance by 39.04%

⚡ 12 improved benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
test_nodemanager_querypeers 1.5 ms 1.3 ms +21.71%
test_relationshipmanager_getpeer 155.9 µs 131.7 µs +18.38%
test_base_schema_duplicate_CoreProposedChange 2.1 ms 1.7 ms +28.62%
test_graphql_generate_schema 516.1 ms 371.2 ms +39.04%
test_get_schema 323.6 ms 257.2 ms +25.83%
test_schemabranch_process 1,026.1 ms 818.8 ms +25.32%
test_schemabranch_duplicate 7.2 ms 5.8 ms +25.84%
test_query_one_model 464.3 ms 352.8 ms +31.62%
test_get_menu 245.4 ms 188.1 ms +30.42%
test_query_rel_many 693.3 ms 522.4 ms +32.72%
test_load_node_to_db_node_schema 66.2 ms 52.1 ms +27.13%
test_query_rel_one 662.3 ms 500 ms +32.46%

Comparing pmi-20260314-e2e-webhooks-headers (5074fed) with stable (c396f66)1

Open in CodSpeed

Footnotes

  1. No successful run was found on pmi-20260227-webhooks-ifc-2272 (44c9479) during the generation of this report, so stable (c396f66) was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@polmichel polmichel marked this pull request as ready for review March 14, 2026 16:26
@polmichel polmichel requested review from a team as code owners March 14, 2026 16:26
@polmichel polmichel changed the base branch from pmi-20260227-webhooks-ifc-2272 to pmi-20260314-enable-cache-on-reconcile-all March 17, 2026 14:13
polmichel and others added 6 commits March 17, 2026 15:14
Add 3 serial E2E tests covering the full lifecycle of webhook custom headers:
create a StaticKeyValue, associate it as a header on a webhook, then dissociate it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@polmichel polmichel force-pushed the pmi-20260314-e2e-webhooks-headers branch from 5074fed to fdcfb29 Compare March 17, 2026 14:15
@github-actions github-actions bot removed the group/backend Issue related to the backend (API Server, Git Agent) label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

group/frontend Issue related to the frontend (React) type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant