withSession(['locale' => $locale])->get('/about')->assertOk()->getContent(); } test('about renders its sections in order with the existing content in both languages', function () { foreach (['ar', 'en'] as $locale) { $html = aboutHtml($locale); app()->setLocale($locale); $needles = [ __('about.title'), __('about.identity'), __('about.vision_title'), __('about.mission_institution_title'), __('about.mission_society_title'), __('about.mission_diaspora_title'), __('about.values_title'), __('about.value_women'), __('about.goals_title'), __('about.goals')[6], __('about.services_title'), __('about.service_business_items')[0], __('site.about_cta_title'), __('about.services_cta'), ]; $last = -1; foreach ($needles as $n) { $pos = strpos($html, e($n), $last + 1); $pos = $pos === false ? strpos($html, $n, $last + 1) : $pos; expect($pos)->not->toBeFalse("missing or out of order [$locale]: $n"); $last = $pos; } expect(substr_count($html, 'class="sampler"'))->toBe(1); expect(substr_count($html, 'class="val"'))->toBe(6); expect(substr_count($html, 'row row-static'))->toBe(7); } }); test('about has one h1 and alt text on every image', function () { $html = aboutHtml('ar'); expect(substr_count($html, '