聊天:修改部分接口字段和命名
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { DEFAULT_MSG_PER_PAGE, MSG_TYPE, ON_MSG_ROUTE, ON_GROUP_MSG_ROUTE, CHANNEL_PREFIX, DEBUG_MAGIC_WORD, STATUS, HERO_GROW_MAX, ABI_STAGE } from './../app/consts';
|
||||
import { DEFAULT_MSG_PER_PAGE, MSG_TYPE, ON_PRIVATE_MSG_ROUTE, ON_GROUP_MSG_ROUTE, CHANNEL_PREFIX, DEBUG_MAGIC_WORD, STATUS, HERO_GROW_MAX, ABI_STAGE } from './../app/consts';
|
||||
import { Client } from './Client';
|
||||
import 'mocha';
|
||||
import { PinusWSClient } from 'pinus-robot-plugin';
|
||||
@@ -122,7 +122,7 @@ describe('聊天测试', function() {
|
||||
});
|
||||
|
||||
it('两个玩家互相发送', function(done) {
|
||||
pinusClientT.on(ON_MSG_ROUTE, (msg) => {
|
||||
pinusClientT.on(ON_PRIVATE_MSG_ROUTE, (msg) => {
|
||||
checkSuccessResponse(msg);
|
||||
expect(msg.data.content).to.equal(TEXT_MSG.content);
|
||||
done();
|
||||
@@ -144,6 +144,7 @@ describe('聊天测试', function() {
|
||||
setTimeout(() => {
|
||||
pinusClient.request('chat.chatHandler.getPrivateMessage', {targetRoleId: roleInfoT.roleId}, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.targetRoleId).to.be.a('string');
|
||||
expect(res.data.msgs).to.be.an('array');
|
||||
expect(res.data.msgs.length).to.be.equal(DEFAULT_MSG_PER_PAGE);
|
||||
res.data.msgs.forEach(msg => {
|
||||
|
||||
@@ -184,7 +184,7 @@ describe('寻宝创建队伍', function() {
|
||||
checkSuccessResponse(dismissRes, false);
|
||||
done();
|
||||
});
|
||||
}, 500);
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user