Files
saasshop/tests/Feature/AdminComponentsCssPlatformOrdersTableMinWidthTest.php

36 lines
1.0 KiB
PHP

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminComponentsCssPlatformOrdersTableMinWidthTest 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_defines_min_width_for_compact_and_full_platform_orders_table(): void
{
$this->loginAsPlatformAdmin();
$css = file_get_contents(public_path('css/admin-components.css'));
$this->assertIsString($css);
$this->assertStringContainsString('.platform-orders-table.is-compact{', $css);
$this->assertStringContainsString('min-width:1400px', $css);
$this->assertStringContainsString('.platform-orders-table.is-full{', $css);
$this->assertStringContainsString('min-width:2000px', $css);
}
}