neues Admin UI Layout eingeführt. Alle Tests auf den neusten Stand gebracht.
This commit is contained in:
@@ -44,6 +44,7 @@ class EventAchievementsLocaleTest extends TestCase
|
||||
'emotion_id' => $emotion->id,
|
||||
'likes_count' => 42,
|
||||
'guest_name' => 'LocaleTester',
|
||||
'status' => 'approved',
|
||||
]);
|
||||
|
||||
$responseEn = $this->withHeaders(['X-Device-Id' => 'LocaleTester'])
|
||||
|
||||
@@ -75,7 +75,7 @@ class EventBrandingResponseTest extends TestCase
|
||||
$response->assertJsonPath('branding.typography.heading', 'Playfair Display');
|
||||
$response->assertJsonPath('branding.typography.size', 'l');
|
||||
$response->assertJsonPath('branding.logo.mode', 'upload');
|
||||
$this->assertStringContainsString('/storage/', (string) $response->json('branding.logo.value'));
|
||||
$this->assertStringContainsString('/api/v1/branding/asset/', (string) $response->json('branding.logo.value'));
|
||||
$response->assertJsonPath('branding.logo.position', 'center');
|
||||
$response->assertJsonPath('branding.buttons.style', 'outline');
|
||||
$response->assertJsonPath('branding.buttons.radius', 18);
|
||||
|
||||
@@ -43,6 +43,7 @@ class EventPhotosLocaleTest extends TestCase
|
||||
'task_id' => $task->id,
|
||||
'emotion_id' => $emotion->id,
|
||||
'created_at' => now(),
|
||||
'status' => 'approved',
|
||||
]);
|
||||
|
||||
$responseEn = $this->withHeaders(['X-Device-Id' => 'device-123'])
|
||||
|
||||
@@ -48,17 +48,14 @@ class EventTasksLocaleTest extends TestCase
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertHeader('X-Content-Locale', 'en');
|
||||
$response->assertJsonCount(1);
|
||||
$response->assertJson([[
|
||||
'id' => $task->id,
|
||||
'title' => 'Kiss Moment',
|
||||
'description' => 'EN Description',
|
||||
'instructions' => 'EN Instructions',
|
||||
'duration' => 3,
|
||||
'is_completed' => false,
|
||||
]]);
|
||||
|
||||
$this->assertSame('emotion-'.$emotion->id, $response->json('0.emotion.slug'));
|
||||
$response->assertJsonCount(1, 'data');
|
||||
$response->assertJsonPath('data.0.id', $task->id);
|
||||
$response->assertJsonPath('data.0.title', 'Kiss Moment');
|
||||
$response->assertJsonPath('data.0.description', 'EN Description');
|
||||
$response->assertJsonPath('data.0.instructions', 'EN Instructions');
|
||||
$response->assertJsonPath('data.0.duration', 3);
|
||||
$response->assertJsonPath('data.0.is_completed', false);
|
||||
$response->assertJsonPath('data.0.emotion.slug', 'emotion-'.$emotion->id);
|
||||
}
|
||||
|
||||
public function test_it_falls_back_to_event_locale_when_locale_invalid(): void
|
||||
@@ -91,8 +88,6 @@ class EventTasksLocaleTest extends TestCase
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertHeader('X-Content-Locale', 'de');
|
||||
$response->assertJson([[
|
||||
'title' => 'Aufgabe',
|
||||
]]);
|
||||
$response->assertJsonPath('data.0.title', 'Aufgabe');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user