Add templates, tests, and miscellaneous project files

Includes new page templates (fitness-gym, nonprofit, online-course,
photography-studio, real-estate, startup-company, travel-blog,
wedding-invitation) with thumbnail SVGs, test specs, documentation
files, and minor updates to index.html, router.php, and playwright config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 14:15:58 -08:00
parent 03f573b451
commit b511a6684d
61 changed files with 6919 additions and 6 deletions

View File

@@ -0,0 +1,46 @@
const { test, expect } = require('@playwright/test');
const { waitForEditor } = require('./helpers');
test.describe('Debug Media Category Blocks', () => {
test('investigate what blocks are in Media category', async ({ page }) => {
await waitForEditor(page);
// Check all registered blocks via the GrapesJS API
const blockManagerInfo = await page.evaluate(() => {
const editor = window.editor;
if (!editor) return { error: 'No editor found' };
const blockManager = editor.BlockManager;
const allBlocks = blockManager.getAll();
const blockInfo = allBlocks.map(block => {
const cat = block.get('category');
return {
id: block.id,
label: block.get('label'),
category: typeof cat === 'string' ? cat : (cat && cat.id),
};
});
const mediaBlocks = blockInfo.filter(b => b.category === 'Media');
return {
totalBlocks: allBlocks.length,
blocks: blockInfo,
mediaBlocks: mediaBlocks
};
});
console.log('Total blocks registered:', blockManagerInfo.totalBlocks);
console.log('Media category blocks:', JSON.stringify(blockManagerInfo.mediaBlocks, null, 2));
// Verify we have at least 3 media blocks
expect(blockManagerInfo.mediaBlocks.length).toBeGreaterThanOrEqual(3);
// Verify expected blocks are present
const mediaIds = blockManagerInfo.mediaBlocks.map(b => b.id);
expect(mediaIds).toContain('image-block');
expect(mediaIds).toContain('video-block');
expect(mediaIds).toContain('file-embed');
});
});