Deploy HickLab3D Dashboard / Deploy to production (push) Failing after 23s
Replace the old touchmark/PNG identity with the supplied lockup and monogram, segmented role-aware navigation, Live/Draft listing filters with generation-based cache invalidation, and admin Projects covering immutable file revisions, listing live pointers, and exact-decimal filament/packaging/shipping costing. Additive schema only; no Etsy publication. Isolated clone tests: 301 tests, 1162 assertions.
62 lines
2.6 KiB
PHP
62 lines
2.6 KiB
PHP
<?php
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
|
|
use Tests\TestCase;
|
|
|
|
class BrandAssetsTest extends TestCase
|
|
{
|
|
use LazilyRefreshDatabase;
|
|
|
|
/** @var array<string, string> */
|
|
private const EXPECTED_SHA256 = [
|
|
'hl3d-lockup-dark-background.svg' => '609328a1f100fa5ed12fc5c59116c6e00e79faf9c22dfce745b0a8c05b3d0fa2',
|
|
'hl3d-lockup-light-background.svg' => '9561e36ece9abb8596921cdb530cb2bebc4f475dffc7150aed3c526811fe3af6',
|
|
'hl3d-lockup-mono-black.svg' => '4776441a3aba2b4c28768edb50717e4f6ac4e92e9fa8398c4b8b954170d2ecdd',
|
|
'hl3d-lockup-mono-white.svg' => 'cd55fb8d459f145bd0c9ace5f3cec0f2be875cdb6d5700f32dccd47e64af623a',
|
|
'hl3d-monogram-dark-background.svg' => '3ec17182fa2a408cfcaf8a1f6fa04cfd2d23ce661ebe8b94c8a1f4023224d3f8',
|
|
'hl3d-monogram-light-background.svg' => '134493cbe99c171bf6b10fa93c3910fc9ea6a52806f17455c06762b3fedeca13',
|
|
'hl3d-touchmark.svg' => 'add1001f0344d3a577bcd37dd66568a2c63a7e8b81ba1dc723e8aebc00cf81bc',
|
|
'hl3d-touchmark-white.svg' => '364c63cc996fe96b7ca6ae96dfed59fc6b2924c000438f16ee130931971739b1',
|
|
];
|
|
|
|
public function test_copied_brand_assets_match_supplied_checksums_exactly(): void
|
|
{
|
|
foreach (self::EXPECTED_SHA256 as $filename => $sha256) {
|
|
$path = public_path('branding/'.$filename);
|
|
$this->assertFileExists($path, "Missing supplied brand asset: {$filename}");
|
|
$this->assertSame($sha256, hash_file('sha256', $path), "Checksum mismatch for {$filename}");
|
|
}
|
|
}
|
|
|
|
public function test_dashboard_does_not_fetch_external_fonts(): void
|
|
{
|
|
$user = User::factory()->create();
|
|
|
|
$this->actingAs($user)->get(route('dashboard'))->assertOk()
|
|
->assertDontSee('fonts.googleapis.com', false)
|
|
->assertDontSee('fonts.gstatic.com', false)
|
|
->assertDontSee('fonts.bunny.net', false);
|
|
}
|
|
|
|
public function test_login_page_uses_approved_light_lockup_and_no_external_fonts(): void
|
|
{
|
|
$this->get(route('login'))->assertOk()
|
|
->assertSee('branding/hl3d-lockup-light-background.svg', false)
|
|
->assertDontSee('fonts.googleapis.com', false)
|
|
->assertDontSee('fonts.bunny.net', false);
|
|
}
|
|
|
|
public function test_layout_uses_monogram_for_sidebar_and_favicon(): void
|
|
{
|
|
$user = User::factory()->create();
|
|
|
|
$this->actingAs($user)->get(route('dashboard'))->assertOk()
|
|
->assertSee('branding/hl3d-monogram-dark-background.svg', false)
|
|
->assertDontSee('hicklab3d-touchmark.svg', false)
|
|
->assertDontSee('e3f504', false);
|
|
}
|
|
}
|