← ClaudeAtlas

orbit-block-edit-testlisted

Playwright tests for the editor-time experience of every Gutenberg block — insert, configure attributes via inspector controls, set alignment / colour / spacing, transform to/from other blocks, validate inner-block patterns, undo/redo. Use when the user says "block edit test", "test InspectorControls", "block toolbar test", "edit-time spec", or after adding any custom InspectorControls to a block.
adityaarsharma/orbit · ★ 1 · Testing & QA · score 55
Install: claude install-skill adityaarsharma/orbit
# 🪐 orbit-block-edit-test — Editor-time UX coverage Render tests cover frontend output. This skill covers the editor experience — the part users feel before publishing. --- ## Quick start ```bash PLUGIN_SLUG=my-plugin npx playwright test --project=block-edit ``` --- ## What it checks ### 1. Block insertion + ready state ```js test('Insert via inserter', async ({ admin, editor, page }) => { await admin.createNewPost(); await editor.insertBlock({ name: 'my-plugin/example' }); await expect(page.locator('[data-type="my-plugin/example"]')).toBeVisible(); await expect(page.locator('.my-block-edit')).toContainText(/.+/); }); ``` ### 2. InspectorControls present + functional **Whitepaper intent:** Every attribute declared in block.json should be editable somewhere — inspector panel, block toolbar, or block content. Attributes with no editor surface are dead code. ```js test('Title is editable via inspector', async ({ editor, page }) => { await editor.insertBlock({ name: 'my-plugin/example' }); await page.getByRole('textbox', { name: 'Title' }).fill('Hello'); await expect(page.locator('[data-block]')).toContainText('Hello'); }); ``` ### 3. Block toolbar (alignment, formatting, transform) ```js await page.getByRole('button', { name: 'Align' }).click(); await page.getByRole('menuitem', { name: 'Wide width' }).click(); await expect(page.locator('[data-align="wide"]')).toBeVisible(); ``` ### 4. Transforms work both directions ```js // my-plugin/example → core/pa