How 1305abhi/recurpost-staging-automation works
Purpose and Entry Points
This is a Python/Playwright QA automation repository for the external RecurPost staging service (https://staging.recurpost.com), not the product itself. The primary execution entry point is run_tests.py, which dispatches regression, E2E, security, fuzzing, and inspection scripts. Core runtime settings and target-environment behavior are centralized in core/config.py.
Browser Automation Foundation
The shared framework owns Playwright browser/context lifecycle, authenticated storage-state reuse, and evidence capture through core/browser.py. Tests interact through common navigation, actions, waits, and snapshot facilities in core/pages/base_page.py. Authentication is a boundary with the remote staging service: persisted sessions in data/auth_state.json and auth_state.json bypass repeated login and make suites stateful against a preconfigured account.
UI Contract Layer
Selectors are treated as a maintained contract with the target application in core/locators.py; page objects isolate test scripts from direct DOM interaction. The primary domain abstractions are:
• Onboarding: core/pages/onboarding_page.py
• Kanban/calendar publishing: core/pages/kanban_page.py
• Workflow construction: core/pages/workflow_page.py
• Workspace and roles: core/pages/workspace_page.py
This layer is the main boundary between reusable automation mechanics and scenario-specific test orchestration.
Core Product Flows Under Test
Onboarding starts with signup/login and progresses through multi-step setup into the operational Kanban experience; scenarios reside in tests/e2e/onboarding/ and use core/pages/onboarding_page.py. Workspace setup creates agency/workspace context, manages invites, members, roles, and permissions, then configures workflows through tests/e2e/workspace_roles/, core/pages/workspace_page.py, and core/pages/workflow_page.py.
Content Workflow and Publishing Pipeline
The dominant E2E flow exercises a content item from idea creation through Kanban stages, editing/composer actions, legal/SEO/design-like transitions, scheduling, and immediate publishing. This is modeled principally through core/pages/kanban_page.py and exercised by tests/e2e/kanban_calendar/. Drag/drop, modal overlays, social-profile selection, schedule setting, and “Post Now” are browser-visible interactions whose final effects occur in the external staging application.
Verification, Resilience, and Security
A master cross-module validation orchestrator lives at tests/regression/run_exhaustive_regression_suite.py. Stateful chaos/endurance behavior, especially Kanban transitions and broad module sweeps, is implemented in tests/fuzzing/continuous_kanban_fuzzer.py and adjacent fuzz scripts. Input-sanitization/XSS coverage is a focused security boundary at tests/e2e/security/verify_xss_sanitization.py.
Discovery and Evidence Pipeline
Inspection scripts discover routes and DOM contracts against staging, including scripts/inspection/explore_full_application_sitemap.py; the resulting application map is stored in data/full_application_sitemap.json. Test evidence is retained as HTML state captures under artifacts/dom_snapshots/ and screenshots under artifacts/screenshots/. QA findings and planning are durable outputs in reports/, especially reports/00_master_testing_plan.md and reports/03_bug_and_issue_report.md.
Runtime and Dependencies
The repository requires Python 3.10+, Playwright, and Chromium, declared through requirements.txt. It runs locally against a network-accessible staging SaaS environment; no application server, database, or deployment infrastructure is present in this repository.
Main entry points: browser.py Browser lifecycle · base_page.py Base page mechanics · run_tests.py Test dispatcher · explore_full_application_sitemap.py Sitemap discovery
Components 23
Automation runtime
- Test dispatcher · Dispatches regression, E2E, security, fuzzing, and inspection runs.
run_tests.py - Runtime config · Centralizes target environment behavior.
core/config.py - Python + Playwright
requirements.txt - Browser lifecycle · Owns browser contexts, session reuse, and evidence capture.
core/browser.py - Authenticated sessions · Preconfigured account sessions make suites stateful.
data/auth_state.json
UI contract layer
- Base page mechanics · Provides navigation, actions, waits, and snapshots.
core/pages/base_page.py - Selector contracts · Maintained DOM contract with the target application.
core/locators.py - Onboarding page
core/pages/onboarding_page.py - Kanban page · Models content editing, transitions, scheduling, and publishing.
core/pages/kanban_page.py - Workspace page
core/pages/workspace_page.py - Workflow page
core/pages/workflow_page.py
Test suites
- Onboarding scenarios
- Workspace and roles
- Publishing pipeline · Exercises idea-to-scheduled or immediate-post flows.
- Exhaustive regression · Cross-module validation run.
tests/regression/run_exhaustive_regression_suite.py - Continuous Kanban fuzzer · Runs chaos and endurance coverage of Kanban transitions.
tests/fuzzing/continuous_kanban_fuzzer.py - XSS sanitization
tests/e2e/security/verify_xss_sanitization.py
Discovery and evidence
- Sitemap discovery · Discovers staging routes and DOM contracts.
scripts/inspection/explore_full_application_sitemap.py - Application map
data/full_application_sitemap.json - DOM snapshots
- Screenshots
- QA plans and findings
Other components
- RecurPost staging · Network target; the product is not part of this repository.
Connections 27
- Test dispatcher → Runtime config: loads
- Test dispatcher → Exhaustive regression: dispatches
- Test dispatcher → Onboarding scenarios: dispatches
- Test dispatcher → Publishing pipeline: dispatches
- Test dispatcher → Continuous Kanban fuzzer: dispatches
- Test dispatcher → Sitemap discovery: dispatches
- Python + Playwright → Browser lifecycle: provides Playwright
- Runtime config → Browser lifecycle: configures
- Browser lifecycle → Authenticated sessions: reuses
- Browser lifecycle → RecurPost staging: automates
- Base page mechanics → Browser lifecycle: uses
- Base page mechanics → Selector contracts: resolves UI through
- Onboarding page → Base page mechanics: extends
- Kanban page → Base page mechanics: extends
- Workspace page → Base page mechanics: extends
- Workflow page → Base page mechanics: extends
- Onboarding scenarios → Onboarding page: drives
- Workspace and roles → Workspace page: drives
- Workspace and roles → Workflow page: configures
- Publishing pipeline → Kanban page: drives
- Continuous Kanban fuzzer → Kanban page: stresses
- XSS sanitization → Base page mechanics: validates through
- Sitemap discovery → RecurPost staging: explores
- Sitemap discovery → Application map: writes
- Browser lifecycle → DOM snapshots: captures HTML
- Browser lifecycle → Screenshots: captures
- Exhaustive regression → QA plans and findings: feeds findings