wiki.techinc.nl/tests/api-testing/action/NewTalkNotification.js
James D. Forrester c2aa05102d build: Upgrade eslint-config-wikimedia from 0.25.0 to 0.26.0 and make pass
Mostly this has a bunch of whitespace changes from the
template-curly-spacing and brace-style rules being set
to align with other spacing rules.

Change-Id: I4609c52a4ef426ad1f35fb4bfe447bb08323a8e8
2023-11-22 13:25:32 -05:00

28 lines
803 B
JavaScript

'use strict';
const { action, assert } = require( 'api-testing' );
describe( 'Testing a new talk page notification', function () {
let kam = action.getAnon();
let alice;
before( async () => {
[ alice, kam ] = await Promise.all( [
action.alice(),
kam.account( 'Kam_' )
] );
} );
it( 'should edit a user\'s talk page', async () => {
await alice.edit( `User_talk:${ kam.username }`, { text: 'Hi, Kam! ~~~~', summary: 'saying hello', createonly: true } );
} );
it( 'user should have a new message notification', async () => {
// FIXME: https://phabricator.wikimedia.org/T230211
const result = await kam.meta( 'userinfo', { uiprop: 'hasmsg' } );
assert.exists( result.messages );
assert.equal( result.name, kam.username );
assert.equal( result.id, kam.userid );
} );
} );