Verified Commit 7783e3c9 authored by Jibran Ijaz's avatar Jibran Ijaz
Browse files

Issue #3297541 by jibran: Make the HEAD green again.

parent 619a6b4a
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -26,12 +26,10 @@
      }
      Object.keys(drupalSettings.dynamic_entity_reference).forEach(function (field_class) {
        $(context)
          .find('.' + field_class)
          .once('linky')
          .find(once('linky', '.' + field_class, context))
          .on('change', {select: field_class}, linkyWidget);
        $(context)
          .find('.' + field_class)
          .once('linky-title')
          .find(once('linky-title', '.' + field_class, context))
          .each(function() {
            var $el = $(this);
            var $autocomplete = $el.parents('.container-inline').find('.form-autocomplete');
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ class LinkySelection extends DefaultSelection {
    $entity_type = $this->entityTypeManager->getDefinition($target_type);

    $query = $this->entityTypeManager->getStorage($target_type)->getQuery();
    $query->accessCheck(TRUE);

    // If 'target_bundles' is NULL, all bundles are referenceable, no further
    // conditions are needed.
+7 −3
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ class LinkyFunctionalTest extends BrowserTestBase {
  /**
   * {@inheritdoc}
   */
  public static $modules = [
  protected static $modules = [
    'link',
    'linky',
    'user',
@@ -64,7 +64,7 @@ class LinkyFunctionalTest extends BrowserTestBase {
  /**
   * Sets the test up.
   */
  protected function setUp() {
  protected function setUp(): void {
    parent::setUp();
    // Test admin user.
    $this->adminUser = $this->drupalCreateUser($this->permissions);
@@ -126,7 +126,11 @@ class LinkyFunctionalTest extends BrowserTestBase {
   * @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
   */
  protected function getMostRecentlyCreatedLinky() {
    $results = \Drupal::entityQuery('linky')->sort('id', 'DESC')->range(0, 1)->execute();
    $results = \Drupal::entityQuery('linky')
      ->sort('id', 'DESC')
      ->range(0, 1)
      ->accessCheck(FALSE)
      ->execute();
    $id = array_shift($results);
    return \Drupal::entityTypeManager()->getStorage('linky')->load($id);
  }
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ class LinkyRevisionableUpdateTest extends UpdatePathTestBase {
   */
  public function setDatabaseDumpFiles() {
    $this->databaseDumpFiles = [
      DRUPAL_ROOT . '/core/modules/system/tests/fixtures/update/drupal-8.8.0.bare.standard.php.gz',
      DRUPAL_ROOT . '/core/modules/system/tests/fixtures/update/drupal-9.4.0.bare.standard.php.gz',
      __DIR__ . '/../../../fixtures/update/linky-convert-linky-entity-to-revisionable-3052102.php',
    ];
  }
+4 −7
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ class LinkyFunctionalTest extends WebDriverTestBase {
  /**
   * {@inheritdoc}
   */
  public static $modules = [
  protected static $modules = [
    'link',
    'linky',
    'user',
@@ -88,7 +88,7 @@ class LinkyFunctionalTest extends WebDriverTestBase {
  /**
   * Sets the test up.
   */
  protected function setUp() {
  protected function setUp(): void {
    parent::setUp();
    // Test admin user.
    $this->adminUser = $this->drupalCreateUser($this->permissions);
@@ -323,11 +323,8 @@ class LinkyFunctionalTest extends WebDriverTestBase {
   */
  protected function performAutocompleteQuery($autocomplete_query, NodeElement $autocomplete_field) {
    $autocomplete_field->setValue($autocomplete_query);
    $this->getSession()->getDriver()->keyDown($autocomplete_field->getXpath(), ' ');
    // Wait for ajax.
    $this->assertJsCondition('(typeof(jQuery)=="undefined" || (0 === jQuery.active && 0 === jQuery(\'.ui-autocomplete-loading\').length))', 20000);
    // And autocomplete selection.
    $this->assertJsCondition('jQuery(".ui-autocomplete.ui-menu li.ui-menu-item:visible").length > 0', 5000);
    $autocomplete_field->keyDown(' ');
    $this->assertSession()->waitOnAutocomplete();
    $this->screenshotOutput();
  }

Loading