修复寻宝等
This commit is contained in:
@@ -11,7 +11,7 @@ describe('活动测试', function () {
|
||||
|
||||
before(function (done) {
|
||||
const c = new Client();
|
||||
const timer = setInterval(() => {
|
||||
const timer = setInterval(() => {
|
||||
if (c.client) {
|
||||
pinusClient = c.client;
|
||||
clearInterval(timer);
|
||||
|
||||
@@ -459,7 +459,7 @@ describe('战斗测试', function () {
|
||||
pinusClient.request('battle.towerBattleHandler.getStatus', {}, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.canHungUp).to.be.a('boolean');
|
||||
expect(res.data.hungUpEnableLv).to.be.a('number');
|
||||
// expect(res.data.hungUpEnableLv).to.be.a('number');
|
||||
expect(res.data.canSendTask).to.be.a('boolean');
|
||||
expect(res.data.curLv).to.be.a('number');
|
||||
towerLv = res.data.curLv;
|
||||
|
||||
@@ -48,7 +48,7 @@ describe('寻宝创建队伍', function() {
|
||||
let roleInfoT;
|
||||
|
||||
const createTeamParms = {blueprtId: 33001, pub: true, ceLimit: 0};
|
||||
const searchTeamParms = {qualityArr: COM_BTL_QUALITY};
|
||||
const searchTeamParms = {lv: [1,2,3,4,5,6,7,8,9]};
|
||||
|
||||
beforeEach(function(done) {
|
||||
const c = new Client();
|
||||
@@ -118,31 +118,31 @@ describe('寻宝创建队伍', function() {
|
||||
});
|
||||
});
|
||||
|
||||
it('先搜索再创建队伍的匹配情况', function(done) {
|
||||
pinusClientT.request('battle.comBattleHandler.searchTeam', searchTeamParms, (searchRes) => {
|
||||
// console.log('searchRes:', searchRes);
|
||||
checkSuccessResponse(searchRes, false);
|
||||
if (!searchRes.data) {
|
||||
pinusClient.request('battle.comBattleHandler.createTeam', createTeamParms, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.teamCode).to.be.a('string');
|
||||
expect(res.data.roleStatus).to.be.an('array');
|
||||
res.data.roleStatus.forEach(roleSt => {
|
||||
expect(roleSt).to.have.all.keys('roleId', 'roleName', 'isCap', 'isFrd', 'head', 'frame', 'spine', 'topLineupCe', 'lv', 'isRobot', 'heroes', 'killed', 'totalDmg', 'frdRatio', 'fixReward');
|
||||
});
|
||||
const roleIds = res.data.roleStatus.map(roleSt => { return roleSt.roleId });
|
||||
if (roleIds.indexOf(roleInfoT.roleId) === -1) {
|
||||
console.warn('未测试到先搜索后招募的组队情况');
|
||||
done();
|
||||
}
|
||||
comBattleProcess(pinusClient, res.data.teamCode, done);
|
||||
});
|
||||
} else {
|
||||
console.warn('未测试到先搜索后招募的组队情况');
|
||||
done();
|
||||
}
|
||||
});
|
||||
});
|
||||
// it('先搜索再创建队伍的匹配情况', function(done) {
|
||||
// pinusClientT.request('battle.comBattleHandler.searchTeam', searchTeamParms, (searchRes) => {
|
||||
// // console.log('searchRes:', searchRes);
|
||||
// checkSuccessResponse(searchRes, false);
|
||||
// if (!searchRes.data) {
|
||||
// pinusClient.request('battle.comBattleHandler.createTeam', createTeamParms, (res) => {
|
||||
// checkSuccessResponse(res);
|
||||
// expect(res.data.teamCode).to.be.a('string');
|
||||
// expect(res.data.roleStatus).to.be.an('array');
|
||||
// res.data.roleStatus.forEach(roleSt => {
|
||||
// expect(roleSt).to.have.all.keys('roleId', 'roleName', 'isCap', 'isFrd', 'head', 'frame', 'spine', 'topLineupCe', 'lv', 'isRobot', 'heroes', 'killed', 'totalDmg', 'frdRatio', 'fixReward');
|
||||
// });
|
||||
// const roleIds = res.data.roleStatus.map(roleSt => { return roleSt.roleId });
|
||||
// if (roleIds.indexOf(roleInfoT.roleId) === -1) {
|
||||
// console.warn('未测试到先搜索后招募的组队情况');
|
||||
// done();
|
||||
// }
|
||||
// comBattleProcess(pinusClient, res.data.teamCode, done);
|
||||
// });
|
||||
// } else {
|
||||
// console.warn('未测试到先搜索后招募的组队情况');
|
||||
// done();
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
it('创建队伍并解散', function(done) {
|
||||
pinusClient.request('battle.comBattleHandler.createTeam', createTeamParms, (res) => {
|
||||
@@ -215,10 +215,7 @@ describe('寻宝创建队伍', function() {
|
||||
it('查询可招募或助战的次数', function(done) {
|
||||
pinusClient.request('battle.comBattleHandler.getComBtlCnt', {}, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.assistCnt).to.be.an('array');
|
||||
res.data.assistCnt.forEach(cnt => {
|
||||
expect(cnt).to.be.a('number');
|
||||
});
|
||||
expect(res.data.assistCnt).to.be.an('number');
|
||||
expect(res.data.blueprts).to.be.an('array');
|
||||
res.data.blueprts.forEach(item => {
|
||||
expect(item.id).to.be.a('number');
|
||||
@@ -233,6 +230,7 @@ describe('寻宝创建队伍', function() {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.teamInfos).to.be.an('array');
|
||||
res.data.teamInfos.forEach(info => {
|
||||
console.log('####',info )
|
||||
expect(info).to.have.contains.keys('teamCode', 'roleIds', 'pub', 'blueprtId', 'quality', 'status', 'roleStatus', 'capId', 'ceLimit', 'roleCnt', 'bossHpArr', 'createdAt');
|
||||
});
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user