Skip to content

feat: allow test cases in multiple suites#8

Open
Sallsup77 wants to merge 31 commits into
pricyproject:mainfrom
Sallsup77:feature/test-case-suite-memberships-pr
Open

feat: allow test cases in multiple suites#8
Sallsup77 wants to merge 31 commits into
pricyproject:mainfrom
Sallsup77:feature/test-case-suite-memberships-pr

Conversation

@Sallsup77

Copy link
Copy Markdown

Summary

Adds reusable test case suite memberships so a test case can appear in
multiple test suites while keeping its existing primary test_suite_id for
backward compatibility.

Changes

  • Adds a test_case_suite_memberships table and migration.
  • Backfills existing test cases as primary suite memberships.
  • Adds API endpoints to add/remove secondary suite memberships.
  • Updates test case list/count filtering to include secondary suite
    memberships.
  • Shows additional suite memberships on the test case detail page.
  • Adds edit-page controls for assigning a test case to additional suites and
    optional suite-specific sections.
  • Keeps existing primary suite behavior intact.

Validation

  • npx tsc --noEmit
  • npm run build
  • PYTHONPYCACHEPREFIX=/tmp/testmona-pycache python3 -m compileall backend/ app

pricyproject and others added 30 commits June 6, 2026 15:52
- Drive the engine from DATABASE_URL across SQLite, MariaDB/MySQL (PyMySQL),
  and PostgreSQL; force utf8mb4 and enable pool pre-ping/recycle for servers.
- Auto-create the target database when missing, checking existence first so a
  least-privilege user pointed at a pre-created database is never blocked.
- Make init_db() idempotent and self-healing: always create_all, stamp Alembic
  to head when bootstrapping, and have migrate.py backfill any missing tables.
- Alembic env: honor DATABASE_URL, widen alembic_version, batch mode on SQLite.
- docker-entrypoint waits for any server database before starting.
- docker-compose 'mariadb' profile (utf8mb4 + healthcheck); SQLite stays the
  zero-config default.
- .env.example documenting SQLite, MariaDB/MySQL and PostgreSQL DATABASE_URL.
- Replace the shipped demo/admin credentials with a one-time web setup wizard.
- Create the first admin only via token-gated POST /system/setup; the token is
  generated at startup, surfaced in the logs and a 0600 file, and is single-use.
- Add a server-side password-strength policy enforced on setup and registration.
- Harden /register: closed during first-run, default-deny afterwards, and only
  ever creates plain testers (no role escalation from the request body).
- Add public GET /system/setup-status plus a self-healing handler that recreates
  a dropped schema and returns 503+retry instead of 500ing.
- Frontend setup wizard with password-strength meter and independent password
  and confirm-password visibility toggles; remove demo credentials from login.
- Wire the default-language plumbing (store flag + apply-on-load) consumed by
  the settings selector.
- Add a Default Language selector (English / فارسی / العربية) to admin settings,
  persisted via the default_language system setting and applied to the sign-in
  screen and first-time visitors.
- README: MariaDB/PostgreSQL DATABASE_URL usage, the web setup-token flow, and
  database-naming guidance (incl. pre-creating a least-privilege database).
Add a per-project project_seq to every project-scoped entity, used as the
canonical identity in URLs/badges while the global integer id stays an internal
join key. Allocation runs via before_insert listeners (flush-batch safe) and a
project-scoped lookup route resolves seq->id.

Give test_cases a real project_id column (was a derived property), backfilled
from the suite and kept in sync on create/move. Make requirement_id/defect_id
derived from project_seq so the URL number and REQ-/DEF- key always match; create
endpoints derive the key server-side.
…-project

Add project_id (+ project_seq) to the definition catalogs and scope name
uniqueness per project. The list and enum endpoints take an optional project_id
and lazily seed each project from defaults; create/update/delete are checked
against the owning project. Test types/priorities/step templates are now defined
per project instead of globally.
Advanced-search/TQL rows, the traceability matrix and the doc list now carry
project_seq (and project-first keys) so cross-reference links can resolve to the
per-project number instead of the global id.
Composite indexes for common test_results/requirements/defects/audit query
patterns plus partial indexes (PostgreSQL/SQLite). Chains after the per-project
definitions migration.
Add resolveProjectSeq/getBySeq and a useResolvedEntityId hook that maps a
project-first URL number to the global id, plus entitySeq/entityKey helpers and
project_seq on the entity types.
Detail/list/sub pages resolve the per-project sequence from the URL and emit it
in links and badges (requirements, test cases/runs/suites/plans, defects,
milestones, docs, executions). Read-only auto-assigned key in the create forms;
cross-reference links use project_seq.
…agement

Move cross-project admin settings into an admin-gated /administrator area and
keep per-user preferences on /settings. Test types/priorities/step templates are
managed from a per-project /projects/:id/test-management page instead of the
admin test-management tab; add nav entry and translations.
The advanced-search/TQL `id` field mapped to the hidden global primary key, so
`id = 2` returned the row whose global id was 2 (project 2's REQ-001). Point `id`
at project_seq for requirements/defects/test cases/test plans/docs so it matches
the REQ-/DEF-/TC- number shown in the UI and URLs.
Add an admin-only Administrator entry to the navbar profile dropdown, gated by
isAdminUser.
Removed tech stack section from README.
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.

2 participants