Remove fire_event("onfocus") from next/previous/exit actions, not needed

As suggested by Chrismcmahon, I confirmed that there is no need
to fire the onfocus event. We also remove the convenient functions
around this logic.

Change-Id: I00ce04c758e496f76bd5c2a43ad933c952acc5fb
This commit is contained in:
Aaron Arcos 2014-02-20 13:46:08 -08:00
parent c66b57d701
commit 8a1bf00ef0
2 changed files with 3 additions and 20 deletions

View file

@ -11,19 +11,19 @@ end
When(/^I click the next arrow$/) do
on(LightboxDemoPage) do |page|
page.next_image()
page.mmv_next_button_element.when_present.click
end
end
When(/^I click the previous arrow$/) do
on(LightboxDemoPage) do |page|
page.previous_image()
page.mmv_previous_button_element.when_present.click
end
end
When(/^I close MMV$/) do
on(LightboxDemoPage) do |page|
page.exit_mmv()
page.mmv_close_button_element.when_present.click
end
end

View file

@ -37,21 +37,4 @@ class LightboxDemoPage
div(:mmv_next_button, class: "mw-mlb-next-image")
div(:mmv_previous_button, class: "mw-mlb-prev-image")
div(:mmv_close_button, class: "mlb-close")
# Convenient functions on some of these elements
def next_image()
mmv_next_button_element.fire_event("onfocus")
mmv_next_button_element.when_present.click
end
def previous_image()
mmv_previous_button_element.fire_event("onfocus")
mmv_previous_button_element.when_present.click
end
def exit_mmv()
mmv_close_button_element.fire_event("onfocus")
mmv_close_button_element.when_present.click
end
end