diff --git a/game-server/app/services/task/taskService.ts b/game-server/app/services/task/taskService.ts index 040e395fd..11d80cca0 100644 --- a/game-server/app/services/task/taskService.ts +++ b/game-server/app/services/task/taskService.ts @@ -21,7 +21,7 @@ import { checkPopUpConditionInCreateHero } from '../activity/popUpShopService'; export async function checkTaskWithRoles(serverId: number, roleId: string, sid: string, taskType: TASK_TYPE, roles: RoleType[]) { for (let role of roles) { if (role) { - await checkTask(serverId, role.roleId, role.roleId == roleId ? sid : null, taskType, role); + await checkTaskWithRole(serverId, role.roleId, role.roleId == roleId ? sid : null, taskType, role); } } } diff --git a/game-server/test/activity.test.ts b/game-server/test/activity.test.ts index 347cc36b2..78c4c4a6e 100644 --- a/game-server/test/activity.test.ts +++ b/game-server/test/activity.test.ts @@ -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); diff --git a/game-server/test/battle.test.ts b/game-server/test/battle.test.ts index 7d9eb040d..82fb9d38f 100644 --- a/game-server/test/battle.test.ts +++ b/game-server/test/battle.test.ts @@ -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; diff --git a/game-server/test/comBattle.test.ts b/game-server/test/comBattle.test.ts index aa92f0a05..e235f8f1a 100644 --- a/game-server/test/comBattle.test.ts +++ b/game-server/test/comBattle.test.ts @@ -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();