Gilles has uploaded a new change for review.
https://gerrit.wikimedia.org/r/190430
Change subject: Click in the top-left corner of the image when trying to close
the download dialog
......................................................................
Click in the top-left corner of the image when trying to close the download
dialog
This should fix the failures happening in IE.
Bug: T89087
Change-Id: Ia0128a9c85891e8f2d89098c898d5927f01fbedd
---
M tests/browser/features/mmv.download.feature
M tests/browser/features/step_definitions/mmv_download_steps.rb
M tests/browser/features/step_definitions/mmv_steps.rb
3 files changed, 13 insertions(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultimediaViewer
refs/changes/30/190430/1
diff --git a/tests/browser/features/mmv.download.feature
b/tests/browser/features/mmv.download.feature
index eefa16a..18c1b8e 100644
--- a/tests/browser/features/mmv.download.feature
+++ b/tests/browser/features/mmv.download.feature
@@ -36,6 +36,7 @@
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 @@
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 @@
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"
diff --git a/tests/browser/features/step_definitions/mmv_download_steps.rb
b/tests/browser/features/step_definitions/mmv_download_steps.rb
index a955061..4af5895 100644
--- a/tests/browser/features/step_definitions/mmv_download_steps.rb
+++ b/tests/browser/features/step_definitions/mmv_download_steps.rb
@@ -35,10 +35,14 @@
@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
diff --git a/tests/browser/features/step_definitions/mmv_steps.rb
b/tests/browser/features/step_definitions/mmv_steps.rb
index 10bf62e..19ddb79 100644
--- a/tests/browser/features/step_definitions/mmv_steps.rb
+++ b/tests/browser/features/step_definitions/mmv_steps.rb
@@ -40,7 +40,11 @@
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
--
To view, visit https://gerrit.wikimedia.org/r/190430
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0128a9c85891e8f2d89098c898d5927f01fbedd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gilles <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits