Configuration Guide
| Key | Value |
|---|
| Status | Active |
| Owner | QA Automation |
| Updated | 2026-03-26 |
| Scope | Environment variables, site config, runtime behavior, and operational settings |
This page explains how the repo is configured today. It focuses on the knobs people actually use in practice: site targeting, Slack and observability credentials, browser behavior, thresholds, and the configuration files that shape per-site behavior.
Configuration Layers
| Layer | Where It Lives | What It Controls |
|---|
| Environment variables | .env, CI variables, shell overrides | credentials, run targeting, feature toggles |
| Site config | src/config/ | domains, selectors, content rules, thresholds |
| Playwright config | playwright.config.ts | projects, retries, workers, expect behavior |
| Data files | data/ | incident history, recovery state, fix data |
| CI config | .gitlab-ci.yml | schedules, manual jobs, suite orchestration |
Most Important Environment Variables
Local Run And Targeting
| Variable | Typical Use |
|---|
SITE | run a single site or narrow the target set |
CI | enables CI-specific retries and worker behavior |
DEBUG or Playwright debug flags | local investigation work |
Slack
| Variable | Purpose |
|---|
SLACK_WEBHOOK_URL | basic webhook delivery |
SLACK_BOT_TOKEN | richer bot posting, thread replies, uploads |
SLACK_CHANNEL | primary alerts channel |
SLACK_REPORTS_CHANNEL | weekly and monthly report channel |
SLACK_ALERTS | enables CI alert posting paths |
Grafana And OpenSearch
| Variable | Purpose |
|---|
GRAFANA_URL | dashboard and API base |
GRAFANA_SERVICE_ACCOUNT_TOKEN | Grafana and OpenSearch proxy access |
OPENSEARCH_URL | OpenSearch proxy or direct endpoint, depending on task |
OPENSEARCH_DIRECT_URL | direct OpenSearch write path for flows that should not go through Grafana proxy |
AI And Investigation Workflows
| Variable | Purpose |
|---|
ANTHROPIC_API_KEY | AI-assisted workflows when needed |
GITLAB_TOKEN | MR and GitLab automation paths |
CI_PROJECT_ID | GitLab integration and CI scripting |
Grafana Visual Monitor
| Variable | Purpose |
|---|
GRAFANA_MONITOR_USER | viewer login for browser-based dashboard checks |
GRAFANA_MONITOR_PASSWORD | paired password for visual monitor |
Site Configuration
The core site behavior lives in src/config/site-selectors.ts and related config files. That is where per-site differences belong.
| Config Area | What It Usually Contains |
|---|
| site identity | site name, base URL, host rules |
| consent model | CPEX or Didomi behavior |
| selectors | header, nav, article, footer, premium and other surface selectors |
| content registry support | module coverage and seed URLs |
| mobile seed paths | stable starting points for mobile tiers |
| thresholds | performance or timing expectations where needed |
Consent Models
| Consent Type | Sites |
|---|
| CPEX | Blesk, Auto, iSport, Opinio |
| Didomi | E15, Reflex |
This matters because consent handling is one of the most common reasons for false failures if a site configuration is wrong.
Playwright Runtime Configuration
The main runtime behavior is controlled in playwright.config.ts.
| Setting Area | Current Intent |
|---|
| retries | more forgiving in CI than local runs |
| workers | conservative for live-site stability |
| projects | separate desktop, mobile, visual, and other suite contexts |
| screenshot and trace policy | optimized for useful failure evidence without artifact bloat |
| expect screenshot settings | global defaults, with suite-level overrides where needed |
Visual Baseline Configuration
Visual tests need special mention because they are baseline-driven and platform-specific.
| Topic | Current Reality |
|---|
| baseline location | tests/visual.spec.ts-snapshots/ |
| CI baseline type | Linux screenshots |
| local baseline type | often Darwin on macOS |
| update path | explicit visual baseline update workflow |
| risk | missing baselines create configuration failures, not real regressions |
Important Data Files
| File | Purpose |
|---|
data/fixes.json | fix memory and healer outputs |
data/failure-incidents.json | known incident registry |
data/failure-history.json | confirmed recoveries and historical cause signals |
data/slack-threads.json | Slack thread tracking for recovery workflows |
data/broken-links-history.json | URL monitor history |
data/content-test-history.json | content regression history |
Operational Credentials Model
There are two OpenSearch access patterns in practice:
| Access Path | Why It Exists |
|---|
| Grafana datasource proxy | convenient for most human and dashboard-facing workflows |
| direct OpenSearch URL | needed for some write paths and admin tasks |
The docs and scripts in this repo already distinguish between shared writer access and higher-privilege admin access. Keep that split intact.
Common Configuration Tasks
| Task | Where To Change It |
|---|
| add or update site selectors | src/config/ |
| tune mobile or performance thresholds | site config and relevant suite helpers |
| change Slack channels | environment variables and CI variables |
| change screenshot or trace behavior | playwright.config.ts |
| add incident memory | data/failure-incidents.json and related services |
| change schedules | .gitlab-ci.yml |
| Area | Typical Adjustment |
|---|
| single-site debugging | set SITE |
| noisy Slack testing | use a test channel or disable SLACK_ALERTS locally |
| Grafana validation | set Grafana token and URL before dashboard scripts |
| OpenSearch retention work | use the correct admin-capable path, not the shared writer path |
| visual baseline work | be explicit about Linux versus Darwin snapshots |
Configuration Advice
- keep site-specific behavior in config, not scattered through tests
- prefer stable semantic selectors before brittle style selectors
- document unusual exceptions where they belong
- treat CI variables as part of the product, not as hidden magic
- when a workflow depends on historical data, make the data file and owner obvious
Related Pages