Skip to content

Commit f3cd729

Browse files
committed
Fix failing e2e tests
1 parent 194f16a commit f3cd729

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/block-library/src/navigation-link/edit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ function NavigationLinkEdit( {
157157
<div className="wp-block-navigation-link__content">
158158
<RichText
159159
tagName="span"
160+
className="wp-block-navigation-link__label"
160161
value={ label }
161162
onChange={ ( labelValue ) => setAttributes( { label: labelValue } ) }
162163
placeholder={ itemLabelPlaceholder }

packages/block-library/src/navigation/index.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,10 @@ function build_navigation_html( $attributes, $block, $colors, $font_sizes, $is_l
205205
// End appending HTML attributes to anchor tag.
206206

207207
// Start anchor tag content.
208-
$html .= '><span>'; // Wrap title with span to isolate it from submenu icon.
208+
$html .= '>' .
209+
// Wrap title with span to isolate it from submenu icon.
210+
'<span class="wp-block-navigation-link__label">';
211+
209212
if ( isset( $block['attrs']['label'] ) ) {
210213
$html .= wp_kses(
211214
$block['attrs']['label'],

packages/e2e-tests/specs/editor/blocks/navigation.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ async function updateActiveNavigationLink( { url, label } ) {
5959
}
6060

6161
if ( label ) {
62-
await page.click( '.wp-block-navigation-link__content.is-selected' );
62+
await page.click( '.wp-block-navigation-link__label.is-selected' );
6363

6464
// Ideally this would be `await pressKeyWithModifier( 'primary', 'a' )`
6565
// to select all text like other tests do.

0 commit comments

Comments
 (0)