From 1e13ccda0560f39e7ecc5634373e97add1746ac1 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Mon, 2 Mar 2026 22:32:56 +0000 Subject: [PATCH] docs --- README.md | 27 ++++++++++++++++++++++++++- obsidian/Crussell/Crussell Nails.md | 22 ++++++++++++++++++++-- 2 files changed, 46 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2eea417..abb6f2f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Crussell - +#KM|> **Last Updated:** March 2026 Crussell is a **full‑stack application** that powers a nail‑bar / salon booking service. The repository is split into a **Go** backend and a **SvelteKit** front‑end, both of which are containerised with Docker. A lightweight **SabreDAV** instance is also exposed so that the salon can offer WebDAV access to clients. ## 📦 Project Structure @@ -216,6 +216,31 @@ func TestMyHandler(t *testing.T) { - Test tokens use a fixed secret: `test-secret-key-for-testing-only` - Fixtures auto-generate unique emails to avoid conflicts +### Recent Testing & Bug Fixes + +Since the February 2026 update, extensive testing has been conducted which uncovered and fixed several issues: + +**Testing Improvements:** +- Added comprehensive test suite for `notifications` handler (600+ lines) +- Added new booking flow tests covering user booking creation +- Added extensive test docstrings across all test files +- Fixed test database setup and fixture issues + +**Issues Discovered & Fixed Through Testing:** +- **Edit Request Bugs**: Multiple issues in booking edit request handling: + - Fixed validation for overlapping bookings during edits + - Fixed edit request approval flow + - Fixed edit request rejection handling + - Fixed status transition logic for edit requests +- **SQL Function Updates**: Refactored and optimized database functions in `init-script.sql` +- **Test Infrastructure**: Fixed manual test corruption issues, improved test isolation + +**Test Coverage:** +- 16+ test files covering all major handlers +- Tests use `//go:build test` build tag +- Comprehensive fixtures for users, services, bookings +- Auth helper with JWT token generation for both user and admin roles + ## 📂 Environment Variables | Variable | Purpose | Example | diff --git a/obsidian/Crussell/Crussell Nails.md b/obsidian/Crussell/Crussell Nails.md index 1156e5b..36b85c1 100644 --- a/obsidian/Crussell/Crussell Nails.md +++ b/obsidian/Crussell/Crussell Nails.md @@ -1,4 +1,4 @@ -> **Last Updated:** February 2026 +#MW|> **Last Updated:** March 2026 > **Status:** Work in Progress --- @@ -259,9 +259,27 @@ go test -v -run "TestBooking" ./... - Test tokens use fixed secret: `test-secret-key-for-testing-only` - Fixtures auto-generate unique emails to avoid conflicts +### Recent Testing Updates (March 2026) + +Since the February 2026 update, extensive testing has been conducted which uncovered and fixed several issues: + +**Testing Improvements:** +- Added comprehensive test suite for `notifications` handler (600+ lines) +- Added new booking flow tests covering user booking creation +- Added extensive test docstrings across all test files +- Fixed test database setup and fixture issues + +**Issues Discovered & Fixed Through Testing:** +- **Edit Request Bugs**: Multiple issues in booking edit request handling: + - Fixed validation for overlapping bookings during edits + - Fixed edit request approval flow + - Fixed edit request rejection handling + - Fixed status transition logic for edit requests +- **SQL Function Updates**: Refactored and optimized database functions in `init-script.sql` +- **Test Infrastructure**: Fixed manual test corruption issues, improved test isolation + --- -## Current Architecture ### Overview Diagram