Commit a1fec926 authored by Harumi Jang's avatar Harumi Jang 🤠 Committed by Chris Wells
Browse files

Issue #3284631 by hooroomoo, fjgarlin, bnjmnm, narendraR, chrisfromredfin:...

Issue #3284631 by hooroomoo, fjgarlin, bnjmnm, narendraR, chrisfromredfin: Wait for typing to be over before requesting data
parent 69d70b74
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,3 +9,4 @@ svelte:
  dependencies:
    - core/drupalSettings
    - core/drupal
    - core/drupal.debounce
+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+0 −0

File changed.

Preview suppressed by a .gitattributes entry or the file's encoding is unsupported.

+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@
        id="pb-text"
        name="text"
        bind:value={text}
        on:keyup={onSearch}
        on:keyup={Drupal.debounce(onSearch, 250, false)}
      />
      <img
        id="search-icon"
+8 −0
Original line number Diff line number Diff line
@@ -403,6 +403,8 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
    $search_field = $page->find('css', '#pb-text');
    // Fill in the search field.
    $search_field->setValue('&');
    // Wait just slightly longer because of debouncing.
    $this->getSession()->wait(500);
    $this->assertProjectsVisible([
      'Vitamin&C;$?',
      'Unwritten&:/',
@@ -411,6 +413,7 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
    // Fill in the search field.
    $search_field->setValue('');
    $search_field->setValue('n&');
    $this->getSession()->wait(500);
    $this->assertProjectsVisible([
      'Vitamin&C;$?',
      'Unwritten&:/',
@@ -418,30 +421,35 @@ class ProjectBrowserUiTest extends WebDriverTestBase {

    $search_field->setValue('');
    $search_field->setValue('$');
    $this->getSession()->wait(500);
    $this->assertProjectsVisible([
      'Vitamin&C;$?',
    ]);

    $search_field->setValue('');
    $search_field->setValue('?');
    $this->getSession()->wait(500);
    $this->assertProjectsVisible([
      'Vitamin&C;$?',
    ]);

    $search_field->setValue('');
    $search_field->setValue('/');
    $this->getSession()->wait(500);
    $this->assertProjectsVisible([
      'Unwritten&:/',
    ]);

    $search_field->setValue('');
    $search_field->setValue(':');
    $this->getSession()->wait(500);
    $this->assertProjectsVisible([
      'Unwritten&:/',
    ]);

    $search_field->setValue('');
    $search_field->setValue(';');
    $this->getSession()->wait(500);
    $this->assertProjectsVisible([
      'Vitamin&C;$?',
    ]);