jenkins:拍卖行测试修改
This commit is contained in:
@@ -157,7 +157,7 @@ export class GuildHandler {
|
|||||||
// 击杀奖励&伤害奖励
|
// 击杀奖励&伤害奖励
|
||||||
let dicBossBase = gameData.bossBaseByBossLv.get(bossLv);
|
let dicBossBase = gameData.bossBaseByBossLv.get(bossLv);
|
||||||
let dicWar = gameData.war.get(warId);
|
let dicWar = gameData.war.get(warId);
|
||||||
await sendMailToGuildByContent(MAIL_TYPE.GUILD_BOSS_REWARD, roleId, {
|
await sendMailToGuildByContent(MAIL_TYPE.GUILD_BOSS_REWARD, guildCode, {
|
||||||
params: [`${dicWar.gk_name}`], goods: dicBossBase.killReward
|
params: [`${dicWar.gk_name}`], goods: dicBossBase.killReward
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ describe('拍卖行测试', function () {
|
|||||||
|
|
||||||
it('添加拍品', function (done) {
|
it('添加拍品', function (done) {
|
||||||
const sourceCode = Math.random().toString(36).slice(-8);
|
const sourceCode = Math.random().toString(36).slice(-8);
|
||||||
pinusClient.request('battle.auctionHandler.debugAddLots', { magicWord: DEBUG_MAGIC_WORD, sourceType: AUCTION_SOURCE.GATE, sourceCode, poolId: 1 }, (res) => {
|
pinusClient.request('guild.auctionHandler.debugAddLots', { magicWord: DEBUG_MAGIC_WORD, sourceType: AUCTION_SOURCE.GATE, sourceCode, poolId: 1 }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.lots).to.be.an('array');
|
expect(res.data.lots).to.be.an('array');
|
||||||
for (let lot of res.data.lots) {
|
for (let lot of res.data.lots) {
|
||||||
@@ -94,7 +94,7 @@ describe('拍卖行测试', function () {
|
|||||||
|
|
||||||
it('获取拍卖行数据', function (done) {
|
it('获取拍卖行数据', function (done) {
|
||||||
try {
|
try {
|
||||||
pinusClient.request('battle.auctionHandler.getAuction', {}, (res) => {
|
pinusClient.request('guild.auctionHandler.getAuction', {}, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
|
|
||||||
expect(res.data.lots).to.be.an('array');
|
expect(res.data.lots).to.be.an('array');
|
||||||
@@ -118,7 +118,7 @@ describe('拍卖行测试', function () {
|
|||||||
expect(info.id).to.be.equal(gid);
|
expect(info.id).to.be.equal(gid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
pinusClient.request('battle.auctionHandler.getAuction', {}, (res) => {
|
pinusClient.request('guild.auctionHandler.getAuction', {}, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.lots).to.be.an('array');
|
expect(res.data.lots).to.be.an('array');
|
||||||
checkLots(res.data.lots);
|
checkLots(res.data.lots);
|
||||||
@@ -135,7 +135,7 @@ describe('拍卖行测试', function () {
|
|||||||
done();
|
done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pinusClient.request('battle.auctionHandler.offer', { code: unsoldLots[0].code, max: false }, (res) => {
|
pinusClient.request('guild.auctionHandler.offer', { code: unsoldLots[0].code, max: false }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkLot(res.data.lot);
|
checkLot(res.data.lot);
|
||||||
if (res.data.dividend) {
|
if (res.data.dividend) {
|
||||||
@@ -150,7 +150,7 @@ describe('拍卖行测试', function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
gid = unsoldLots[0].gid;
|
gid = unsoldLots[0].gid;
|
||||||
pinusClient.request('battle.auctionHandler.offer', { code: unsoldLots[0].code, max: true }, (res) => {
|
pinusClient.request('guild.auctionHandler.offer', { code: unsoldLots[0].code, max: true }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkLot(res.data.lot);
|
checkLot(res.data.lot);
|
||||||
if(res.data.dividend) {
|
if(res.data.dividend) {
|
||||||
@@ -166,7 +166,7 @@ describe('拍卖行测试', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('关注后取关', function (done) {
|
it('关注后取关', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.getAuction', {}, (res) => {
|
pinusClient.request('guild.auctionHandler.getAuction', {}, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.lots).to.be.an('array');
|
expect(res.data.lots).to.be.an('array');
|
||||||
checkLots(res.data.lots);
|
checkLots(res.data.lots);
|
||||||
@@ -178,11 +178,11 @@ describe('拍卖行测试', function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const code = res.data.lots[0].code;
|
const code = res.data.lots[0].code;
|
||||||
pinusClient.request('battle.auctionHandler.watchLot', { code }, (res) => {
|
pinusClient.request('guild.auctionHandler.watchLot', { code }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkLot(res.data.lot);
|
checkLot(res.data.lot);
|
||||||
expect(res.data.lot.watchingRoles.indexOf(roleInfo.roleId)).to.be.above(-1);
|
expect(res.data.lot.watchingRoles.indexOf(roleInfo.roleId)).to.be.above(-1);
|
||||||
pinusClient.request('battle.auctionHandler.unWatchLot', { code }, (res) => {
|
pinusClient.request('guild.auctionHandler.unWatchLot', { code }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkLot(res.data.lot);
|
checkLot(res.data.lot);
|
||||||
expect(res.data.lot.watchingRoles.indexOf(roleInfo.roleId)).to.be.equal(-1);
|
expect(res.data.lot.watchingRoles.indexOf(roleInfo.roleId)).to.be.equal(-1);
|
||||||
@@ -193,7 +193,7 @@ describe('拍卖行测试', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('查看分红', function (done) {
|
it('查看分红', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.checkDividend', {}, (res) => {
|
pinusClient.request('guild.auctionHandler.checkDividend', {}, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkDividends(res.data.dividends);
|
checkDividends(res.data.dividends);
|
||||||
done();
|
done();
|
||||||
@@ -208,7 +208,7 @@ describe('拍卖行测试', function () {
|
|||||||
expect(info.id).to.be.equal(CURRENCY_BY_TYPE.get(CURRENCY_TYPE.GOLD));
|
expect(info.id).to.be.equal(CURRENCY_BY_TYPE.get(CURRENCY_TYPE.GOLD));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
pinusClient.request('battle.auctionHandler.debugSetDividendStatus', { magicWord: DEBUG_MAGIC_WORD, sourceType: AUCTION_SOURCE.GATE, status: DIVIDEND_STATUS.END }, (res) => {
|
pinusClient.request('guild.auctionHandler.debugSetDividendStatus', { magicWord: DEBUG_MAGIC_WORD, sourceType: AUCTION_SOURCE.GATE, status: DIVIDEND_STATUS.END }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkDividend(res.data.dividend);
|
checkDividend(res.data.dividend);
|
||||||
// TODO: 找个测试领取分红的方法
|
// TODO: 找个测试领取分红的方法
|
||||||
@@ -218,7 +218,7 @@ describe('拍卖行测试', function () {
|
|||||||
done();
|
done();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pinusClient.request('battle.auctionHandler.getDividend', { sourceType: AUCTION_SOURCE.GATE }, (res) => {
|
pinusClient.request('guild.auctionHandler.getDividend', { sourceType: AUCTION_SOURCE.GATE }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.dividend).to.be.an('object');
|
expect(res.data.dividend).to.be.an('object');
|
||||||
expect(res.data.dividend.roleId).to.be.a('string');
|
expect(res.data.dividend.roleId).to.be.a('string');
|
||||||
@@ -234,7 +234,7 @@ describe('拍卖行测试', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('查看我的关注', function (done) {
|
it('查看我的关注', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.getAuction', {}, (res) => {
|
pinusClient.request('guild.auctionHandler.getAuction', {}, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.lots).to.be.an('array');
|
expect(res.data.lots).to.be.an('array');
|
||||||
checkLots(res.data.lots);
|
checkLots(res.data.lots);
|
||||||
@@ -246,11 +246,11 @@ describe('拍卖行测试', function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const code = res.data.lots[0].code;
|
const code = res.data.lots[0].code;
|
||||||
pinusClient.request('battle.auctionHandler.watchLot', { code }, (res) => {
|
pinusClient.request('guild.auctionHandler.watchLot', { code }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkLot(res.data.lot);
|
checkLot(res.data.lot);
|
||||||
expect(res.data.lot.watchingRoles.indexOf(roleInfo.roleId)).to.be.above(-1);
|
expect(res.data.lot.watchingRoles.indexOf(roleInfo.roleId)).to.be.above(-1);
|
||||||
pinusClient.request('battle.auctionHandler.myWatching', {}, (res) => {
|
pinusClient.request('guild.auctionHandler.myWatching', {}, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkLots(res.data.lots);
|
checkLots(res.data.lots);
|
||||||
done();
|
done();
|
||||||
@@ -260,7 +260,7 @@ describe('拍卖行测试', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('更新拍品阶段的测试接口', function (done) {
|
it('更新拍品阶段的测试接口', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.getAuction', {}, (res) => {
|
pinusClient.request('guild.auctionHandler.getAuction', {}, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.lots).to.be.an('array');
|
expect(res.data.lots).to.be.an('array');
|
||||||
checkLots(res.data.lots);
|
checkLots(res.data.lots);
|
||||||
@@ -272,7 +272,7 @@ describe('拍卖行测试', function () {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const code = res.data.lots[0].code;
|
const code = res.data.lots[0].code;
|
||||||
pinusClient.request('battle.auctionHandler.debugSetLotStage', { code, magicWord: DEBUG_MAGIC_WORD, auctionStage: AUCTION_STAGE.GUILD }, (res) => {
|
pinusClient.request('guild.auctionHandler.debugSetLotStage', { code, magicWord: DEBUG_MAGIC_WORD, auctionStage: AUCTION_STAGE.GUILD }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
checkLot(res.data.lot);
|
checkLot(res.data.lot);
|
||||||
done();
|
done();
|
||||||
@@ -281,7 +281,7 @@ describe('拍卖行测试', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('查看我的拍卖纪录', function (done) {
|
it('查看我的拍卖纪录', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.offerRecs', { count: 10 }, (res) => {
|
pinusClient.request('guild.auctionHandler.offerRecs', { count: 10 }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.bidRecs).to.be.an('array');
|
expect(res.data.bidRecs).to.be.an('array');
|
||||||
if (res.data.bidRecs.length === 0) {
|
if (res.data.bidRecs.length === 0) {
|
||||||
@@ -302,7 +302,7 @@ describe('拍卖行测试', function () {
|
|||||||
|
|
||||||
|
|
||||||
it('获取军团拍卖记录', function (done) {
|
it('获取军团拍卖记录', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.guildLotRecs', { count: 10 }, (res) => {
|
pinusClient.request('guild.auctionHandler.guildLotRecs', { count: 10 }, (res) => {
|
||||||
checkSuccessResponse(res);
|
checkSuccessResponse(res);
|
||||||
expect(res.data.lotRecs).to.be.an('array');
|
expect(res.data.lotRecs).to.be.an('array');
|
||||||
if (res.data.lotRecs.length === 0) {
|
if (res.data.lotRecs.length === 0) {
|
||||||
@@ -324,28 +324,28 @@ describe('拍卖行测试', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('测试接口,军团拍卖定时', function (done) {
|
it('测试接口,军团拍卖定时', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.debugScheduleStartGuild', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
pinusClient.request('guild.auctionHandler.debugScheduleStartGuild', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
||||||
checkSuccessResponse(res, false);
|
checkSuccessResponse(res, false);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('测试接口,世界拍卖定时', function (done) {
|
it('测试接口,世界拍卖定时', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.debugScheduleStartWorld', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
pinusClient.request('guild.auctionHandler.debugScheduleStartWorld', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
||||||
checkSuccessResponse(res, false);
|
checkSuccessResponse(res, false);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('测试接口,拍卖结束定时', function (done) {
|
it('测试接口,拍卖结束定时', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.debugScheduleStopAuction', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
pinusClient.request('guild.auctionHandler.debugScheduleStopAuction', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
||||||
checkSuccessResponse(res, false);
|
checkSuccessResponse(res, false);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('测试接口,结算分红定时', function (done) {
|
it('测试接口,结算分红定时', function (done) {
|
||||||
pinusClient.request('battle.auctionHandler.debugScheduleSendUngotDividend', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
pinusClient.request('guild.auctionHandler.debugScheduleSendUngotDividend', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
||||||
checkSuccessResponse(res, false);
|
checkSuccessResponse(res, false);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user