寻宝:匹配的队伍也要超时判负;action 返回本次伤害;测试用例修改
This commit is contained in:
@@ -13,8 +13,10 @@ describe('寻宝创建队伍', function() {
|
||||
var pinusClient;
|
||||
var roleInfo;
|
||||
|
||||
const loginParm = {token:'mgn0njiajb6kapid3eekvt7tssxelig9zi2oq2bzkxr4zzi9w9', serverId: 1};
|
||||
const createTeamParm = {blueprtId: 33001, pub: true, ceLimit: 0};
|
||||
const loginParms = {token:'mgn0njiajb6kapid3eekvt7tssxelig9zi2oq2bzkxr4zzi9w9', serverId: 1};
|
||||
const createTeamParms = {blueprtId: 33001, pub: true, ceLimit: 0};
|
||||
const searchTeamParms = {qualityArr: [1, 2, 3, 4, 5]};
|
||||
|
||||
beforeEach(function(done) {
|
||||
pinusClient = new PinusWSClient();
|
||||
pinusClient.on(PinusWSClientEvent.EVENT_IO_ERROR, (event) => {
|
||||
@@ -42,11 +44,11 @@ describe('寻宝创建队伍', function() {
|
||||
port: port
|
||||
}, (data) => {
|
||||
// 连接成功执行函数
|
||||
console.log('gate连接成功', data);
|
||||
// console.log('gate连接成功', data);
|
||||
// done();
|
||||
pinusClient.request('connector.entryHandler.enter', loginParm, (ret) => {
|
||||
pinusClient.request('connector.entryHandler.enter', loginParms, (ret) => {
|
||||
// 消息回调
|
||||
console.log('connector返回', JSON.stringify(ret));
|
||||
// console.log('connector返回', JSON.stringify(ret));
|
||||
roleInfo = ret.role;
|
||||
done();
|
||||
});
|
||||
@@ -58,8 +60,8 @@ describe('寻宝创建队伍', function() {
|
||||
done();
|
||||
});
|
||||
|
||||
it('直接返回队伍', function(done) {
|
||||
pinusClient.request('battle.comBattleHandler.createTeam', createTeamParm, (res) => {
|
||||
it('创建队伍并解散', function(done) {
|
||||
pinusClient.request('battle.comBattleHandler.createTeam', createTeamParms, (res) => {
|
||||
expect(res).to.be.an('object');
|
||||
expect(res.code).equal(0);
|
||||
expect(res.data).to.be.an('object');
|
||||
@@ -68,10 +70,24 @@ describe('寻宝创建队伍', function() {
|
||||
res.data.roleStatus.forEach(roleSt => {
|
||||
expect(roleSt).to.have.all.keys('roleId', 'roleName', 'isCap', 'isFrd', 'headHid', 'sHid', 'topFiveCe', 'lv', 'isRobot', 'heroes', 'killed', 'totalDmg');
|
||||
});
|
||||
done();
|
||||
pinusClient.request('battle.comBattleHandler.dismiss', {teamCode: res.data.teamCode}, (dismissRes) => {
|
||||
expect(dismissRes).to.be.an('object');
|
||||
expect(dismissRes.code).equal(0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
// it('加入队伍,机器人的话直接开战', function(done) {
|
||||
// this.timeout(65 * 1000);
|
||||
// pinusClient.request('battle.comBattleHandler.searchTeam', searchTeamParms, (res) => {
|
||||
// expect(res).to.be.an('object');
|
||||
// expect(res.code).equal(0);
|
||||
// expect(res.data).to.be.an('object');
|
||||
// expect(res.data.teamCode).to.be.a('string');
|
||||
// });
|
||||
// });
|
||||
|
||||
it('获取寻宝记录', function(done) {
|
||||
pinusClient.request('battle.comBattleHandler.getTeamRec', {}, (res) => {
|
||||
expect(res).to.be.an('object');
|
||||
|
||||
Reference in New Issue
Block a user