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
|
|
|
|
2014-04-20 15:42:40 +00:00
|
|
|
page_url URL.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
|
2014-04-11 09:31:38 +00:00
|
|
|
a(:image1_in_article, class: "image", href: /Kerala\.jpg$/)
|
2014-10-03 12:55:42 +00:00
|
|
|
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
|
|
|
|
div(:mmv_overlay, class: "mw-mmv-overlay")
|
|
|
|
|
2014-02-20 02:46:28 +00:00
|
|
|
# Wrapper div for all mmv elements
|
2014-03-31 21:33:12 +00:00
|
|
|
div(:mmv_wrapper, class: "mw-mmv-wrapper")
|
2014-02-20 02:46:28 +00:00
|
|
|
|
|
|
|
# Wrapper div for image
|
2014-03-31 21:33:12 +00:00
|
|
|
div(:mmv_image_div, class: "mw-mmv-image")
|
2014-02-20 02:46:28 +00:00
|
|
|
|
|
|
|
# Metadata elements
|
2014-03-31 21:33:12 +00:00
|
|
|
span(:mmv_metadata_title, class: "mw-mmv-title")
|
2014-10-27 14:03:16 +00:00
|
|
|
a(:mmv_metadata_license, class: "mw-mmv-license")
|
2014-03-31 21:33:12 +00:00
|
|
|
p(:mmv_metadata_credit, class: "mw-mmv-credit")
|
|
|
|
span(:mmv_metadata_source, class: "mw-mmv-source")
|
2014-02-20 02:46:28 +00:00
|
|
|
|
2014-03-31 21:33:12 +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
|
|
|
|
2014-03-31 21:33:12 +00:00
|
|
|
ul(:mmv_image_metadata_links_wrapper, class: "mw-mmv-image-links")
|
2014-09-30 11:40:34 +00:00
|
|
|
a(:mmv_details_page_link, class: "mw-mmv-description-page-button")
|
2014-02-20 02:46:28 +00:00
|
|
|
|
|
|
|
# Controls
|
2014-03-31 21:33:12 +00:00
|
|
|
div(:mmv_next_button, class: "mw-mmv-next-image")
|
|
|
|
div(:mmv_previous_button, class: "mw-mmv-prev-image")
|
|
|
|
div(:mmv_close_button, class: "mw-mmv-close")
|
2014-04-01 08:46:48 +00:00
|
|
|
div(:mmv_image_loaded_cucumber, class: "mw-mmv-image-loaded-cucumber")
|
2014-10-03 12:55:42 +00:00
|
|
|
|
|
|
|
# Download
|
|
|
|
div(:mmv_download_icon, class: "mw-mmv-download-button")
|
|
|
|
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-10-15 18:06:41 +00:00
|
|
|
div(:mmv_download_size_menu) {
|
|
|
|
|page| page.mmv_download_size_menu_container_element.div_element(class: "oo-ui-selectWidget")
|
|
|
|
}
|
2014-10-03 12:55:42 +00:00
|
|
|
divs(:mmv_download_size_options, class: "oo-ui-menuItemWidget")
|
|
|
|
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-10-15 18:06:41 +00:00
|
|
|
text_field(:mmv_download_attribution_area_input) {
|
|
|
|
|page| page.mmv_download_attribution_area_input_container_element.text_field_element
|
|
|
|
}
|
|
|
|
|
|
|
|
# Options
|
|
|
|
div(:mmv_options_icon, class: "mw-mmv-options-button")
|
|
|
|
div(:mmv_options_menu_disable, class: "mw-mmv-options-disable")
|
|
|
|
div(:mmv_options_menu_enable, class: "mw-mmv-options-enable")
|
|
|
|
button(:mmv_options_enable_button) {
|
|
|
|
|page| page.mmv_options_menu_enable_element.div_element(class: "mw-mmv-options-submit").button_element(class: "mw-mmv-options-submit-button")
|
|
|
|
}
|
|
|
|
button(:mmv_options_disable_button) {
|
|
|
|
|page| page.mmv_options_menu_disable_element.div_element(class: "mw-mmv-options-submit").button_element(class: "mw-mmv-options-submit-button")
|
|
|
|
}
|
|
|
|
button(:mmv_options_enable_cancel_button) {
|
|
|
|
|page| page.mmv_options_menu_enable_element.div_element(class: "mw-mmv-options-submit").button_element(class: "mw-mmv-options-cancel-button")
|
|
|
|
}
|
|
|
|
button(:mmv_options_disable_cancel_button) {
|
|
|
|
|page| page.mmv_options_menu_disable_element.div_element(class: "mw-mmv-options-submit").button_element(class: "mw-mmv-options-cancel-button")
|
|
|
|
}
|
|
|
|
div(:mmv_options_disable_confirmation, class: "mw-mmv-disable-confirmation")
|
|
|
|
div(:mmv_options_disable_x_icon) {
|
|
|
|
|page| page.mmv_options_disable_confirmation_element.div_element(class: "mw-mmv-confirmation-close")
|
|
|
|
}
|
|
|
|
div(:mmv_options_enable_confirmation, class: "mw-mmv-enable-confirmation")
|
|
|
|
div(:mmv_options_enable_x_icon) {
|
|
|
|
|page| page.mmv_options_enable_confirmation_element.div_element(class: "mw-mmv-confirmation-close")
|
|
|
|
}
|
2014-01-15 00:03:34 +00:00
|
|
|
end
|