assertTrue(IsolatedQaDatabase::allowsSchemaChanges()); $directory = getenv('EDITORIAL_QA_BUILD_DIRECTORY') ?: 'build'; $manifest = json_decode(file_get_contents(public_path($directory.'/manifest.json')), true, 512, JSON_THROW_ON_ERROR); $key = 'resources/js/pages/management/editorial-workflow.tsx'; $this->assertArrayHasKey($key, $manifest, 'The authenticated dashboard must be a compiled page entry, not only a shared chunk.'); $this->app->make(Vite::class)->useBuildDirectory($directory)->useHotFile(storage_path('phpunit-no-vite-hot')); config(['portal.qa_build_directory' => $directory, 'editorial_workflow.enabled' => true, 'portal.profile_access_enabled' => false]); $actor = User::factory()->create(); config(['portal.managers' => [$actor->email]]); $this->actingAsWithMfa($actor); foreach (['/management/editorial', '/management/editorial?kind=legislation'] as $url) { $this->get($url, ['Accept' => 'text/html'])->assertOk()->assertSee('data-page=', false)->assertSee($manifest[$key]['file'], false); } } }