测试:拍卖行出价

This commit is contained in:
luying
2021-09-14 16:21:03 +08:00
parent 739a32fe21
commit 58ce33b549

View File

@@ -142,23 +142,25 @@ describe('拍卖行测试', function () {
checkDividend(res.data.dividend);
}
expect(res.data.lot.curBuyer).to.be.equal(roleInfo.roleId);
done();
});
unsoldLots.shift();
if (unsoldLots.length === 0) {
console.warn('没有测试一口价的情况');
done();
return;
}
gid = unsoldLots[0].gid;
pinusClient.request('battle.auctionHandler.offer', { code: unsoldLots[0].code, max: true }, (res) => {
checkSuccessResponse(res);
checkLot(res.data.lot);
checkDividend(res.data.dividend);
expect(res.data.lot.curBuyer).to.be.equal(roleInfo.roleId);
setTimeout(() => {
unsoldLots.shift();
if (unsoldLots.length === 0) {
console.warn('没有测试一口价的情况');
done();
}, 100);
return;
}
gid = unsoldLots[0].gid;
pinusClient.request('battle.auctionHandler.offer', { code: unsoldLots[0].code, max: true }, (res) => {
checkSuccessResponse(res);
checkLot(res.data.lot);
if(res.data.dividend) {
checkDividend(res.data.dividend);
}
expect(res.data.lot.curBuyer).to.be.equal(roleInfo.roleId);
setTimeout(() => {
done();
}, 1000);
});
});
});
});