Debian Codegraph @

tests/api-testing/action/NewTalkNotification.js

raw symbols SCIP
1 'use strict';
2
3 const { action, assert } = require( 'api-testing' );
4
5 describe( 'Testing a new talk page notification', () => {
6 let kam = action.getAnon();
7 let alice;
8
9 before( async () => {
10 [ alice, kam ] = await Promise.all( [
11 action.alice(),
12 kam.account( 'Kam_' )
13 ] );
14 } );
15
16 it( 'should edit a user\'s talk page', async () => {
17 await alice.edit( `User_talk:${ kam.username }`, { text: 'Hi, Kam! ~~~~', summary: 'saying hello', createonly: true } );
18 } );
19
20 it( 'user should have a new message notification', async () => {
21 // FIXME: https://phabricator.wikimedia.org/T230211
22 const result = await kam.meta( 'userinfo', { uiprop: 'hasmsg' } );
23
24 assert.exists( result.messages );
25 assert.equal( result.name, kam.username );
26 assert.equal( result.id, kam.userid );
27 } );
28 } );