mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-28 01:30:15 +00:00
Echo should notify user about mention on wikitext page
Bug: T146916 Change-Id: Id25dbc289fd3fe0fcb92bc4ec85f7851dc72026e
This commit is contained in:
parent
69dd622894
commit
286aeed94a
|
@ -36,4 +36,20 @@ describe 'Echo' do
|
|||
expect(welcome_notification['agent']['name']).to eq @random_username
|
||||
expect(welcome_notification['timestamp']['date']).to eq 'Today'
|
||||
end
|
||||
|
||||
it 'should notify user about mention on wikitext page' do
|
||||
@client.create_account(@random_username, @random_password)
|
||||
|
||||
page = SecureRandom.hex(5).capitalize
|
||||
@client.edit(title: page, text: "[[User:#{@random_username}]] ~~~~")
|
||||
|
||||
@client.log_in @random_username, @random_password
|
||||
notifications = @client.query(meta: 'notifications').data['notifications']['list']
|
||||
|
||||
mention_notification = notifications.last
|
||||
expect(mention_notification['type']).to eq 'mention'
|
||||
expect(mention_notification['agent']['name']).to eq @admin_username
|
||||
expect(mention_notification['title']['full']).to eq page
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue