diff --git a/src/components/predictive-layer/full-width-predictive.vue b/src/components/predictive-layer/full-width-predictive.vue index d8472e8d..2de44a28 100644 --- a/src/components/predictive-layer/full-width-predictive.vue +++ b/src/components/predictive-layer/full-width-predictive.vue @@ -2,6 +2,8 @@
-
+
@@ -10,7 +12,6 @@ :class="{ 'x-bg-neutral-0': showEmpathize }" >
diff --git a/src/components/search-box.vue b/src/components/search-box.vue index 14213a02..44d7703b 100644 --- a/src/components/search-box.vue +++ b/src/components/search-box.vue @@ -4,7 +4,7 @@ ref="searchInputRef" :autofocus="false" :placeholder="$t('searchBox.placeholder')" - :instant="true" + :instant="!!isDesktopOrGreater" class="desktop:!x-pl-24" /> diff --git a/tests/e2e/cucumber/predictive-components.feature b/tests/e2e/cucumber/predictive-components.feature index a19eb7fc..e1a432b3 100644 --- a/tests/e2e/cucumber/predictive-components.feature +++ b/tests/e2e/cucumber/predictive-components.feature @@ -10,6 +10,7 @@ Feature: Predictive components Then query suggestions are displayed When search input is cleared And a "" is typed + And user presses enter And focus is set on the search input Then next queries are displayed When search input is cleared diff --git a/tests/e2e/cucumber/predictive-components.spec.ts b/tests/e2e/cucumber/predictive-components.spec.ts index 8aa3dbd0..ced17cb1 100644 --- a/tests/e2e/cucumber/predictive-components.spec.ts +++ b/tests/e2e/cucumber/predictive-components.spec.ts @@ -94,3 +94,7 @@ When('clear history queries button is clicked', () => { Then('no history queries are displayed', () => { cy.getByDataTest('history-queries').should('not.exist') }) + +When('user presses enter', () => { + cy.getByDataTest('search-input').type('{enter}') +})