2020-06-02 21:21:44 +00:00
|
|
|
'use strict';
|
|
|
|
|
2019-04-08 23:45:11 +00:00
|
|
|
const assert = require( 'assert' );
|
|
|
|
const { ArticlePage } = require( '../support/world.js' );
|
|
|
|
const { iAmOnPage } = require( './common_steps' );
|
|
|
|
const { theTextOfTheFirstHeadingShouldBe } = require( './editor_steps' );
|
|
|
|
|
2020-06-15 14:54:05 +00:00
|
|
|
const username = browser.config.mwUser.replace( /_/g, ' ' );
|
2019-04-08 23:45:11 +00:00
|
|
|
|
2023-04-06 22:25:40 +00:00
|
|
|
const iVisitMyUserPage = async () => {
|
2024-01-24 22:02:12 +00:00
|
|
|
await iAmOnPage( `User:${ username }` );
|
2019-04-08 23:45:11 +00:00
|
|
|
};
|
|
|
|
|
2023-04-06 22:25:40 +00:00
|
|
|
const iShouldBeOnMyUserPage = async () => {
|
|
|
|
await theTextOfTheFirstHeadingShouldBe( username );
|
2019-04-08 23:45:11 +00:00
|
|
|
};
|
|
|
|
|
2023-04-06 22:25:40 +00:00
|
|
|
const thereShouldBeALinkToMyContributions = async () => {
|
|
|
|
assert.strictEqual( await ArticlePage.contributions_link_element.isDisplayed(), true );
|
2019-04-08 23:45:11 +00:00
|
|
|
};
|
2023-04-06 22:25:40 +00:00
|
|
|
const thereShouldBeALinkToMyTalkPage = async () => {
|
|
|
|
assert.strictEqual( await ArticlePage.talk_tab_element.isDisplayed(), true );
|
2019-04-08 23:45:11 +00:00
|
|
|
};
|
|
|
|
|
2019-10-01 01:19:38 +00:00
|
|
|
module.exports = { iVisitMyUserPage, iShouldBeOnMyUserPage,
|
2019-04-08 23:45:11 +00:00
|
|
|
thereShouldBeALinkToMyContributions, thereShouldBeALinkToMyTalkPage };
|