complete story 16.5

This commit is contained in:
Naser Mansour
2026-01-11 20:57:39 +02:00
parent e65df52e2a
commit 5a23b35e19
5 changed files with 429 additions and 12 deletions
+220
View File
@@ -539,3 +539,223 @@ test('about page displays all 7 goal numbers', function () {
// Verify there are 7 goals by checking the translation array count
expect(count(__('about.goals')))->toBe(7);
});
// Story 16.5: Legal Services Section Tests
// AC1: Services Section Container
test('about page has services section with white background', function () {
$this->get('/about')
->assertOk()
->assertSee('bg-white py-8 sm:py-12 lg:py-[60px]', false);
});
// AC2: Services Section Header
test('about page displays services title in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Our Legal Services');
});
test('about page displays services title in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('خدماتنا القانونية');
});
// AC3: Services Introduction
test('about page displays services intro in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Libra provides comprehensive legal services as a for-profit law firm, combining traditional legal practice with research-driven insight.');
});
test('about page displays services intro in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('تقدم ليبرا خدمات قانونية شاملة كمكتب محاماة ربحي، يجمع بين الممارسة القانونية التقليدية والرؤية المبنية على البحث.');
});
// AC4: Four Service Categories - Card 1: Legal Consultations & Representation
test('about page displays consultation service card title in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Legal Consultations')
->assertSee('Representation');
});
test('about page displays consultation service card title in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('الاستشارات والتمثيل القانوني');
});
test('about page displays consultation service items in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Legal advice')
->assertSee('Court representation')
->assertSee('Litigation management')
->assertSee('Pleadings')
->assertSee('appeals');
});
test('about page displays consultation service items in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('الاستشارات القانونية')
->assertSee('التمثيل أمام المحاكم')
->assertSee('إدارة التقاضي')
->assertSee('المذكرات والاستئناف');
});
// AC4: Four Service Categories - Card 2: Women's & Family Law
test('about page displays family service card title in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Women')
->assertSee('Family Law');
});
test('about page displays family service card title in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('قانون المرأة والأسرة');
});
test('about page displays family service items in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Divorce proceedings')
->assertSee('Alimony cases')
->assertSee('Child custody')
->assertSee('Protection from violence');
});
test('about page displays family service items in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('إجراءات الطلاق')
->assertSee('قضايا النفقة')
->assertSee('حضانة الأطفال')
->assertSee('الحماية من العنف');
});
// AC4: Four Service Categories - Card 3: Civil & Commercial
test('about page displays civil service card title in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Civil')
->assertSee('Commercial Disputes');
});
test('about page displays civil service card title in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('النزاعات المدنية والتجارية');
});
test('about page displays civil service items in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Partnership cases')
->assertSee('Financial claims')
->assertSee('Civil disputes')
->assertSee('Commercial litigation');
});
test('about page displays civil service items in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('قضايا الشراكة')
->assertSee('المطالبات المالية')
->assertSee('النزاعات المدنية')
->assertSee('التقاضي التجاري');
});
// AC4: Four Service Categories - Card 4: Business Services
test('about page displays business service card title in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Business Legal Services');
});
test('about page displays business service card title in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('الخدمات القانونية للأعمال');
});
test('about page displays business service items in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Contract drafting')
->assertSee('review')
->assertSee('Governance')
->assertSee('compliance')
->assertSee('Arbitration')
->assertSee('Alternative dispute resolution');
});
test('about page displays business service items in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('صياغة ومراجعة العقود')
->assertSee('الحوكمة والامتثال')
->assertSee('التحكيم')
->assertSee('الحل البديل للنزاعات');
});
// AC5: Service Card Styling
test('about page service cards have correct styling', function () {
$this->get('/about')
->assertOk()
->assertSee('bg-background rounded-xl p-8 text-center shadow-sm', false);
});
// AC6: Responsive Grid
test('about page service cards use responsive grid', function () {
$this->get('/about')
->assertOk()
->assertSee('grid-cols-1 md:grid-cols-2 lg:grid-cols-4', false);
});
// AC7: CTA Button
test('about page services section has CTA button in English', function () {
$this->withSession(['locale' => 'en'])
->get('/about')
->assertOk()
->assertSee('Book a Consultation');
});
test('about page services section has CTA button in Arabic', function () {
$this->withSession(['locale' => 'ar'])
->get('/about')
->assertOk()
->assertSee('احجز استشارة');
});
test('about page services CTA links to booking page', function () {
$this->get('/about')
->assertOk()
->assertSee('href="'.route('booking').'"', false);
});