diff options
Diffstat (limited to 'tests/end2end/features/search.feature')
-rw-r--r-- | tests/end2end/features/search.feature | 83 |
1 files changed, 58 insertions, 25 deletions
diff --git a/tests/end2end/features/search.feature b/tests/end2end/features/search.feature index 305b45690..9446c36ac 100644 --- a/tests/end2end/features/search.feature +++ b/tests/end2end/features/search.feature @@ -202,6 +202,22 @@ Feature: Searching on a page And I wait for "prev_result found foo" in the log Then "Foo" should be found + # This makes sure we don't mutate the original flags + # Seems to be broken with QtWebKit, wontfix + @qtwebkit_skip + Scenario: Jumping to previous match with --reverse twice + When I set search.ignore_case to always + And I run :search --reverse baz + # BAZ + And I wait for "search found baz with flags FindBackward" in the log + And I run :search-prev + # Baz + And I wait for "prev_result found baz" in the log + And I run :search-prev + # baz + And I wait for "prev_result found baz" in the log + Then "baz" should be found + Scenario: Jumping to previous match without search # Make sure there was no search in the same window before When I open data/search.html in a new window @@ -233,20 +249,20 @@ Feature: Searching on a page ## wrapping prevented - @qtwebkit_skip @qt>=5.14 - Scenario: Preventing wrapping at the top of the page with QtWebEngine + @qt>=5.14 + Scenario: Preventing wrapping at the top of the page When I set search.ignore_case to always And I set search.wrap to false + And I set search.wrap_messages to true And I run :search --reverse foo And I wait for "search found foo with flags FindBackward" in the log And I run :search-next And I wait for "next_result found foo with flags FindBackward" in the log And I run :search-next - And I wait for "Search hit TOP" in the log - Then "foo" should be found + Then the message "Search hit TOP" should be shown - @qtwebkit_skip @qt>=5.14 - Scenario: Preventing wrapping at the bottom of the page with QtWebEngine + @qt>=5.14 + Scenario: Preventing wrapping at the bottom of the page When I set search.ignore_case to always And I set search.wrap to false And I run :search foo @@ -254,32 +270,49 @@ Feature: Searching on a page And I run :search-next And I wait for "next_result found foo" in the log And I run :search-next - And I wait for "Search hit BOTTOM" in the log - Then "Foo" should be found + Then the message "Search hit BOTTOM" should be shown - @qtwebengine_skip - Scenario: Preventing wrapping at the top of the page with QtWebKit + ## search match counter + + @qtwebkit_skip @qt>=5.14 + Scenario: Setting search match counter on search When I set search.ignore_case to always - And I set search.wrap to false - And I run :search --reverse foo - And I wait for "search found foo with flags FindBackward" in the log + And I set search.wrap to true + And I run :search ba + And I wait for "search found ba" in the log + Then "Setting search match text to 1/5" should be logged + + @qtwebkit_skip @qt>=5.14 + Scenario: Updating search match counter on search-next + When I set search.ignore_case to always + And I set search.wrap to true + And I run :search ba + And I wait for "search found ba" in the log And I run :search-next - And I wait for "next_result found foo with flags FindBackward" in the log + And I wait for "next_result found ba" in the log And I run :search-next - And I wait for "next_result didn't find foo with flags FindBackward" in the log - Then the warning "Text 'foo' not found on page!" should be shown + And I wait for "next_result found ba" in the log + Then "Setting search match text to 3/5" should be logged - @qtwebengine_skip - Scenario: Preventing wrapping at the bottom of the page with QtWebKit + @qtwebkit_skip @qt>=5.14 + Scenario: Updating search match counter on search-prev with wrapping + When I set search.ignore_case to always + And I set search.wrap to true + And I run :search ba + And I wait for "search found ba" in the log + And I run :search-prev + And I wait for the message "Search hit TOP, continuing at BOTTOM" + Then "Setting search match text to 5/5" should be logged + + @qtwebkit_skip @qt>=5.14 + Scenario: Updating search match counter on search-prev without wrapping When I set search.ignore_case to always And I set search.wrap to false - And I run :search foo - And I wait for "search found foo" in the log - And I run :search-next - And I wait for "next_result found foo" in the log - And I run :search-next - And I wait for "next_result didn't find foo" in the log - Then the warning "Text 'foo' not found on page!" should be shown + And I run :search ba + And I wait for "search found ba" in the log + And I run :search-prev + And I wait for the message "Search hit TOP" + Then "Setting search match text to 1/5" should be logged ## follow searched links @skip # Too flaky |