diff options
Diffstat (limited to 'tests/end2end/features/misc.feature')
-rw-r--r-- | tests/end2end/features/misc.feature | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/tests/end2end/features/misc.feature b/tests/end2end/features/misc.feature index bd8ada576..26fe8f357 100644 --- a/tests/end2end/features/misc.feature +++ b/tests/end2end/features/misc.feature @@ -436,7 +436,7 @@ Feature: Various utility commands. Scenario: Clicking an element with unknown ID When I open data/click_element.html And I run :click-element id blah - Then the error "No element found with id blah!" should be shown + Then the error "No element found with ID "blah"!" should be shown Scenario: Clicking an element by ID When I open data/click_element.html @@ -457,6 +457,49 @@ Feature: Various utility commands. - data/click_element.html - data/hello.txt (active) + Scenario: Clicking an element by CSS selector + When I open data/click_element.html + And I run :click-element css .clickable + Then the javascript message "click_element CSS selector" should be logged + + Scenario: Clicking an element with non-unique filter + When I open data/click_element.html + And I run :click-element css span + Then the error "Multiple elements found matching CSS selector "span"!" should be shown + + Scenario: Clicking first element matching a selector + When I open data/click_element.html + And I run :click-element --select-first css span + Then the javascript message "click_element clicked" should be logged + + Scenario: Clicking an element by position + When I open data/click_element.html + And I run :click-element position 20,42 + Then the javascript message "click_element position" should be logged + + Scenario: Clicking an element with invalid position + When I open data/click_element.html + And I run :click-element position 20.42 + Then the error "String 20.42 does not match X,Y" should be shown + + Scenario: Clicking an element with non-integer position + When I open data/click_element.html + And I run :click-element position 20,42.001 + Then the error "String 20,42.001 does not match X,Y" should be shown + + Scenario: Clicking on focused element when there is none + When I open data/click_element.html + # Need to loose focus on input element + And I run :click-element position 20,42 + And I wait for the javascript message "click_element position" + And I run :click-element focused + Then the error "No element found with focus!" should be shown + + Scenario: Clicking on focused element + When I open data/click_element.html + And I run :click-element focused + Then "Entering mode KeyMode.insert (reason: clicking input)" should be logged + ## :command-history-{prev,next} Scenario: Calling previous command |