Closed (fixed)
Project:
Drupal core
Version:
8.3.x-dev
Component:
update.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Apr 2017 at 19:30 UTC
Updated:
12 Jul 2017 at 13:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
antonnaviComment #4
dawehnerHi @Antonnavi, thank you for your contribution!
First tip: Try to use the following git configuration:
This detects renames, see https://www.drupal.org/documentation/git/configure for more details. This will make the patch size significantly smaller.
Here is some quick analysis of the failures:
You need to adapt the filepaths in places like
core/modules/update/src/Tests/UpdateUploadTest.php:66These tests rely on batch api to work, see #2855942: Create ::checkForMetaRefresh() on BrowserTestBase. Maybe try to get that issue over the finish line first :)
Comment #5
michielnugter commentedComment #6
naveenvalechaHere's the fresh patch with expected failures.
Postponed on #2870009: Update: Convert system functional tests to phpunit
//Naveen
Comment #8
naveenvalechaHere we go with fixes
Self Review of Interdiff:
This @see link was broken so I fixed it in this conversion. I hope that should be fine. If anyone will object for it, we could remove it from this patch and create a follow-up issue.
We need to send the get request again because WTB::clickLink which calls WTB::clickLinkHelper sends a new drupalget request to click the link that refresh the page but BTB::clickLink fires on the NodeElement and it does refresh the whole page. So refreshing it again so that we'll get the updated page. See the code of WTB::clickLinkHelper for reference.
//Naveen
Comment #10
naveenvalechaHere we go with the more fixes.
Self Review of the interdiff attached:
This is required to refresh the page. See #8.2 for more details.
Ditto as above.
Expected Failure:
This test is still failing as it is trying to assert the Drupal set messages which are not present because we're refreshing the page explicitly as per #8.2. What're the thoughts on #8.2?
Comment #12
lendude@naveenvalecha Looks like the solution to #8.2 is not using another drupalGet() but using checkForMetaRefresh() since the click triggers a batch operation.
Comment #13
naveenvalechaThanks Pal!
//naveen
Comment #14
dawehnerI like that this api is kinda explicit
Comment #16
gábor hojtsyThanks, the changes look good. The depreciations and trigger_error() sections match the existing patterns used for tests. Committed!
Comment #17
gábor hojtsy(Note I did not merge to 8.3.x because the depreciation should only start in 8.4.0).
Comment #18
naveenvalechaTest conversion should go in both branches, similarly with the previous conversion issues. This patch could be rerolled for 8.3.x without deprecation notices.
//Naveen
Comment #19
jofitzRe-roll for 8.3.x without deprecation notices, as suggested by @naveenvalecha. Although I suspect that @Gábor Hojtsy meant that he does not intend to commit this to 8.3.x.
Comment #20
gábor hojtsyI'm honestly not 100% clear on the policy here, will ask other committers :)
Comment #22
gábor hojtsyOk discussed with @catch. He said so long as the class is not part of the testing infrastructure/API itself, just as in this case a base class to simplify writing tests for the module itself, we can backport the patch as-is. It is unlikely that contributed modules extended the class.
So merged the original commit. Sorry for making you work on this, should have asked other committers first.
Comment #23
naveenvalechaThanks, Gabor! for committing and Jo Fitzgerald! for the patch.
Comment #24
jofitzThanks, Gabor. Don't worry about the extra work - a 997 byte interdiff doesn't take long to produce!