Problem/Motivation

#2301317: MenuLinkNG part4: Conversion added title attributes to modules' Configure links, but forgot to set route parameters on route objects before getting their titles. \Drupal\system\Form\ModulesListFormWebTest should have caught this, but didn't. This problem can be reproduced by installing Payment's submodules and going to admin/modules.

Proposed resolution

Set route parameters on the route object before getting its title.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Comments

xano’s picture

Status: Active » Needs review
Issue tags: +Needs tests
StatusFileSize
new906 bytes

I'll have to look into test coverage, but at least this fix illustrates what was wrong.

Status: Needs review » Needs work

The last submitted patch, 1: drupal_2322933_1.patch, failed testing.

xano’s picture

Status: Needs work » Needs review
StatusFileSize
new2.03 KB
dawehner’s picture

It would be cool to though still check in ModulesListFormWebTest that the link is generated with the proper title.

xano’s picture

StatusFileSize
new633 bytes
new2.65 KB

Xano ♥ XPath

dawehner’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests
+++ b/core/modules/system/src/Tests/Form/ModulesListFormWebTest.php
@@ -38,6 +38,6 @@ public function testModuleListForm() {
-    $this->assertLinkByHref('configure/bar');
+    $this->assertFieldByXPath("//a[contains(@href, '/system-test/configure/bar') and @title='Bar.bar']");

Just in case you didn't knew there is $this->cssSelect() for other tests available.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed f3c0bc0 and pushed to 8.0.x. Thanks!

  • alexpott committed f3c0bc0 on 8.0.x
    Issue #2322933 by Xano: Fixed Module list form fatals due to incorrect...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.