聊天:加入玩家发起的群聊和测试用例
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { PinusWSClient } from 'pinus-robot-plugin';
|
||||
import { expect } from 'chai';
|
||||
import { checkSuccessResponse } from './CheckPatten';
|
||||
import { ON_ADD_CHANNEL_ROUTE } from '../app/consts';
|
||||
|
||||
export class Client {
|
||||
private _client;
|
||||
@@ -19,6 +20,11 @@ export class Client {
|
||||
this._client.request('connector.entryHandler.debugQueryToken', {tel, magicWord: 'zyz666server518'}, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.token).to.be.an('string');
|
||||
this._client.on(ON_ADD_CHANNEL_ROUTE, (msg) => {
|
||||
checkSuccessResponse(msg);
|
||||
expect(msg.data.roleId).to.be.a('string');
|
||||
expect(msg.data.channelName).to.be.a('string');
|
||||
});
|
||||
this._client.request('connector.entryHandler.enter', {serverId: 1, ...res.data}, (enterRes) => {
|
||||
// 消息回调
|
||||
// console.log('connector返回');
|
||||
|
||||
Reference in New Issue
Block a user