@Test public void testOnSearchButtonClickWhenTheSearchIsDisabled() { final ClickEvent clickEvent = mock(ClickEvent.class); when(searchContainer.classList.contains(HIDDEN)).thenReturn(true); view.onSearchButtonClick(clickEvent); verify(searchContainer.classList).remove(HIDDEN); verify(inputElement).focus(); verify(clickEvent).preventDefault(); verify(clickEvent).stopPropagation(); }
@EventHandler("search-button") public void onSearchButtonClick(final ClickEvent clickEvent) { toggle(); clickEvent.preventDefault(); clickEvent.stopPropagation(); }
SearchBarComponentView implements SearchBarComponent.View { @EventHandler("search-button") public void onSearchButtonClick(final ClickEvent clickEvent) { toggle(); clickEvent.preventDefault(); clickEvent.stopPropagation(); } }
SearchBarComponentView implements SearchBarComponent.View { @EventHandler("search-button") public void onSearchButtonClick(final ClickEvent clickEvent) { toggle(); clickEvent.preventDefault(); clickEvent.stopPropagation(); } @Inject  SearchBarComponentView(final HTMLButtonElement searchButton,
                                  final HTMLButtonElement searchContainer,
                                  final HTMLButtonElement prevElement,
                                  final HTMLButtonElement nextElement,
                                  final HTMLButtonElement closeSearch,
                                  final HTMLInputElement inputElement,
                                  final TranslationService translationService,
                                  final @Named("span") HTMLElement currentResult,
                                  final @Named("span") HTMLElement totalOfResults); }
SearchBarComponentView implements SearchBarComponent.View { @EventHandler("search-button") public void onSearchButtonClick(final ClickEvent clickEvent) { toggle(); clickEvent.preventDefault(); clickEvent.stopPropagation(); } @Inject  SearchBarComponentView(final HTMLButtonElement searchButton,
                                  final HTMLButtonElement searchContainer,
                                  final HTMLButtonElement prevElement,
                                  final HTMLButtonElement nextElement,
                                  final HTMLButtonElement closeSearch,
                                  final HTMLInputElement inputElement,
                                  final TranslationService translationService,
                                  final @Named("span") HTMLElement currentResult,
                                  final @Named("span") HTMLElement totalOfResults); @Override void init(final SearchBarComponent searchBarComponent); @EventHandler("search-button") void onSearchButtonClick(final ClickEvent clickEvent); @EventHandler("next-element") void onNextElementClick(final ClickEvent clickEvent); @EventHandler("prev-element") void onPrevElementClick(final ClickEvent clickEvent); @EventHandler("close-search") void onCloseSearchClick(final ClickEvent clickEvent); @EventHandler("search-input") void onSearchInputKeyPress(final KeyUpEvent keyEvent); @Override void setCurrentResultNumber(final Integer currentResultNumber); @Override void setTotalOfResultsNumber(final Integer totalOfResultsNumber); @Override void disableSearch(); }
SearchBarComponentView implements SearchBarComponent.View { @EventHandler("search-button") public void onSearchButtonClick(final ClickEvent clickEvent) { toggle(); clickEvent.preventDefault(); clickEvent.stopPropagation(); } @Inject  SearchBarComponentView(final HTMLButtonElement searchButton,
                                  final HTMLButtonElement searchContainer,
                                  final HTMLButtonElement prevElement,
                                  final HTMLButtonElement nextElement,
                                  final HTMLButtonElement closeSearch,
                                  final HTMLInputElement inputElement,
                                  final TranslationService translationService,
                                  final @Named("span") HTMLElement currentResult,
                                  final @Named("span") HTMLElement totalOfResults); @Override void init(final SearchBarComponent searchBarComponent); @EventHandler("search-button") void onSearchButtonClick(final ClickEvent clickEvent); @EventHandler("next-element") void onNextElementClick(final ClickEvent clickEvent); @EventHandler("prev-element") void onPrevElementClick(final ClickEvent clickEvent); @EventHandler("close-search") void onCloseSearchClick(final ClickEvent clickEvent); @EventHandler("search-input") void onSearchInputKeyPress(final KeyUpEvent keyEvent); @Override void setCurrentResultNumber(final Integer currentResultNumber); @Override void setTotalOfResultsNumber(final Integer totalOfResultsNumber); @Override void disableSearch();  }