Problem/Motivation

https://dispatcher.drupalci.org/job/drupal8_core_regression_tests/82344/...

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

catch created an issue. See original summary.

catch’s picture

catch’s picture

Status: Active » Needs review
StatusFileSize
new7.18 KB

Here's a start.

catch’s picture

StatusFileSize
new7.99 KB

This should resolve most/all of the help_topics failures.

catch’s picture

StatusFileSize
new8.87 KB

This fixes fatal errors in a locale test but not the actual failure, which might be down to l.d.o

The last submitted patch, 3: 3359077.patch, failed testing. View results

The last submitted patch, 4: 3359077-4.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 5: 3359077-5.patch, failed testing. View results

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new11.83 KB

Skipping the remaining tests for now. We can probably make them work with 11.x (not sure if they should though), but no idea what we'll do once we have a 'main' branch with no version number.

Status: Needs review » Needs work

The last submitted patch, 9: 3359077-9.patch, failed testing. View results

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new11.32 KB

The two locale tests are failing in ::setUp() before we try to skip the test, so also need an early return.

catch’s picture

StatusFileSize
new11.58 KB

Thanks phpcs...

alexpott’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherUserTest.php
    @@ -91,7 +91,7 @@ public function providerShowAnnouncements(): array {
    -          'version' => '^10',
    +          'version' => '^11',
    

    I think it's worth making this dynamic so we don't have to change this on every major Drupal version.

  2. +++ b/core/modules/locale/tests/src/Functional/LocaleNonInteractiveInstallTest.php
    @@ -32,7 +32,10 @@ protected function getVersionStringToTest() {
        * {@inheritdoc}
        */
       protected function installParameters() {
    +    // phpcs:disable
         $parameters = parent::installParameters();
    +    // Skipped because this branch can't be translated.
    +    return $parameters;
         // Install Drupal in German.
         $parameters['parameters']['langcode'] = 'de';
         // Create a po file so we don't attempt to download one from
    @@ -49,12 +52,15 @@ protected function installParameters() {
    
    @@ -49,12 +52,15 @@ protected function installParameters() {
         $version = $this->getVersionStringToTest();
         file_put_contents($this->publicFilesDirectory . "/translations/drupal-{$version}.de.po", $contents);
         return $parameters;
    +    // phpcs::enable
       }
     
       /**
        * Tests that the expected translated text appears on the login screen.
        */
       public function testInstallerTranslations() {
    +    // Skipped because this branch can't be translated.
    +    $this->markTestSkipped();
         $this->drupalGet('user/login');
         // cSpell:disable-next-line
         $this->assertSession()->responseContains('Geben sie das Passwort für ihren Benutzernamen ein.');
    

    Let's add a skip test in a new setUp implementation - then we wouldn't need to mess with PHPCS

alexpott’s picture

What I mean by #13.2 is add this:

  /**
   * {@inheritdoc}
   */
  protected function setUp(): void {
    // Skipped because this branch can't be translated.
    $this->markTestSkipped();
    parent::setUp();
  }

Calling $this->markTestSkipped(); prior to the parent::setUp() is the most efficient way to skip a test as you don't even do an install.

catch’s picture

Status: Needs work » Needs review
StatusFileSize
new6.57 KB

#13.1 @xjm mentioned in slack just skipping everything here and adding a follow-up to make things dynamic, switching over to that and will open the follow-up in a bit.

#13.2 ahh nice that crossed my mind but I didn't know whether it actually worked! Much better.

andypost’s picture

+++ b/core/modules/announcements_feed/tests/src/FunctionalJavascript/AlertsJsonFeedTest.php
@@ -55,6 +55,8 @@ public function setUp():void {
+    // Skipped due to version-specific logic.
+    $this->markTestSkipped();

+++ b/core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherTest.php
@@ -29,6 +29,8 @@ protected function setUp(): void {
+    // Skipped due to version-specific logic.
+    $this->markTestSkipped();

Should it be a @todo with link to the new issue?

alexpott’s picture

Discussed the @todo with @catch we agreed that as long as with have a critical issue open to fix them this is fine.

alexpott’s picture

+    // Skipped due to version-specific logic.
+    $this->markTestSkipped();

Should be
$this->markTestSkipped('Skipped due to version-specific logic.')

This way PHPUnit output is even more helpful.

catch’s picture

StatusFileSize
new6.61 KB

Reworked things so the reason we skip is inside the messages including the follow-up issue link.

catch’s picture

StatusFileSize
new6.49 KB

Dodgy space bar.

andypost’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 861648c and pushed to 11.x. Thanks!

  • alexpott committed 861648c2 on 11.x
    Issue #3359077 by catch, alexpott, andypost: Resolve test failures on 11...

Status: Fixed » Closed (fixed)

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

quietone’s picture

Version: 11.x-dev » 11.0.x-dev

Update version to the branch this applies to.