Fix test performance of Drupal\Tests\user\FunctionalJavascript\UserPasswordResetTest

Created on 9 September 2022, almost 2 years ago
Updated 23 February 2023, over 1 year ago

Problem/Motivation

Speed up testbot and simplify tests by using the testing profile instead of the standard profile.

Steps to reproduce

Proposed resolution

Convert Drupal\Tests\user\FunctionalJavascript\UserPasswordResetTest to use the testing profile, not the standard profile.

Remaining tasks

Update patch
Review
Commit

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

πŸ“Œ Task
Status

Fixed

Version

10.1 ✨

Component
CommentΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States smustgrave

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    >I think olivero_test could be renamed. But it adds an article content type with comment field. Which is being checked in this test.

    Hi, @smustgrave, are you sure? I checked the file and did not see node/content type/comment involved in UserPasswordResetTest. olivero_test is for testing the olivero theme, which is irrelevant here.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Yea gotta figure out what about that module makes it work. Without it the test seems to have an issue with the picture upload.

  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    Ok, will try. BTW, deprecated REQUEST_TIME usage in UserPasswordResetTest could be fixed

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Saw that didn’t know if it could get kicked back as out of scope

  • Status changed to Needs review over 1 year ago
  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    The title starts with Fix test performance, I think it's ok to do #12

    >Yea gotta figure out what about that module makes it work. Without it the test seems to have an issue with the picture upload.

    It's the user under testing without the access content permission

  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    Sorry, the interdiff in #14 is wrong, as the patch in #14 is a simple patch, I will not re-upload a correct interdiff.

  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    Worthy re-uploading a correct interdiff-5-14.txt for review

  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    Update core/phpstan-baseline.neon

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Interesting wonder why that permission solved it?

  • Status changed to Needs work over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Seems to have CI failures

  • Status changed to Needs review over 1 year ago
  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    #17 Removed the wrong entry from core/phpstan-baseline.neon

              return AccessResult::allowedIfHasPermission($account, 'access content');
    

    Re #18 Checked core/modules/file/src/FileAccessControlHandler.php, see the source code here

  • Status changed to RTBC over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Learn something new everyday!

    Thanks for figuring that out!

  • πŸ‡¨πŸ‡³China jungle Chongqing, China
    $ grep -nR "\$profile\ =\ 'standard'" .
    ./core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php:15:  protected $profile = 'standard';
    ./core/profiles/standard/tests/src/FunctionalJavascript/StandardJavascriptTest.php:18:  protected $profile = 'standard';
    ./core/profiles/standard/tests/src/Functional/StandardTest.php:30:  protected $profile = 'standard';
    ./core/modules/config_translation/tests/src/Functional/ConfigTranslationInstallTest.php:22:  protected $profile = 'standard';
    ./core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeTestBase.php:23:  protected $profile = 'standard';
    ./core/modules/config/tests/src/Functional/ConfigImportAllTest.php:34:  protected $profile = 'standard';
    ./core/modules/system/tests/src/Functional/Common/NoJavaScriptAnonymousTest.php:26:  protected $profile = 'standard';
    ./core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php:38:  protected $profile = 'standard';
    ./core/modules/system/tests/src/Functional/Menu/BreadcrumbTest.php:47:  protected $profile = 'standard';
    ./core/modules/page_cache/tests/src/Functional/PageCacheTagsIntegrationTest.php:24:  protected $profile = 'standard';
    ./core/modules/node/tests/src/Functional/NodeTranslationUITest.php:62:  protected $profile = 'standard';
    ./core/modules/content_translation/tests/src/Functional/ContentTranslationStandardFieldsTest.php:31:  protected $profile = 'standard';
    ./core/modules/content_translation/tests/src/Functional/ContentTranslationMetadataFieldsTest.php:38:  protected $profile = 'standard';
    ./core/modules/help/tests/src/Functional/HelpTest.php:36:  protected $profile = 'standard';
    ./core/modules/media/tests/src/FunctionalJavascript/MediaStandardProfileTest.php:25:  protected $profile = 'standard';
    

    There are more to do.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    There's a meta attached for tracking those. Some are required.

  • πŸ‡¨πŸ‡³China jungle Chongqing, China

    Oh, missed the linked parent issue, thanks!

  • πŸ‡¨πŸ‡³China jungle Chongqing, China
  • Status changed to Fixed over 1 year ago
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    Backported to 10.0.x as a test-only fix. Doesn't cherry-pick cleanly to 9.5.x due to the PHPStan baseline, not sure it is worth the effort, so I left that branch alone.

    Committed and pushed 1ac46a2af3 to 10.1.x and 2fdab0bde3 to 10.0.x. Thanks!

    • longwave β†’ committed 2fdab0bd on 10.0.x
      Issue #3308920 by jungle, smustgrave, Lendude: Fix test performance of...
    • longwave β†’ committed 1ac46a2a on 10.1.x
      Issue #3308920 by jungle, smustgrave, Lendude: Fix test performance of...
  • πŸ‡¬πŸ‡§United Kingdom longwave UK

    This broke HEAD in 10.0.x:

    1) Drupal\Tests\user\FunctionalJavascript\UserPasswordResetTest::testUserPasswordResetWithAdditionalAjaxForm
    Drupal\Core\Config\UnmetDependenciesException: Configuration objects provided by test_user_config have unmet dependencies: core.entity_form_display.user.user.default (image.style.thumbnail, image), field.field.user.user.user_picture (image, field), field.storage.user.user_picture (file, image, field)
    

    Rolled back from there, this isn't critical so can go into 10.1.x only.

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

Production build 0.69.0 2024