mediawiki-skins-MinervaNeue/tests/selenium/features/support/pages/article_page.js
jdlrobson ab61dbb173 Echo is removed from Minerva
Managing the transition from old implementation to new:
* A version number is exported from skins.minerva.scripts to
tell dormant code added to Echo in I09c27a084100b223662f84de6cbe01bebe1fe774
to begin running.
* A skinStyle is added for the new `ext.echo.mobile` module.
`mobile.notifications.overlay` will soon cease to exist but is kept registered for
backwards compatibility reasons
- Drop ev.preventDefault call from onSkinClick - it is no longer necessary and will ensure
notifications overlay closes when shield is clicked while it is open.

Integration:
* A server side hook SkinMinervaReplaceNotificationsBadge allows Echo to replace
the current Minerva notification badge
* A to-be-created client side hook is subscribed to to deal with the navigations drawer
like functionality using the mainMenu code
* id and class names are added to the container for the NotificationBadge for compatibility with
ext.echo.init in Minerva's desktop mode (it will work like Vector)

See I09c27a084100b223662f84de6cbe01bebe1fe774 for understanding the bigger
picture.

Depends-On:  I09c27a084100b223662f84de6cbe01bebe1fe774
Bug: T221007
Change-Id: I4c11f1b241d629e1b294ebaec17472fbf944f8c7
2019-10-08 23:21:12 +00:00

33 lines
1.4 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_element() { return $( '.talk ' ); }
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 $( '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();