test(cypress): Fix tests Recent and Favorites actions
This commit is contained in:
parent
cca770052a
commit
37a0bf661a
1 changed files with 3 additions and 3 deletions
|
|
@ -55,12 +55,12 @@ export function StartScreen(props: StartScreenProps) {
|
|||
<>
|
||||
<div className="DocSearch-Hit-action">
|
||||
<button
|
||||
data-cy="fav-recent"
|
||||
className="DocSearch-Hit-action-button"
|
||||
title="Save this search"
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
runFavoriteTransition(() => {
|
||||
props.favoriteSearches.add(item);
|
||||
props.recentSearches.remove(item);
|
||||
|
|
@ -73,12 +73,12 @@ export function StartScreen(props: StartScreenProps) {
|
|||
</div>
|
||||
<div className="DocSearch-Hit-action">
|
||||
<button
|
||||
data-cy="remove-recent"
|
||||
className="DocSearch-Hit-action-button"
|
||||
title="Remove this search from history"
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
runDeleteTransition(() => {
|
||||
props.recentSearches.remove(item);
|
||||
props.refresh();
|
||||
|
|
@ -104,12 +104,12 @@ export function StartScreen(props: StartScreenProps) {
|
|||
renderAction={({ item, runDeleteTransition }) => (
|
||||
<div className="DocSearch-Hit-action">
|
||||
<button
|
||||
data-cy="remove-fav"
|
||||
className="DocSearch-Hit-action-button"
|
||||
title="Remove this search from favorites"
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
runDeleteTransition(() => {
|
||||
props.favoriteSearches.remove(item);
|
||||
props.refresh();
|
||||
|
|
|
|||
Loading…
Reference in a new issue