We need to add JS tests for:

1. Ensuring that the Pathauto checkbox behavior works, that it disables the manual URL alias textfield when checked.

Issue fork pathauto-2705945

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Dave Reid created an issue. See original summary.

mably’s picture

Amazingly, 10 years later, this basic test still seems missing.

Let's try to fix that.

mably’s picture

mably’s picture

Status: Active » Needs review
mably’s picture

Assigned: Unassigned » berdir

Code review of MR #120

The commit adds the missing FunctionalJavascript test for the pathauto widget checkbox behavior, as requested in the issue.

Test coverage

PathautoWidgetTest::testPathautoWidget() verifies the full interaction cycle on the node form:

  1. Default state: pathauto checkbox is checked, summary shows "Automatic alias", alias field is disabled.
  2. Uncheck pathauto: summary changes to "No alias", alias field becomes enabled.
  3. Type a custom alias: summary updates to "Alias: /my-custom-alias".
  4. Re-check pathauto: summary goes back to "Automatic alias", alias field is disabled again.

The test correctly handles the vertical tabs UI by clicking the tab menu link rather than the <summary> element, and uses trigger('formUpdated') to force summary recalculation after filling in the alias field.