published()->create([ 'slug' => 'casamento-jardim', 'title' => 'Casamento Jardim', 'cover_image_path' => 'cases/cover.jpg', 'cover_image_alt' => 'Capa do casamento', ]); $routes = [ route('home'), route('services.index'), route('portfolio.index'), route('portfolio.show', $case->slug), route('about'), route('privacy'), route('contact'), ]; foreach ($routes as $url) { $html = $this->get($url)->assertOk()->getContent(); $this->assertSame(1, preg_match_all('/assertMatchesRegularExpression('/assertMatchesRegularExpression('/assertMatchesRegularExpression('/assertMatchesRegularExpression('/assertStringContainsString('href="#conteudo"', $html); } } public function test_content_images_expose_alt_text(): void { Storage::fake('public'); SiteSetting::instance(); $case = PortfolioCase::factory()->published()->create([ 'slug' => 'casamento-jardim', 'title' => 'Casamento Jardim', 'cover_image_path' => 'cases/cover.jpg', 'cover_image_alt' => 'Capa do casamento', ]); PortfolioImage::query()->create([ 'portfolio_case_id' => $case->id, 'path' => 'content/gallery-a.jpg', 'alt_text' => 'Galeria A', 'caption' => null, 'sort_order' => 1, ]); $this->get(route('portfolio.show', $case->slug)) ->assertOk() ->assertSee('alt="Capa do casamento"', false) ->assertSee('alt="Galeria A"', false); } public function test_interactive_elements_have_visible_focus_styles(): void { $css = file_get_contents(resource_path('css/app.css')); $this->assertIsString($css); $this->assertStringContainsString(':focus-visible', $css); $this->assertStringContainsString('outline', $css); } }