Make WordPress Core

Changeset 65321


Ignore:
Timestamp:
11/06/2026 09:33:13 PM (less than one hour ago)
Author:
lancewillett
Message:

Tests: Use a distinct slug in the taxonomy E2E test.

The "adds a term" test gave the new term the same name and slug, so its Slug column check passed even if the column showed the name, or if the slug field were ignored. The test now enters a different slug and checks that the Slug column shows it.

Follow-up to [64738], [65275].

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/15516

Props adrianmoldovanwp.
See #66455.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/e2e/specs/taxonomies.test.js

    r65275 r65321  
    6060                test( 'adds a term', async ( { admin, page } ) => {
    6161                        const name = `${ prefix }-new`;
     62                        const slug = `${ name }-slug`;
    6263                        await admin.visitAdminPage(
    6364                                '/edit-tags.php',
    … …  
    7071                        await form
    7172                                .getByRole( 'textbox', { name: 'Slug', exact: true } )
    72                                 .fill( name );
     73                                .fill( slug );
    7374                        await form
    7475                                .getByRole( 'button', { name: `Add ${ label }`, exact: true } )
    … …  
    8990                                        .getByRole( 'row' )
    9091                                        .filter( { has: link } )
    91                                         .getByRole( 'cell', { name, exact: true } )
     92                                        .getByRole( 'cell', { name: slug, exact: true } )
    9293                        ).toBeVisible();
    9394                } );
Note: See TracChangeset for help on using the changeset viewer.