The issue describes a clear test failure with specific reproduction steps for a navigation block appender visibility problem.
The issue reports that the navigation block appender doesn't show when selecting a refless navigation block, with a clear test case provided. The problem appears isolated to block selection behavior and has a defined test for verification. No major blockers are apparent beyond understanding the navigation block's selection logic.
When selecting a refless navigation block, the navigation block appender does not show.
You can add this to the navigation.spec.js file to see the test failure. Claude hasn't been helpful in fixing it yet.
test( 'shows add block appender when selecting navigation link in direct content navigation', async ( {
admin,
editor,
navigation,
page,
requestUtils,
} ) => {
// Test 1: Direct content navigation (no ref)
await admin.createNewPost();
await editor.insertBlock( {
name: 'core/navigation',
attributes: {
overlayMenu: 'never',
layout: { type: 'flex', orientation: 'vertical' },
},
innerBlocks: [
{
name: 'core/navigation-link',
attributes: { label: 'Direct 1', url: '#' },
},
{
name: 'core/navigation-link',
attributes: { label: 'Direct 2', url: '#' },
},
],
} );
const navBlock = navigation.getNavBlock();
await expect( navBlock ).toBeVisible();
const navLink = editor.canvas
.getByRole( 'document', { name: 'Block: Custom Link' } )
.filter( { hasText: 'Direct 1' } );
// First click on direct content navigation link
await navLink.click();
// Check: The parent block should be selected on first click
expect( navBlock ).toHaveClass( /is-selected/ );
// Check: Appender should be visible
const appenderDirect = navigation.getNavBlockInserter();
await expect( appenderDirect ).toBeVisible();
// Click the custom link again and check that it is selected and the appender is still visible
await navLink.click();
expect( navLink ).toHaveClass( /is-selected/ );
await expect( appenderDirect ).toBeVisible();
} );
Run the test with npm run test:e2e test/e2e/specs/editor/blocks/navigation.spec.js -- -g 'shows add block appender when selecting navigation link in direct content navigation'
<!-- wp:navigation {"overlayMenu":"never","layout":{"type":"flex","orient
Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!