complete story 12.5

This commit is contained in:
Naser Mansour
2026-01-04 00:49:29 +02:00
parent be05f1d759
commit 82e803dc26
8 changed files with 159 additions and 121 deletions
+32 -32
View File
@@ -4,87 +4,87 @@
// PDF Template Brand Color Tests
// ===========================================
// Verifies that all PDF templates use the new brand colors:
// - Charcoal: #4A4A42 (primary/header background)
// - Warm Gray: #C9C4BA (accent/borders)
// - Olive Green: #8AB357 (primary/header background)
// - Light Olive: #A5C87A (accent/borders)
// - Light Background: #E8E4DC
// - Deep Black: #1A1A1A (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 colors
expect($template)->toContain('#4A4A42'); // Charcoal
expect($template)->toContain('#C9C4BA'); // Warm Gray
// 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 NOT contain old colors
expect($template)->not->toContain('#0A1F44'); // Old Navy
expect($template)->not->toContain('#D4AF37'); // Old Gold
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
});
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 colors
expect($template)->toContain('#4A4A42'); // Charcoal
expect($template)->toContain('#C9C4BA'); // Warm Gray
// 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 NOT contain old colors
expect($template)->not->toContain('#0A1F44'); // Old Navy
expect($template)->not->toContain('#D4AF37'); // Old Gold
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
});
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 colors
expect($template)->toContain('#4A4A42'); // Charcoal
expect($template)->toContain('#C9C4BA'); // Warm Gray
// 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 NOT contain old colors
expect($template)->not->toContain('#0A1F44'); // Old Navy
expect($template)->not->toContain('#D4AF37'); // Old Gold
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
});
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 colors
expect($template)->toContain('#4A4A42'); // Charcoal
expect($template)->toContain('#C9C4BA'); // Warm Gray
// 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 NOT contain old colors
expect($template)->not->toContain('#0A1F44'); // Old Navy
expect($template)->not->toContain('#D4AF37'); // Old Gold
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
});
test('MonthlyReportService uses new brand colors for charts', function () {
$service = file_get_contents(app_path('Services/MonthlyReportService.php'));
// Should contain new colors for charts
expect($service)->toContain('#4A4A42'); // Charcoal
expect($service)->toContain('#C9C4BA'); // Warm Gray
// Should contain new olive green colors for charts
expect($service)->toContain('#8AB357'); // Olive Green
expect($service)->toContain('#A5C87A'); // Light Olive
// Should NOT contain old colors
expect($service)->not->toContain('#0A1F44'); // Old Navy
expect($service)->not->toContain('#D4AF37'); // Old Gold
expect($service)->not->toContain('#4A4A42'); // Old Charcoal
expect($service)->not->toContain('#C9C4BA'); // Old Warm Gray
});
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 colors
expect($template)->toContain('#4A4A42'); // Charcoal
expect($template)->toContain('#C9C4BA'); // Warm Gray
// Should contain new olive green colors
expect($template)->toContain('#8AB357'); // Olive Green
expect($template)->toContain('#A5C87A'); // Light Olive
// Should NOT contain old colors
expect($template)->not->toContain('#0A1F44'); // Old Navy
expect($template)->not->toContain('#D4AF37'); // Old Gold
expect($template)->not->toContain('#4A4A42'); // Old Charcoal
expect($template)->not->toContain('#C9C4BA'); // Old Warm Gray
});