mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-19 03:55:55 +00:00
544b0e70c9
Bug: T219920 Change-Id: I9f651d73cae8d6494ffa585ac3cbd791686b926a
31 lines
1 KiB
JavaScript
31 lines
1 KiB
JavaScript
const assert = require( 'assert' );
|
|
const { ArticlePage } = require( '../support/world.js' );
|
|
|
|
const theWatchstarShouldNotBeSelected = () => {
|
|
ArticlePage.watch_element.waitForExist();
|
|
assert.strictEqual( ArticlePage.watched_element.isExisting(), false,
|
|
'the watched element should not be present' );
|
|
};
|
|
|
|
const theWatchstarShouldBeSelected = () => {
|
|
ArticlePage.watched_element.waitForExist();
|
|
const watchstar = ArticlePage.watched_element;
|
|
assert.strictEqual( watchstar.isVisible(), true );
|
|
};
|
|
|
|
const iClickTheWatchstar = () => {
|
|
ArticlePage.waitUntilResourceLoaderModuleReady( 'skins.minerva.watchstar' );
|
|
ArticlePage.watch_element.waitForExist();
|
|
ArticlePage.watch_element.click();
|
|
};
|
|
|
|
const iClickTheUnwatchStar = () => {
|
|
ArticlePage.waitUntilResourceLoaderModuleReady( 'skins.minerva.watchstar' );
|
|
ArticlePage.watch_element.waitForExist();
|
|
ArticlePage.watch_element.click();
|
|
};
|
|
|
|
module.exports = {
|
|
theWatchstarShouldNotBeSelected, theWatchstarShouldBeSelected,
|
|
iClickTheWatchstar, iClickTheUnwatchStar };
|