Problem/Motivation
FileOnTranslatedEntityTest uses form submissions to change language settings.
This is expensive, and not what the test is covering.
Steps to reproduce
Proposed resolution
Change to API calls.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3385846
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:
- 3385846-fileontranslatedentitytest-use-api
changes, plain diff MR !9109
Comments
Comment #2
smustgrave commentedTagging for new users as may be some good practice with refactoring tests.
Comment #5
pooja_sharma commentedAdded API() & removed the http request, also observed additional duplicate code removed this as well, apart from it nothing seems to be left.
Also verified test changes on local, its output on the basis of time & memory usage as follow:
Before applied MR changes test takes : Time: 00:17.703, Memory: 6.00 MB
After applied MR changes test takes: Time: 00:14.922, Memory: 6.00 MB
Please review, moving NR.
Comment #6
joachim commentedLGTM.
Comment #10
catchCommitted/pushed to 11.x, cherry-picked to 11.0.x and 10.4.x, thanks!