mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 07:27:47 +00:00
This commit is contained in:
parent
414ca47cbf
commit
f1d5c196e8
8 changed files with 544 additions and 618 deletions
|
|
@ -573,7 +573,7 @@ test('plugin caches image until data is stale', function () {
|
|||
|
||||
expect($thirdResponse['filename'])
|
||||
->not->toBe($firstResponse['filename']);
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
test('plugins in playlist are rendered in order', function () {
|
||||
// Create source device with a playlist
|
||||
|
|
@ -677,7 +677,7 @@ test('plugins in playlist are rendered in order', function () {
|
|||
$thirdResponse->assertOk();
|
||||
expect($thirdResponse['filename'])
|
||||
->not->toBe($secondResponse['filename']);
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
test('display endpoint updates last_refreshed_at timestamp', function () {
|
||||
$device = Device::factory()->create([
|
||||
|
|
@ -787,7 +787,7 @@ test('display endpoint handles mashup playlist items correctly', function () {
|
|||
// Verify the playlist item was marked as displayed
|
||||
$playlistItem->refresh();
|
||||
expect($playlistItem->last_displayed_at)->not->toBeNull();
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
test('device in sleep mode returns sleep image and correct refresh rate', function () {
|
||||
$device = Device::factory()->create([
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ test('it generates screen images and updates device', function () {
|
|||
// Assert both PNG and BMP files were created
|
||||
$uuid = $device->current_screen_image;
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
test('it cleans up unused images', function () {
|
||||
// Create some test devices with images
|
||||
|
|
@ -45,7 +45,7 @@ test('it cleans up unused images', function () {
|
|||
Storage::disk('public')->assertMissing('/images/generated/uuid-to-be-replaced.bmp');
|
||||
Storage::disk('public')->assertMissing('/images/generated/inactive-uuid.png');
|
||||
Storage::disk('public')->assertMissing('/images/generated/inactive-uuid.bmp');
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
test('it preserves gitignore file during cleanup', function () {
|
||||
Storage::disk('public')->put('/images/generated/.gitignore', '*');
|
||||
|
|
@ -55,4 +55,4 @@ test('it preserves gitignore file during cleanup', function () {
|
|||
$job->handle();
|
||||
|
||||
Storage::disk('public')->assertExists('/images/generated/.gitignore');
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ it('generates image for device without device model', function (): void {
|
|||
|
||||
// Assert PNG file was created
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('generates image for device with device model', function (): void {
|
||||
// Create a DeviceModel
|
||||
|
|
@ -64,7 +64,7 @@ it('generates image for device with device model', function (): void {
|
|||
|
||||
// Assert PNG file was created
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('generates 4-color 2-bit PNG with device model', function (): void {
|
||||
// Create a DeviceModel for 4-color, 2-bit PNG
|
||||
|
|
@ -125,7 +125,7 @@ it('generates 4-color 2-bit PNG with device model', function (): void {
|
|||
|
||||
imagedestroy($image);
|
||||
expect($hasContent)->toBe(true, 'Image should contain visible content');
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('generates BMP with device model', function (): void {
|
||||
// Create a DeviceModel for BMP format
|
||||
|
|
@ -155,7 +155,7 @@ it('generates BMP with device model', function (): void {
|
|||
|
||||
// Assert BMP file was created
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.bmp");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('applies scale factor from device model', function (): void {
|
||||
// Create a DeviceModel with scale factor
|
||||
|
|
@ -185,7 +185,7 @@ it('applies scale factor from device model', function (): void {
|
|||
|
||||
// Assert PNG file was created
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('applies rotation from device model', function (): void {
|
||||
// Create a DeviceModel with rotation
|
||||
|
|
@ -215,7 +215,7 @@ it('applies rotation from device model', function (): void {
|
|||
|
||||
// Assert PNG file was created
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('applies offset from device model', function (): void {
|
||||
// Create a DeviceModel with offset
|
||||
|
|
@ -245,7 +245,7 @@ it('applies offset from device model', function (): void {
|
|||
|
||||
// Assert PNG file was created
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('falls back to device settings when no device model', function (): void {
|
||||
// Create a device with custom settings but no DeviceModel
|
||||
|
|
@ -265,7 +265,7 @@ it('falls back to device settings when no device model', function (): void {
|
|||
|
||||
// Assert PNG file was created
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('handles auto image format for legacy devices', function (): void {
|
||||
// Create a device with AUTO format (legacy behavior)
|
||||
|
|
@ -286,7 +286,7 @@ it('handles auto image format for legacy devices', function (): void {
|
|||
|
||||
// Assert PNG file was created (modern firmware defaults to PNG)
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('cleanupFolder removes unused images', function (): void {
|
||||
// Create active devices with images
|
||||
|
|
@ -309,7 +309,7 @@ it('cleanupFolder removes unused images', function (): void {
|
|||
// Assert inactive files are removed
|
||||
Storage::disk('public')->assertMissing('/images/generated/inactive-uuid.png');
|
||||
Storage::disk('public')->assertMissing('/images/generated/another-inactive.png');
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('cleanupFolder preserves .gitignore', function (): void {
|
||||
// Create gitignore file
|
||||
|
|
@ -323,7 +323,7 @@ it('cleanupFolder preserves .gitignore', function (): void {
|
|||
|
||||
// Assert gitignore is preserved
|
||||
Storage::disk('public')->assertExists('/images/generated/.gitignore');
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('resetIfNotCacheable resets when device models exist', function (): void {
|
||||
// Create a plugin
|
||||
|
|
@ -340,7 +340,7 @@ it('resetIfNotCacheable resets when device models exist', function (): void {
|
|||
// Assert plugin image was reset
|
||||
$plugin->refresh();
|
||||
expect($plugin->current_image)->toBeNull();
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('resetIfNotCacheable resets when custom dimensions exist', function (): void {
|
||||
// Create a plugin
|
||||
|
|
@ -358,7 +358,7 @@ it('resetIfNotCacheable resets when custom dimensions exist', function (): void
|
|||
// Assert plugin image was reset
|
||||
$plugin->refresh();
|
||||
expect($plugin->current_image)->toBeNull();
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('resetIfNotCacheable preserves image for standard devices', function (): void {
|
||||
// Create a plugin
|
||||
|
|
@ -377,7 +377,7 @@ it('resetIfNotCacheable preserves image for standard devices', function (): void
|
|||
// Assert plugin image was preserved
|
||||
$plugin->refresh();
|
||||
expect($plugin->current_image)->toBe('test-uuid');
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('determines correct image format from device model', function (): void {
|
||||
// Test BMP format detection
|
||||
|
|
@ -422,7 +422,7 @@ it('determines correct image format from device model', function (): void {
|
|||
$device3->refresh();
|
||||
expect($device3->current_screen_image)->toBe($uuid3);
|
||||
Storage::disk('public')->assertExists("/images/generated/{$uuid3}.png");
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
||||
it('generates BMP for legacy device with bmp3_1bit_srgb format', function (): void {
|
||||
// Create a device with BMP format but no DeviceModel (legacy behavior)
|
||||
|
|
@ -454,4 +454,4 @@ it('generates BMP for legacy device with bmp3_1bit_srgb format', function (): vo
|
|||
expect($imageInfo[0])->toBe(800); // Width
|
||||
expect($imageInfo[1])->toBe(480); // Height
|
||||
expect($imageInfo[2])->toBe(IMAGETYPE_BMP); // BMP type
|
||||
})->skipOnGitHubActions();
|
||||
})->skipOnCi();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue