mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-17 11:13:34 +00:00
c8ce9608c0
Bug: T255447 Change-Id: I4cdde3070a6dc4e742ea37a78a17dfd556103dd6
33 lines
1 KiB
JavaScript
33 lines
1 KiB
JavaScript
'use strict';
|
|
|
|
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.isDisplayed(), true );
|
|
};
|
|
|
|
const iClickTheWatchstar = () => {
|
|
ArticlePage.waitUntilResourceLoaderModuleReady( 'skins.minerva.scripts' );
|
|
ArticlePage.watch_element.waitForExist();
|
|
ArticlePage.watch_element.click();
|
|
};
|
|
|
|
const iClickTheUnwatchStar = () => {
|
|
ArticlePage.waitUntilResourceLoaderModuleReady( 'skins.minerva.scripts' );
|
|
ArticlePage.watched_element.waitForExist();
|
|
ArticlePage.watched_element.click();
|
|
};
|
|
|
|
module.exports = {
|
|
theWatchstarShouldNotBeSelected, theWatchstarShouldBeSelected,
|
|
iClickTheWatchstar, iClickTheUnwatchStar };
|