So...yeah. Tests are currently broken in HEAD, on Drupal 8.8 and higher.
A half-hour with git bisect and a quick discussion with @zrpnr led me to an understanding of what's up; the guilt lies with #3064049: Replace jQuery UI sortable with Sortable js.
That issue replaced jQuery UI Sortable with the Sortable library, which uses HTML 5's drag and drop API. Unfortunately, Chromedriver does not understand how to use said API...and therefore, any of Entity Embed's tests which drag an embed button to a CKEditor toolbar fail hard on 8.8 or later.
This is a problem that was known before #3064049: Replace jQuery UI sortable with Sortable js was committed, though, so there is a workaround in Drupal 8.8 in the form of \Drupal\Tests\ckeditor\Traits\CKEditorAdminSortTrait. If we brought that in to our tests and used it as intended, that would fix our problems. The bad news is that we still support Drupal 8.7, and possibly lower -- and the trait only exists in 8.8 and up.
So, my proposed solution is to copy that trait wholesale into Entity Embed's testing space, and mark it immediately deprecated and internal (i.e., "we reserve the right to change or delete this trait at any time whatsoever, so do NOT use it"), and use it to fix the tests. We can remove it outright when Drupal 8.8 is the minimum required version of core.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3108151-4.patch | 9.14 KB | phenaproxima |
| #3 | 3108151-3.patch | 5.37 KB | phenaproxima |
Comments
Comment #2
phenaproximaComment #3
phenaproximaInitial attempt. Let's see what else is failing with this.
Comment #4
phenaproximaOkay, let's see what this does.
Comment #5
oknateOne thing I notice:
$this->assertSession()->waitForElementVisible('css', $target)should check that the return isn't NULL.I'm going to go ahead and commit this, to stop the tests from failing. We can fix that later.
Comment #7
oknate