## Summary - move the Laravel application into `apps/platform` and keep the repository root for orchestration, docs, and tooling - update the local command model, Sail/Docker wiring, runtime paths, and ignore rules around the new platform location - add relocation quickstart/contracts plus focused smoke coverage for bootstrap, command model, routes, and runtime behavior ## Validation - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/PlatformRelocation` - integrated browser smoke validated `/up`, `/`, `/admin`, `/admin/choose-workspace`, and tenant route semantics for `200`, `403`, and `404` ## Remaining Rollout Checks - validate Dokploy build context and working-directory assumptions against the new `apps/platform` layout - confirm web, queue, and scheduler processes all start from the expected working directory in staging/production - verify no legacy volume mounts or asset-publish paths still point at the old root-level `public/` or `storage/` locations Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #213
51 lines
2.0 KiB
PHP
51 lines
2.0 KiB
PHP
<?php
|
|
|
|
use App\Services\Intune\PolicyNormalizer;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
beforeEach(function () {
|
|
$this->normalizer = app(PolicyNormalizer::class);
|
|
});
|
|
|
|
it('normalizes settings catalog settings into key value entries', function () {
|
|
$snapshot = [
|
|
'@odata.type' => '#microsoft.graph.deviceManagementConfigurationPolicy',
|
|
'settings' => [
|
|
[
|
|
'settingInstance' => [
|
|
'@odata.type' => '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance',
|
|
'settingDefinitionId' => 'device_vendor_msft_policy_config_system_minimumpinlength',
|
|
'simpleSettingValue' => [
|
|
'value' => 12,
|
|
],
|
|
],
|
|
],
|
|
[
|
|
'settingInstance' => [
|
|
'@odata.type' => '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance',
|
|
'settingDefinitionId' => 'device_vendor_msft_policy_config_winhello_usebiometrics',
|
|
'choiceSettingValue' => [
|
|
'value' => 'device_vendor_msft_policy_config_winhello_usebiometrics_true',
|
|
],
|
|
],
|
|
],
|
|
],
|
|
];
|
|
|
|
$result = $this->normalizer->normalize($snapshot, 'settingsCatalogPolicy', 'windows');
|
|
|
|
expect($result['status'])->toBe('success');
|
|
expect($result)->toHaveKey('settings_table');
|
|
$rows = $result['settings_table']['rows'];
|
|
expect($rows[0]['definition'])->toContain('Minimum'); // Prettified display name
|
|
expect($rows[0]['data_type'])->toBe('Number'); // User-friendly type
|
|
expect($rows[0]['value'])->toBe('12');
|
|
expect($rows[0])->toHaveKey('category');
|
|
expect($rows[0])->toHaveKey('description');
|
|
expect($rows[1]['definition'])->toContain('Winhello'); // Prettified display name
|
|
expect($rows[1]['data_type'])->toBe('Choice'); // User-friendly type
|
|
expect($rows[1]['value'])->toBe('Enabled'); // Formatted from choice value
|
|
});
|