2018-04-10 21:19:08 +00:00
|
|
|
/**
|
|
|
|
* Represents a generic article page
|
|
|
|
*
|
|
|
|
* @extends MinervaPage
|
|
|
|
* @example
|
|
|
|
* https://en.m.wikipedia.org/wiki/Barack_Obama
|
|
|
|
*/
|
|
|
|
|
|
|
|
const MinervaPage = require( './minerva_page' );
|
|
|
|
|
|
|
|
class ArticlePage extends MinervaPage {
|
|
|
|
|
2019-04-08 23:45:11 +00:00
|
|
|
get watch_element() { return $( '#ca-watch' ); }
|
|
|
|
get talk_element() { return $( '.talk ' ); }
|
|
|
|
get watched_element() { return $( '.mw-ui-icon-mf-watched' ); }
|
|
|
|
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-04-08 21:11:33 +00:00
|
|
|
get notifications_button_element() { return $( '.user-button' ); }
|
2018-04-10 21:19:08 +00:00
|
|
|
get category_element() { return $( '.category-button' ); }
|
2019-04-05 21:09:47 +00:00
|
|
|
get edit_link_element() { return $( '#ca-edit' ); }
|
|
|
|
get first_heading_element() { return $( '#section_0' ); }
|
|
|
|
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-04-05 21:09:47 +00:00
|
|
|
get red_link_element() { return $( 'a.new' ); }
|
2018-04-10 21:19:08 +00:00
|
|
|
get is_authenticated_element() { return $( 'body.is-authenticated' ); }
|
2019-09-12 23:42:24 +00:00
|
|
|
get last_modified_bar_history_link_element() { return $( '.last-modified-bar__text a[href*=\'Special:History\']' ); }
|
2018-04-10 21:19:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = new ArticlePage();
|