Initial Commit
This commit is contained in:
@@ -39,4 +39,14 @@ final class TenantThemeResolverTest extends TestCase
|
||||
|
||||
$this->assertSame('backend', app(TenantThemeResolver::class)->context());
|
||||
}
|
||||
public function test_authentication_requests_use_backend_context(): void
|
||||
{
|
||||
foreach (['/login', '/register', '/forgot-password', '/reset-password/token', '/user/confirm-password', '/two-factor-challenge', '/email/verify'] as $uri) {
|
||||
$request = Request::create($uri, 'GET');
|
||||
$this->app->instance('request', $request);
|
||||
|
||||
$this->assertSame('backend', app(TenantThemeResolver::class)->context(), $uri);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,15 @@ final class ThemeManifestTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function test_bundled_default_themes_have_valid_manifests(): void
|
||||
{
|
||||
foreach (['backend', 'frontend'] as $key) {
|
||||
$theme = app(Loader::class)->fromPath(resource_path("themes/{$key}"));
|
||||
|
||||
$this->assertSame($key, $theme->key());
|
||||
}
|
||||
}
|
||||
|
||||
public function test_manifest_is_normalised(): void
|
||||
{
|
||||
$path = $this->themesPath.'/sample';
|
||||
|
||||
@@ -29,4 +29,17 @@ final class WelcomeThemeViewTest extends TestCase
|
||||
view('welcome')->getPath(),
|
||||
);
|
||||
}
|
||||
public function test_application_views_exist_only_inside_themes(): void
|
||||
{
|
||||
$this->assertDirectoryDoesNotExist(resource_path('views'));
|
||||
$this->assertDirectoryDoesNotExist(resource_path('css'));
|
||||
$this->assertDirectoryDoesNotExist(resource_path('js'));
|
||||
}
|
||||
|
||||
public function test_backend_compiled_assets_are_owned_by_the_backend_theme(): void
|
||||
{
|
||||
$this->assertFileExists(resource_path('themes/backend/assets/css/app.css'));
|
||||
$this->assertFileExists(resource_path('themes/backend/assets/js/passkeys.js'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user