fix testing for search history
This commit is contained in:
parent
ed5464c9b7
commit
91e5690ac9
1 changed files with 7 additions and 0 deletions
|
@ -2198,6 +2198,7 @@ mod tests {
|
|||
search_bar.update_in(cx, |search_bar, window, cx| {
|
||||
search_bar.next_history_query(&NextHistoryQuery, window, cx);
|
||||
});
|
||||
cx.run_until_parked();
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
assert_eq!(search_bar.query(cx), "");
|
||||
assert_eq!(search_bar.search_options, SearchOptions::CASE_SENSITIVE);
|
||||
|
@ -2205,6 +2206,7 @@ mod tests {
|
|||
search_bar.update_in(cx, |search_bar, window, cx| {
|
||||
search_bar.next_history_query(&NextHistoryQuery, window, cx);
|
||||
});
|
||||
cx.run_until_parked();
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
assert_eq!(search_bar.query(cx), "");
|
||||
assert_eq!(search_bar.search_options, SearchOptions::CASE_SENSITIVE);
|
||||
|
@ -2214,6 +2216,7 @@ mod tests {
|
|||
search_bar.update_in(cx, |search_bar, window, cx| {
|
||||
search_bar.previous_history_query(&PreviousHistoryQuery, window, cx);
|
||||
});
|
||||
cx.run_until_parked();
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
assert_eq!(search_bar.query(cx), "c");
|
||||
assert_eq!(search_bar.search_options, SearchOptions::CASE_SENSITIVE);
|
||||
|
@ -2223,6 +2226,7 @@ mod tests {
|
|||
search_bar.update_in(cx, |search_bar, window, cx| {
|
||||
search_bar.previous_history_query(&PreviousHistoryQuery, window, cx);
|
||||
});
|
||||
cx.run_until_parked();
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
assert_eq!(search_bar.query(cx), "b");
|
||||
assert_eq!(search_bar.search_options, SearchOptions::CASE_SENSITIVE);
|
||||
|
@ -2232,6 +2236,7 @@ mod tests {
|
|||
search_bar.update_in(cx, |search_bar, window, cx| {
|
||||
search_bar.previous_history_query(&PreviousHistoryQuery, window, cx);
|
||||
});
|
||||
cx.run_until_parked();
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
assert_eq!(search_bar.query(cx), "a");
|
||||
assert_eq!(search_bar.search_options, SearchOptions::CASE_SENSITIVE);
|
||||
|
@ -2239,6 +2244,7 @@ mod tests {
|
|||
search_bar.update_in(cx, |search_bar, window, cx| {
|
||||
search_bar.previous_history_query(&PreviousHistoryQuery, window, cx);
|
||||
});
|
||||
cx.run_until_parked();
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
assert_eq!(search_bar.query(cx), "a");
|
||||
assert_eq!(search_bar.search_options, SearchOptions::CASE_SENSITIVE);
|
||||
|
@ -2248,6 +2254,7 @@ mod tests {
|
|||
search_bar.update_in(cx, |search_bar, window, cx| {
|
||||
search_bar.next_history_query(&NextHistoryQuery, window, cx);
|
||||
});
|
||||
cx.run_until_parked();
|
||||
search_bar.update(cx, |search_bar, cx| {
|
||||
assert_eq!(search_bar.query(cx), "b");
|
||||
assert_eq!(search_bar.search_options, SearchOptions::CASE_SENSITIVE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue