diff --git a/tests/src/Functional/UpgradeStatusUiTest.php b/tests/src/Functional/UpgradeStatusUiTest.php index 1acf5d5..4ad6a69 100644 --- a/tests/src/Functional/UpgradeStatusUiTest.php +++ b/tests/src/Functional/UpgradeStatusUiTest.php @@ -51,7 +51,7 @@ class UpgradeStatusUiTest extends UpgradeStatusTestBase { $assert_session->buttonExists('Export selected as HTML'); // Error and no-error test module results should show. - $this->assertSame('5 problems', strip_tags($page->find('css', 'tr.project-upgrade_status_test_error td.scan-result')->getHtml())); + $this->assertSame($this->getDrupalCoreMajorVersion() < 9 ? '5 problems' : '6 problems', strip_tags($page->find('css', 'tr.project-upgrade_status_test_error td.scan-result')->getHtml())); $this->assertSame($this->getDrupalCoreMajorVersion() < 9 ? 'No problems found' : '1 problem', strip_tags($page->find('css', 'tr.project-upgrade_status_test_9_compatible td.scan-result')->getHtml())); $this->assertSame('No problems found', strip_tags($page->find('css', 'tr.project-upgrade_status_test_10_compatible td.scan-result')->getHtml())); @@ -66,8 +66,8 @@ class UpgradeStatusUiTest extends UpgradeStatusTestBase { $next_major = $this->getDrupalCoreMajorVersion() + 1; $this->assertSession()->linkByHrefExists('https://drupal.org/project/issues/upgrade_status_test_contributed_9_compatible?text=Drupal+' . $next_major . '&status=All'); - // Click the first '5 problems' link. Should be the custom project. - $this->clickLink('5 problems', 1); + // This should be the custom project. + $this->clickLink($this->getDrupalCoreMajorVersion() < 9 ? '5 problems' : '6 problems', 1); $this->assertText('Upgrade status test error'); $this->assertText('2 errors found. 3 warnings found.'); $this->assertText('Syntax error, unexpected T_STRING on line 3'); @@ -84,7 +84,7 @@ class UpgradeStatusUiTest extends UpgradeStatusTestBase { // Go back to the listing page and click over to exporting in single ASCII. $this->drupalGet(Url::fromRoute('upgrade_status.report')); - $this->clickLink('5 problems', 1); + $this->clickLink($this->getDrupalCoreMajorVersion() < 9 ? '5 problems' : '6 problems', 1); $this->clickLink('Export as text'); $this->assertText('Upgrade status test error'); $this->assertText('CUSTOM PROJECTS');