Debian Codegraph @

skins/MinervaNeue/tests/selenium/features/step_definitions/user_page_steps.js

raw symbols SCIP
1 'use strict';
2
3 const assert = require( 'assert' );
4 const { ArticlePage } = require( '../support/world.js' );
5 const { iAmOnPage } = require( './common_steps' );
6 const { theTextOfTheFirstHeadingShouldBe } = require( './editor_steps' );
7
8 const username = browser.config.mwUser.replace( /_/g, ' ' );
9
10 const iVisitMyUserPage = async () => {
11 await iAmOnPage( `User:${ username }` );
12 };
13
14 const iShouldBeOnMyUserPage = async () => {
15 await theTextOfTheFirstHeadingShouldBe( username );
16 };
17
18 const thereShouldBeALinkToMyContributions = async () => {
19 assert.strictEqual( await ArticlePage.contributions_link_element.isDisplayed(), true );
20 };
21 const thereShouldBeALinkToMyTalkPage = async () => {
22 assert.strictEqual( await ArticlePage.talk_tab_element.isDisplayed(), true );
23 };
24
25 module.exports = { iVisitMyUserPage, iShouldBeOnMyUserPage,
26 thereShouldBeALinkToMyContributions, thereShouldBeALinkToMyTalkPage };