redone 12.5

This commit is contained in:
Naser Mansour
2026-01-04 02:26:22 +02:00
parent e557fb1104
commit 45f029a1db
8 changed files with 169 additions and 145 deletions
+55 -42
View File
@@ -4,87 +4,100 @@
// PDF Template Brand Color Tests
// ===========================================
// Verifies that all PDF templates use the new brand colors:
// - Olive Green: #8AB357 (primary/header background)
// - Light Olive: #A5C87A (accent/borders)
// - Light Background: #E8E4DC
// - Deep Black: #1A1A1A (text)
// - Dark Forest Green: #2D3624 (primary/header background)
// - Warm Gold: #A68966 (accent/highlight)
// - Gold Light: #C4A882 (borders/accents)
// - Warm Cream: #F4F1EA (backgrounds)
// - Forest Green: #2D322A (text)
test('users-export PDF template uses new brand colors', function () {
$template = file_get_contents(resource_path('views/pdf/users-export.blade.php'));
// Should contain new olive green colors
expect($template)->toContain('#8AB357'); // Olive Green
expect($template)->toContain('#A5C87A'); // Light Olive
expect($template)->toContain('#E8E4DC'); // Light Background
expect($template)->toContain('#1A1A1A'); // Deep Black text
// Should contain new Dark Forest Green and Warm Gold colors
expect($template)->toContain('#2D3624'); // Dark Forest Green
expect($template)->toContain('#A68966'); // Warm Gold
expect($template)->toContain('#C4A882'); // Gold Light
expect($template)->toContain('#F4F1EA'); // Warm Cream
expect($template)->toContain('#2D322A'); // Forest Green text
// Should NOT contain old colors
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
expect($template)->not->toContain('#8AB357'); // Old Olive Green
expect($template)->not->toContain('#A5C87A'); // Old Light Olive
expect($template)->not->toContain('#E8E4DC'); // Old Light Background
expect($template)->not->toContain('#1A1A1A'); // Old Deep Black
});
test('consultations-export PDF template uses new brand colors', function () {
$template = file_get_contents(resource_path('views/pdf/consultations-export.blade.php'));
// Should contain new olive green colors
expect($template)->toContain('#8AB357'); // Olive Green
expect($template)->toContain('#A5C87A'); // Light Olive
expect($template)->toContain('#E8E4DC'); // Light Background
expect($template)->toContain('#1A1A1A'); // Deep Black text
// Should contain new Dark Forest Green and Warm Gold colors
expect($template)->toContain('#2D3624'); // Dark Forest Green
expect($template)->toContain('#A68966'); // Warm Gold
expect($template)->toContain('#C4A882'); // Gold Light
expect($template)->toContain('#F4F1EA'); // Warm Cream
expect($template)->toContain('#2D322A'); // Forest Green text
// Should NOT contain old colors
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
expect($template)->not->toContain('#8AB357'); // Old Olive Green
expect($template)->not->toContain('#A5C87A'); // Old Light Olive
expect($template)->not->toContain('#E8E4DC'); // Old Light Background
expect($template)->not->toContain('#1A1A1A'); // Old Deep Black
});
test('timelines-export PDF template uses new brand colors', function () {
$template = file_get_contents(resource_path('views/pdf/timelines-export.blade.php'));
// Should contain new olive green colors
expect($template)->toContain('#8AB357'); // Olive Green
expect($template)->toContain('#A5C87A'); // Light Olive
expect($template)->toContain('#E8E4DC'); // Light Background
expect($template)->toContain('#1A1A1A'); // Deep Black text
// Should contain new Dark Forest Green and Warm Gold colors
expect($template)->toContain('#2D3624'); // Dark Forest Green
expect($template)->toContain('#A68966'); // Warm Gold
expect($template)->toContain('#C4A882'); // Gold Light
expect($template)->toContain('#F4F1EA'); // Warm Cream
expect($template)->toContain('#2D322A'); // Forest Green text
// Should NOT contain old colors
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
expect($template)->not->toContain('#8AB357'); // Old Olive Green
expect($template)->not->toContain('#A5C87A'); // Old Light Olive
expect($template)->not->toContain('#E8E4DC'); // Old Light Background
expect($template)->not->toContain('#1A1A1A'); // Old Deep Black
});
test('monthly-report PDF template uses new brand colors', function () {
$template = file_get_contents(resource_path('views/pdf/monthly-report.blade.php'));
// Should contain new olive green colors
expect($template)->toContain('#8AB357'); // Olive Green
expect($template)->toContain('#A5C87A'); // Light Olive
expect($template)->toContain('#E8E4DC'); // Light Background
expect($template)->toContain('#1A1A1A'); // Deep Black text
// Should contain new Dark Forest Green and Warm Gold colors
expect($template)->toContain('#2D3624'); // Dark Forest Green
expect($template)->toContain('#A68966'); // Warm Gold
expect($template)->toContain('#C4A882'); // Gold Light
expect($template)->toContain('#F4F1EA'); // Warm Cream
expect($template)->toContain('#2D322A'); // Forest Green text
// Should NOT contain old colors
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
expect($template)->not->toContain('#8AB357'); // Old Olive Green
expect($template)->not->toContain('#A5C87A'); // Old Light Olive
expect($template)->not->toContain('#E8E4DC'); // Old Light Background
expect($template)->not->toContain('#1A1A1A'); // Old Deep Black
});
test('MonthlyReportService uses new brand colors for charts', function () {
$service = file_get_contents(app_path('Services/MonthlyReportService.php'));
// Should contain new olive green colors for charts
expect($service)->toContain('#8AB357'); // Olive Green
expect($service)->toContain('#A5C87A'); // Light Olive
// Should contain new Warm Gold colors for charts
expect($service)->toContain('#A68966'); // Warm Gold
expect($service)->toContain('#C4A882'); // Gold Light
// Should NOT contain old colors
expect($service)->not->toContain('#4A4A42'); // Old Charcoal
expect($service)->not->toContain('#C9C4BA'); // Old Warm Gray
expect($service)->not->toContain('#8AB357'); // Old Olive Green
expect($service)->not->toContain('#A5C87A'); // Old Light Olive
});
test('monthly-report Livewire component uses new brand colors', function () {
$template = file_get_contents(resource_path('views/livewire/admin/reports/monthly-report.blade.php'));
// Should contain new olive green colors
expect($template)->toContain('#8AB357'); // Olive Green
expect($template)->toContain('#A5C87A'); // Light Olive
// Should contain new Dark Forest Green and Warm Gold colors
expect($template)->toContain('#2D3624'); // Dark Forest Green
expect($template)->toContain('#A68966'); // Warm Gold
// Should NOT contain old colors
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
expect($template)->not->toContain('#8AB357'); // Old Olive Green
expect($template)->not->toContain('#A5C87A'); // Old Light Olive
});