mediawiki-skins-MinervaNeue/tests/selenium/features/support/pages/article_page.js
Piotr Miazga e703f00655 Add History icon and Article/Talk tabs to default loggedin experience
Additional change:
Drop the feature file - no value in having to keep talk.js and talk.feature
in sync

Bug: T232594
Bug: T232652
Change-Id: Id8d05b1358f81845d70142ceebf193d8b192ee0a
2019-12-13 21:04:36 +00:00

37 lines
1.6 KiB
JavaScript

/**
* 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 {
get watch_element() { return $( '#ca-watch' ); }
get talk_tab_element() { return $( '.minerva__tab-container a[rel="discussion"]' ); }
get talk_element() { return $( '.talk ' ); }
get talk_add_element() { return $( '.minerva-talk-add-button' ); }
get first_section_element() {
return $( '.section-heading' );
}
get watched_element() { return $( '.mw-ui-icon-wikimedia-unStar-progressive, .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' ); }
get notifications_button_element() { return $( '#pt-notifications-alert' ); }
get category_element() { return $( '.category-button' ); }
get edit_link_element() { return $( '#ca-edit' ); }
get first_heading_element() { return $( '#section_0' ); }
get notification_element() { return $( '.mw-notification-area .mw-notification' ); }
get overlay_heading_element() { return $( '.overlay-title h2' ); }
get overlay_category_topic_item_element() { return $( '.topic-title-list li' ); }
get red_link_element() { return $( '#mw-content-text a.new' ); }
get is_authenticated_element() { return $( 'body.is-authenticated' ); }
get last_modified_bar_history_link_element() { return $( 'a.last-modified-bar__text[href*=\'Special:History\']' ); }
}
module.exports = new ArticlePage();