2018-04-10 21:19:08 +00:00
|
|
|
/**
|
|
|
|
* Represents a generic article page
|
|
|
|
*
|
|
|
|
* @extends MinervaPage
|
|
|
|
* @example
|
|
|
|
* https://en.m.wikipedia.org/wiki/Barack_Obama
|
|
|
|
*/
|
|
|
|
|
2020-06-02 21:21:44 +00:00
|
|
|
'use strict';
|
|
|
|
|
2018-04-10 21:19:08 +00:00
|
|
|
const MinervaPage = require( './minerva_page' );
|
|
|
|
|
|
|
|
class ArticlePage extends MinervaPage {
|
2019-12-12 22:49:48 +00:00
|
|
|
get contributions_link_element() {
|
|
|
|
return $( '.page-actions-menu .menu__item--page-actions-contributions' );
|
|
|
|
}
|
2019-04-08 23:45:11 +00:00
|
|
|
get watch_element() { return $( '#ca-watch' ); }
|
2019-12-17 19:31:52 +00:00
|
|
|
get reference_element() { return $( 'sup a' ); }
|
|
|
|
get drawer_reference_element() { return $( '.drawer sup a' ); }
|
2019-12-13 19:51:24 +00:00
|
|
|
get talk_tab_element() { return $( '.minerva__tab-container a[rel="discussion"]' ); }
|
2019-12-17 19:31:52 +00:00
|
|
|
get mask_element() { return $( '.mw-mf-page-center__mask' ); }
|
2020-01-13 23:32:05 +00:00
|
|
|
get drawer_mask_element() { return $( '.drawer-container__mask--visible' ); }
|
2023-09-12 21:22:20 +00:00
|
|
|
get watched_element() { return $( '.minerva-icon--unStar-progressive' ); }
|
2019-04-08 23:45:11 +00:00
|
|
|
get menu_button_element() { return $( '#mw-mf-main-menu-button' ); }
|
|
|
|
get search_icon_element() { return $( '#searchIcon' ); }
|
|
|
|
get menu_element() { return $( 'nav' ); }
|
|
|
|
get user_links_element() { return $( '.user-links' ); }
|
2019-10-01 21:40:49 +00:00
|
|
|
get notifications_button_element() { return $( '#pt-notifications-alert' ); }
|
2019-12-17 19:31:52 +00:00
|
|
|
get drawer_element() { return $( '.drawer' ); }
|
2023-10-06 21:27:49 +00:00
|
|
|
get edit_link_element() { return $( '#ca-editsource, #ca-createsource, #ca-edit, #ca-create' ); }
|
2021-11-05 18:21:09 +00:00
|
|
|
get first_heading_element() { return $( 'h1.mw-first-heading' ); }
|
2019-04-05 21:09:47 +00:00
|
|
|
get notification_element() { return $( '.mw-notification-area .mw-notification' ); }
|
2018-04-10 21:19:08 +00:00
|
|
|
get overlay_heading_element() { return $( '.overlay-title h2' ); }
|
|
|
|
get overlay_category_topic_item_element() { return $( '.topic-title-list li' ); }
|
2019-12-13 19:51:24 +00:00
|
|
|
get red_link_element() { return $( '#mw-content-text a.new' ); }
|
2018-04-10 21:19:08 +00:00
|
|
|
get is_authenticated_element() { return $( 'body.is-authenticated' ); }
|
2019-09-26 11:27:39 +00:00
|
|
|
get last_modified_bar_history_link_element() { return $( 'a.last-modified-bar__text[href*=\'Special:History\']' ); }
|
2018-04-10 21:19:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = new ArticlePage();
|