Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 5.54 KB

AGENTS.md

File metadata and controls

50 lines (39 loc) · 5.54 KB

OpenProject Integration QA Agent Guide

This file is the canonical always-on project guidance for AI coding agents. Codex and Cursor read AGENTS.md directly. Claude Code reads CLAUDE.md, which imports this file. Keep this file tool-neutral and keep tool-specific adapters thin.

Repository Shape

  • This repository deploys and tests the OpenProject, Nextcloud, Keycloak, and XWiki integration stack through Helm, Helmfile, k3d, Docker, and Playwright.
  • Helm/chart and environment work lives at the repository root, under charts/, config/, environments/, scripts/, and helmfile.yaml.
  • End-to-end integration tests live under e2e/.
  • Do not edit charts/opnc-integration/values.yaml for local configuration changes. Use environments/override.yaml, usually copied from environments/override.yaml.example.

Commands

  • Local stack setup: make setup, then make deploy.
  • Development deployments: make deploy-dev or make deploy-op-standalone.
  • Teardown: make teardown; delete the k3d cluster with make teardown-all.
  • OpenProject RSpec inside the cluster: make run-rspec-test SPEC=spec/path/to_spec.rb.
  • E2E tests (agents and preferred local path): from e2e/, use Docker only — ./run-tests.sh (see .agents/shared/openproject-e2e.md Running Tests). Do not npm install / playwright install / npx playwright test on the host for verification.
  • Examples: E2E_ENV=local ./run-tests.sh --no-open-report --project=op-integration-tests tests/path/to.spec.ts; PullPreview: set E2E_ENV=pullpreview plus OPENPROJECT_HOST / NEXTCLOUD_HOST / KEYCLOAK_HOST, and secret-backed E2E_ADMIN_PASS / E2E_USER_PASS / MCP_OAUTH_TOKEN (or per-role E2E_*_PASS); local default passwords (admin for admins, 1234 for alice/brian) are refused when those are missing — see pullpreview/docs/README.md#secrets-required-for-every-preview-deploy. Then ./run-tests.sh --no-open-report …. Rebuild image after lockfile changes: ./run-tests.sh --build ….

E2E Conventions

  • Before writing, modifying, or reviewing Playwright tests, page objects, locators, or E2E utilities, read .agents/shared/openproject-e2e.md.
  • When debugging or developing tests, run them via e2e/./run-tests.sh (Docker). Do not install Playwright browsers or e2e/node_modules on the agent host for test execution. Interactive locator discovery (playwright-cli / Playwright MCP) may still hit a live UI; verification of committed tests stays Docker.
  • Test specs belong in e2e/tests/.
  • Page object UI flows belong in e2e/pageobjects/.
  • API helpers and orchestration belong in e2e/utils/.
  • Selectors belong in e2e/locators/*.json; do not put raw selectors in specs.
  • Use page object methods and getLocator(...) rather than inline Playwright selectors.
  • For Squash TM-mapped tests, add the numeric Squash test case ID in code with squashTestCase(...) from e2e/utils/squash-metadata.ts; keep the Squash automated test reference aligned with the Playwright title and folder#file#title format; match test.step() count/order to Squash steps (see .agents/shared/openproject-e2e.md).
  • Use the shared logger and typed catches from the E2E guide; do not add direct console.* logging in tests, page objects, or utilities.
  • OpenProject file links and Nextcloud WebDAV files have separate cleanup paths; handle both when changing repeatable upload or file-link tests.
  • Gate auth-mode suites with oauth2Tags / ssoExternalTags / dualSetupTags and skipUnlessSetupMethod(...) so @oauth2 runs only on oauth2 stacks and @sso-external only on Keycloak SSO stacks (SETUP_METHOD or environments/override.yaml; Playwright default is oauth2, matching Helm — see .agents/shared/openproject-e2e.md). Import tags from e2e/tests/base-test.ts, not shared.ts. Dual-mode prepare / NC UI conventions (prepareIntegrationUserForDemoStorage, redirectPath, Text/Talk apps, vue-select / search helpers) live in that guide’s Integration Notes. TC-2266 must not skip when kubectl is missing — use the API/UI AMPF strip path in that guide. TC-2257 must not skip when kubectl is missing — prefer rails credential load, else NC nc-oauth recreate + OP API sync + Admin Replace; run before delete-storage (see that guide). TC-2258 needs cluster exec (local kubectl via Docker kube mount, or CI E2E_CLUSTER_SSH_*) — on CI missing exec must fail, not skip (see that guide).

Skills And Rules

  • Canonical skill discovery for Codex and Cursor is .agents/skills/.
  • Claude Code requires project skills under .claude/skills/; keep those files as tiny adapters that point back to .agents/shared/.
  • Cursor already loads .agents/skills/, so do not duplicate skills under .cursor/skills/.
  • Cursor path-scoped rules can stay under .cursor/rules/ when glob activation is useful, but rule bodies should point to canonical files instead of copying their contents.
  • If a skill or rule needs detailed reference material, put the source under .agents/shared/ and point adapters to it.
  • Playwright MCP is optional Cursor user/global setup (not shipped as .cursor/mcp.json). CLI exploration uses the playwright-cli skill; routing: .agents/shared/playwright-test-authoring.md.

Editing Standards

  • Keep changes scoped to the requested behavior and the existing repository patterns.
  • Prefer structured parsers and existing helpers over ad hoc text manipulation.
  • Keep documentation and comments concise; add comments only for non-obvious logic.
  • Do not commit generated Playwright reports, traces, videos, local .env files, or local override files.
  • Never revert unrelated local changes.