Closed (fixed)
Project:
Drupal core
Version:
8.7.x-dev
Component:
file.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Sep 2016 at 16:27 UTC
Updated:
3 Oct 2018 at 09:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
michielnugter commentedComment #7
lendude'Ere we go.
Biggest change is that the javascript version of the widget doesn't have an 'upload' button.
I went with
assertWaitOnAjaxRequest()because that seemed to fit here, might want to change that to a waitForX.Comment #9
lendudeThat file logic works fine locally and in the BrowserTestBase version
Small tweak, lets see what the bot makes of that....
Comment #11
MixologicI think the issue here is that you need to use
attachFileToFieldto actually attach the file to the file upload in the form.have a look at http://cgit.drupalcode.org/drupal/tree/core/modules/system/tests/src/Fun... for an example.
Comment #12
lendude@mixologic++
here we go
Comment #14
lendudeLooking at
\Drupal\Tests\media\Functional\MediaRevisionTestit might be that we need to use 'temporary://' because that is shared between containers?Works locally, lets see how the old bot feels about this one....
Comment #16
lendude.... yeah ok, so fixed #11 in both spots now .... silly me
Comment #17
dawehnerI would have expected to use
tempnam()hereI wonder how hard it would be to actually wait for a specific element to appear instead
Comment #18
borisson_The change to tempnam() looks like it would be an easy change. The other one sounds like it would be a lot harder to figure out.
Moving this back to NW in any case.
Comment #19
borisson_Comment #20
lendude#17.1 fixed
#17.2 wait for works when waiting for something to appear, but we still don't have anything to wait for something to disappear, so stuck with assertWaitOnAjaxRequest for the remove operations.
Comment #21
lendudeComment #22
borisson_Awesome, thank for fixing/explaining the review points. This looks great now!
Comment #23
alexpott$this->assertGreaterThan()?
Is this assert deprecated?
db_query is deprecated - let's not add a usage.
Comment #24
lendude@alexpott thanks for the review. Feedback addressed.
Comment #25
jibran#24 addressed #23 so back to RTBC.
Comment #26
alexpottCommitted and pushed be64fa993e to 8.7.x and 0cac1a84d7 to 8.6.x. Thanks!