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.

CommentFileSizeAuthor
#4 3108151-4.patch9.14 KBphenaproxima
#3 3108151-3.patch5.37 KBphenaproxima

Comments

phenaproxima created an issue. See original summary.

phenaproxima’s picture

Issue summary: View changes
phenaproxima’s picture

Status: Active » Needs review
StatusFileSize
new5.37 KB

Initial attempt. Let's see what else is failing with this.

phenaproxima’s picture

StatusFileSize
new9.14 KB

Okay, let's see what this does.

oknate’s picture

Status: Needs review » Reviewed & tested by the community

One 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.

  • oknate committed 12fac26 on 8.x-1.x authored by phenaproxima
    Issue #3108151 by phenaproxima: Fix broken tests on Drupal 8.8 and up
    
oknate’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.