Files
saasshop/tests/Feature/AdminComponentsCssToastStylesShouldExistTest.php

36 lines
1.0 KiB
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminComponentsCssToastStylesShouldExistTest extends TestCase
{
use RefreshDatabase;
protected function loginAsPlatformAdmin(): void
{
$this->seed();
$this->post('/admin/login', [
'email' => 'platform.admin@demo.local',
'password' => 'Platform@123456',
])->assertRedirect('/admin');
}
public function test_admin_components_css_should_contain_toast_styles(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
$this->assertStringContainsString(".toast-container{\n", $css);
$this->assertStringContainsString(".toast{\n", $css);
$this->assertStringContainsString(".toast-success", $css);
$this->assertStringContainsString(".toast-warning", $css);
$this->assertStringContainsString(".toast-error", $css);
}
}