Merge "Click in the top-left corner of the image when trying to close the download dialog"

This commit is contained in:
jenkins-bot 2015-02-13 22:44:58 +00:00 committed by Gerrit Code Review
commit 4abcc2e13c
3 changed files with 13 additions and 2 deletions

View file

@ -36,6 +36,7 @@ Feature: Download menu
Scenario: The small download option has the correct information
When I open the download dropdown
And the download size options appear
And I click the small download size
And the download size options disappears
Then the download image size label should be "193 × 145 px jpg"
@ -43,6 +44,7 @@ Feature: Download menu
Scenario: The medium download option has the correct information
When I open the download dropdown
And the download size options appear
And I click the medium download size
And the download size options disappears
Then the download image size label should be "640 × 480 px jpg"
@ -50,6 +52,7 @@ Feature: Download menu
Scenario: The large download option has the correct information
When I open the download dropdown
And the download size options appear
And I click the large download size
And the download size options disappears
Then the download image size label should be "1200 × 900 px jpg"

View file

@ -35,10 +35,14 @@ When /^I click the (.*) download size$/ do |size_option|
@index = 0
end
page.mmv_download_size_options_elements[@index].when_present.click
page.mmv_download_size_options_elements[@index].click
end
end
When /^the download size options appear$/ do
on(E2ETestPage).mmv_download_size_menu_element.when_present
end
When /^the download size options disappears$/ do
on(E2ETestPage).mmv_download_size_menu_element.when_not_present
end

View file

@ -40,7 +40,11 @@ When /^I close MMV$/ do
end
When /^I click the image$/ do
on(E2ETestPage).mmv_image_div_element.when_present.click
on(E2ETestPage) do |page|
# Clicking the top-left corner of the image is necessary for the test to work on IE
# A plain click on the image element ends up hitting the dialog, which means it won't close
@browser.driver.action.move_to(@browser.driver.find_element(:class, 'mw-mmv-image'), 10, 10).click.perform
end
end
Then /^the image metadata and the image itself should be there$/ do