feat(bootstrap): fall back to built-in placeholder when marketplace unpublished
Adds published: boolean to the bootstrap wire contract. ConfigService swaps to a new DEFAULT_BOOTSTRAP constant (all feature flags on, generic branding/theme/pages) whenever the backend reports published: false, so an unpublished marketplace renders a working demo instead of a blank or broken page. Missing published field stays backward compatible (treated as true). Documents the brand bootstrap wire shape for backend/ops use. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,4 +32,22 @@ test.describe('smoke', () => {
|
||||
|
||||
expect(errors, `console errors on first paint: ${errors.join('\n')}`).toEqual([]);
|
||||
});
|
||||
|
||||
test('renders the placeholder home page when the marketplace is unpublished', async ({ page }) => {
|
||||
// This suite runs against the mock-data build (see comment at the top of
|
||||
// playwright.config.ts), so MockBootstrapProvider fetches this static
|
||||
// asset rather than a live /bootstrap endpoint - that's the URL to
|
||||
// intercept here, not the real API path.
|
||||
await page.route('**/assets/mock/bootstrap/bootstrap.json', route =>
|
||||
route.fulfill({
|
||||
status: 200,
|
||||
contentType: 'application/json',
|
||||
body: JSON.stringify({ schemaVersion: '1.0.0', generatedAt: new Date().toISOString(), published: false }),
|
||||
})
|
||||
);
|
||||
|
||||
await page.goto('/');
|
||||
|
||||
await expect(page.getByText('Welcome to Marketplace')).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user