拍卖行:获取军团拍卖记录;修改分红机制
This commit is contained in:
@@ -132,7 +132,9 @@ describe('拍卖行测试', function() {
|
||||
pinusClient.request('battle.auctionHandler.offer', { code: unsoldLots[0].code, max: false }, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
checkLot(res.data.lot);
|
||||
checkDividend(res.data.dividend);
|
||||
if (res.data.dividend) {
|
||||
checkDividend(res.data.dividend);
|
||||
}
|
||||
expect(res.data.lot.curBuyer).to.be.equal(roleInfo.roleId);
|
||||
done();
|
||||
});
|
||||
@@ -201,6 +203,13 @@ describe('拍卖行测试', function() {
|
||||
pinusClient.request('battle.auctionHandler.debugSetDividendStatus', { magicWord: DEBUG_MAGIC_WORD, sourceType: AUCTION_SOURCE.GATE, status: DIVIDEND_STATUS.END }, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
checkDividend(res.data.dividend);
|
||||
// TODO: 找个测试领取分红的方法
|
||||
const dividend = res.data.dividend.dividends.find(d => { return d.roleId === roleInfo.roleId });
|
||||
if (!dividend) {
|
||||
console.warn('未测试到领取分红的情况');
|
||||
done();
|
||||
return;
|
||||
}
|
||||
pinusClient.request('battle.auctionHandler.getDividend', { sourceType: AUCTION_SOURCE.GATE }, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.dividend).to.be.an('object');
|
||||
@@ -267,6 +276,11 @@ describe('拍卖行测试', function() {
|
||||
pinusClient.request('battle.auctionHandler.offerRecs', { count: 10 }, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.bidRecs).to.be.an('array');
|
||||
if (res.data.bidRecs.length === 0) {
|
||||
console.warn('没有我的拍卖纪录');
|
||||
done();
|
||||
return;
|
||||
}
|
||||
for (let bidRec of res.data.bidRecs) {
|
||||
expect(bidRec.roleId).to.be.a('string');
|
||||
expect(bidRec.price).to.be.a('number');
|
||||
@@ -278,6 +292,28 @@ describe('拍卖行测试', function() {
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('获取军团拍卖记录', function(done) {
|
||||
pinusClient.request('battle.auctionHandler.guildLotRecs', { count: 10 }, (res) => {
|
||||
checkSuccessResponse(res);
|
||||
expect(res.data.lotRecs).to.be.an('array');
|
||||
if (res.data.lotRecs.length === 0) {
|
||||
console.warn('没有军团拍卖纪录');
|
||||
done();
|
||||
return;
|
||||
}
|
||||
for (let lotRec of res.data.lotRecs) {
|
||||
expect(lotRec.price).to.be.a('number');
|
||||
expect(Date.parse(lotRec.time)).to.be.a('number');
|
||||
expect(lotRec.gid).to.be.a('number');
|
||||
expect(lotRec.sourceType).to.be.a('number');
|
||||
expect(lotRec.max).to.be.a('boolean');
|
||||
expect(lotRec.sold).to.be.a('boolean');
|
||||
}
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('测试接口,军团拍卖定时', function(done) {
|
||||
pinusClient.request('battle.auctionHandler.debugScheduleStartGuild', { magicWord: DEBUG_MAGIC_WORD }, (res) => {
|
||||
checkSuccessResponse(res, false);
|
||||
|
||||
Reference in New Issue
Block a user