feat: allow test cases in multiple suites#8
Open
Sallsup77 wants to merge 31 commits into
Open
Conversation
- 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.
…ersioning service
…e the only usable provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds reusable test case suite memberships so a test case can appear in
multiple test suites while keeping its existing primary
test_suite_idforbackward compatibility.
Changes
test_case_suite_membershipstable and migration.memberships.
optional suite-specific sections.
Validation
npx tsc --noEmitnpm run buildPYTHONPYCACHEPREFIX=/tmp/testmona-pycache python3 -m compileall backend/ app