This commit is contained in:
2026-03-02 22:32:56 +00:00
parent a7c8837073
commit 1e13ccda05
2 changed files with 46 additions and 3 deletions
+26 -1
View File
@@ -1,5 +1,5 @@
# Crussell
#KM|> **Last Updated:** March 2026
Crussell is a **fullstack application** that powers a nailbar / salon booking service. The repository is split into a **Go** backend and a **SvelteKit** frontend, 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 |
+20 -2
View File
@@ -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