2014-09-17 21:48:44 +00:00
|
|
|
class E2ETestPage < CommonsPage
|
2014-01-15 00:03:34 +00:00
|
|
|
include PageObject
|
2014-04-01 08:46:48 +00:00
|
|
|
|
2015-12-09 16:21:54 +00:00
|
|
|
page_url 'MediaViewerE2ETest'
|
2014-01-15 00:03:34 +00:00
|
|
|
|
|
|
|
# Tag page elements that we will need.
|
2014-02-20 02:46:28 +00:00
|
|
|
|
|
|
|
# First image in lightbox demo page
|
2015-12-09 16:21:54 +00:00
|
|
|
a(:image1_in_article, class: 'image', href: /Kerala\.jpg$/)
|
|
|
|
a(:image2_in_article, class: 'image', href: /Wikimedia_Foundation_2013_All_Hands_Offsite_-_Day_2_-_Photo_24\.jpg$/)
|
2014-02-20 02:46:28 +00:00
|
|
|
|
2014-04-01 08:46:48 +00:00
|
|
|
a(:other_image_in_article, href: /Academy_of_Sciences\.jpg$/)
|
|
|
|
|
2014-04-20 15:42:40 +00:00
|
|
|
# Black overlay
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_overlay, class: 'mw-mmv-overlay')
|
2014-04-20 15:42:40 +00:00
|
|
|
|
2014-02-20 02:46:28 +00:00
|
|
|
# Wrapper div for all mmv elements
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_wrapper, class: 'mw-mmv-wrapper')
|
2014-02-20 02:46:28 +00:00
|
|
|
|
|
|
|
# Wrapper div for image
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_image_div, class: 'mw-mmv-image')
|
2014-02-20 02:46:28 +00:00
|
|
|
|
2015-03-18 08:41:48 +00:00
|
|
|
# Actual image
|
2015-12-09 16:21:54 +00:00
|
|
|
image(:mmv_final_image, class: 'mw-mmv-final-image')
|
2015-03-18 08:41:48 +00:00
|
|
|
|
2014-02-20 02:46:28 +00:00
|
|
|
# Metadata elements
|
2015-12-09 16:21:54 +00:00
|
|
|
span(:mmv_metadata_title, class: 'mw-mmv-title')
|
|
|
|
a(:mmv_metadata_license, class: 'mw-mmv-license')
|
|
|
|
p(:mmv_metadata_credit, class: 'mw-mmv-credit')
|
|
|
|
span(:mmv_metadata_source, class: 'mw-mmv-source')
|
2014-02-20 02:46:28 +00:00
|
|
|
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_image_metadata_wrapper, class: 'mw-mmv-image-metadata')
|
|
|
|
p(:mmv_image_metadata_desc, class: 'mw-mmv-image-desc')
|
2014-02-20 02:46:28 +00:00
|
|
|
|
2015-12-09 16:21:54 +00:00
|
|
|
ul(:mmv_image_metadata_links_wrapper, class: 'mw-mmv-image-links')
|
|
|
|
a(:mmv_details_page_link, class: 'mw-mmv-description-page-button')
|
2014-02-20 02:46:28 +00:00
|
|
|
|
|
|
|
# Controls
|
2017-03-18 06:38:33 +00:00
|
|
|
button(:mmv_next_button, class: 'mw-mmv-next-image')
|
|
|
|
button(:mmv_previous_button, class: 'mw-mmv-prev-image')
|
|
|
|
button(:mmv_close_button, class: 'mw-mmv-close')
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_image_loaded_cucumber, class: 'mw-mmv-image-loaded-cucumber')
|
2014-10-03 12:55:42 +00:00
|
|
|
|
|
|
|
# Download
|
2016-08-05 10:44:07 +00:00
|
|
|
a(:mmv_download_icon, class: 'mw-mmv-download-button')
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_download_menu, class: 'mw-mmv-download-dialog')
|
|
|
|
span(:mmv_download_size_label, class: 'mw-mmv-download-image-size')
|
|
|
|
span(:mmv_download_down_arrow_icon, class: 'mw-mmv-download-select-menu')
|
|
|
|
div(:mmv_download_size_menu_container, class: 'mw-mmv-download-size')
|
2014-11-12 14:17:12 +00:00
|
|
|
div(:mmv_download_size_menu) do |page|
|
2015-12-09 16:21:54 +00:00
|
|
|
page.mmv_download_size_menu_container_element.div_element(class: 'oo-ui-selectWidget')
|
2014-11-12 14:17:12 +00:00
|
|
|
end
|
2015-12-09 16:21:54 +00:00
|
|
|
divs(:mmv_download_size_options, class: 'oo-ui-menuOptionWidget')
|
|
|
|
a(:mmv_download_link, class: 'mw-mmv-download-go-button')
|
|
|
|
a(:mmv_download_preview_link, class: 'mw-mmv-download-preview-link')
|
|
|
|
div(:mmv_download_attribution_area, class: 'mw-mmv-download-attribution')
|
|
|
|
p(:mmv_download_attribution_area_close_icon, class: 'mw-mmv-download-attribution-close-button')
|
|
|
|
div(:mmv_download_attribution_area_input_container, class: 'mw-mmv-download-attr-input')
|
2014-11-12 14:17:12 +00:00
|
|
|
text_field(:mmv_download_attribution_area_input) do |page|
|
|
|
|
page.mmv_download_attribution_area_input_container_element.text_field_element
|
|
|
|
end
|
2014-10-15 18:06:41 +00:00
|
|
|
|
|
|
|
# Options
|
2017-03-18 06:38:33 +00:00
|
|
|
button(:mmv_options_icon, class: 'mw-mmv-options-button')
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_options_menu_disable, class: 'mw-mmv-options-disable')
|
|
|
|
div(:mmv_options_menu_enable, class: 'mw-mmv-options-enable')
|
2014-11-12 14:17:12 +00:00
|
|
|
button(:mmv_options_enable_button) do |page|
|
2015-12-09 16:21:54 +00:00
|
|
|
page.mmv_options_menu_enable_element.div_element(class: 'mw-mmv-options-submit').button_element(class: 'mw-mmv-options-submit-button')
|
2014-11-12 14:17:12 +00:00
|
|
|
end
|
|
|
|
button(:mmv_options_disable_button) do |page|
|
2015-12-09 16:21:54 +00:00
|
|
|
page.mmv_options_menu_disable_element.div_element(class: 'mw-mmv-options-submit').button_element(class: 'mw-mmv-options-submit-button')
|
2014-11-12 14:17:12 +00:00
|
|
|
end
|
|
|
|
button(:mmv_options_enable_cancel_button) do |page|
|
2015-12-09 16:21:54 +00:00
|
|
|
page.mmv_options_menu_enable_element.div_element(class: 'mw-mmv-options-submit').button_element(class: 'mw-mmv-options-cancel-button')
|
2014-11-12 14:17:12 +00:00
|
|
|
end
|
|
|
|
button(:mmv_options_disable_cancel_button) do |page|
|
2015-12-09 16:21:54 +00:00
|
|
|
page.mmv_options_menu_disable_element.div_element(class: 'mw-mmv-options-submit').button_element(class: 'mw-mmv-options-cancel-button')
|
2014-11-12 14:17:12 +00:00
|
|
|
end
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_options_disable_confirmation, class: 'mw-mmv-disable-confirmation')
|
2014-11-12 14:17:12 +00:00
|
|
|
div(:mmv_options_disable_x_icon) do |page|
|
2015-12-09 16:21:54 +00:00
|
|
|
page.mmv_options_disable_confirmation_element.div_element(class: 'mw-mmv-confirmation-close')
|
2014-11-12 14:17:12 +00:00
|
|
|
end
|
2015-12-09 16:21:54 +00:00
|
|
|
div(:mmv_options_enable_confirmation, class: 'mw-mmv-enable-confirmation')
|
2014-11-12 14:17:12 +00:00
|
|
|
div(:mmv_options_enable_x_icon) do |page|
|
2015-12-09 16:21:54 +00:00
|
|
|
page.mmv_options_enable_confirmation_element.div_element(class: 'mw-mmv-confirmation-close')
|
2014-11-12 14:17:12 +00:00
|
|
|
end
|
2014-01-15 00:03:34 +00:00
|
|
|
end
|