Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
media system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 May 2017 at 19:07 UTC
Updated:
23 Nov 2017 at 10:56 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
phenaproxima#2831274: Bring Media entity module to core as Media module has landed!
Comment #3
marcoscanoBased on https://www.drupal.org/node/2846936 all instances of
::assertWaitOnAjaxRequest()were replaced by the new methods.Is anything else needed here?
Comment #4
phenaproximaRe-tagging.
Comment #6
marcoscanoComment #8
marcoscanoIn
MediaViewsWizardTest::testMediaRevisionWizardthere is an AJAX call that doesn't add or remove any element from the page. I couldn't find a proper way of waiting for this call to finish without using::assertWaitOnAjaxRequest(). Left a TODO in the code.Comment #9
phenaproximaI feel like waiting a set amount of time for the AJAX to be done is an almost guaranteed way to introduce random failures. Is there nothing we can wait on at all? Even if it's not element, surely we can wait on a JS condition of some sort?
Comment #10
vishal9619 commentedComment #11
marcoscano@vishal9619 could you please point out the differences between your patch and the patch in #8?
Looks like it's the same file, renamed.
Comment #12
marcoscanoOnce no DOM modification is done, perhaps any condition would be equivalent to what
::assertWaitOnAjaxRequestdoes?We have removed 9 instances of
::assertWaitOnAjaxRequest, only this one is left. We are probably already reducing a lot the probabilities of random failures :)Comment #14
marcoscanoRe-roll needed
Comment #15
phenaproximaWell...what can I say? Media's tests having been passing consistently ever since #2831274: Bring Media entity module to core as Media module landed, which seems to indicate that there are no random failures at present. And this patch improves the reliability of the tests even more. I can't think of any reason to delay this one further.
Comment #16
wim leersThis is waiting for the concrete result of the AJAX requests instead of just some AJAX request to complete.
Good hardening.
However, everything else is pure clean-up, theoretically out of scope. At committer's discretion to accept it or require it to be moved to a separate patch.
Looks good!
Comment #17
gábor hojtsyThe hardenings look good. The cleanups I am not very concerned about here, they look fine too. Thanks for making the test more robust/explicit!
Comment #20
Anonymous (not verified) commentedTest always fails in case there is JS error in console. Wait for element visible also leads to fatal error some times.