测试:抽卡测试
This commit is contained in:
@@ -14,4 +14,41 @@ export function checkDisplayItems(items) {
|
||||
expect(item.id).to.be.a('number');
|
||||
expect(item.count).to.be.a('number');
|
||||
})
|
||||
}
|
||||
|
||||
export function checkHero(heroes) {
|
||||
expect(heroes).to.be.an('array');
|
||||
heroes.forEach(hero => {
|
||||
expect(hero.seqId).to.be.a('number');
|
||||
expect(hero.hid).to.be.a('number');
|
||||
expect(hero.hName).to.be.a('string');
|
||||
expect(hero.lv).to.be.a('number');
|
||||
expect(hero.exp).to.be.a('number');
|
||||
expect(hero.star).to.be.a('number');
|
||||
expect(hero.starStage).to.be.a('number');
|
||||
expect(hero.colorStar).to.be.a('number');
|
||||
expect(hero.colorStarStage).to.be.a('number');
|
||||
expect(hero.quality).to.be.a('number');
|
||||
expect(hero.job).to.be.a('number');
|
||||
expect(hero.jobStage).to.be.a('number');
|
||||
expect(hero.connections).to.be.an('array');
|
||||
hero.connections.forEach(connection => {
|
||||
expect(connection.shipId).to.be.a('number');
|
||||
expect(connection.level).to.be.a('number');
|
||||
});
|
||||
expect(hero.favour).to.be.a('number');
|
||||
expect(hero.favourLv).to.be.a('number');
|
||||
expect(hero.connections).to.be.an('array');
|
||||
hero.skins.forEach(skin => {
|
||||
expect(skin.id).to.be.a('number');
|
||||
expect(skin.enable).to.be.a('boolean');
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
export function addItem(pinusClient, id, count, cb) {
|
||||
pinusClient.request('role.heroHandler.addItem', { id, count }, res => {
|
||||
checkSuccessResponse(res);
|
||||
cb(res);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user