军团:邀请被邀请

This commit is contained in:
luying
2021-01-20 19:30:11 +08:00
parent d9eda973ed
commit 89c7b117b2
8 changed files with 171 additions and 15 deletions

View File

@@ -12,6 +12,7 @@ describe('军团测试', function() {
// });
var pinusClient;
var roleInfo;
let guildList;
beforeEach(function(done) {
pinusClient = new PinusWSClient();
@@ -65,6 +66,7 @@ describe('军团测试', function() {
expect(res.data).to.be.an('object');
expect(res.data).to.have.deep.property('list').that.is.an('array');
expect(res.data).to.have.deep.property('quitTime').that.is.an('number');
guildList = res.data.list;
res.data.list.forEach(list => {
expect(list).to.have.deep.property('code').that.is.a('string');
expect(list).to.have.deep.property('name').that.is.a('string');
@@ -169,4 +171,32 @@ describe('军团测试', function() {
});
});
it('查看军团成员列表', function (done) {
let index = Math.floor(Math.random() * guildList.length);
if(guildList[index]) {
let code = guildList[index].code;
pinusClient.request('battle.guildHandler.getGuildMember', { code }, (res) => {
// 消息回调
expect(res).to.be.an('object');
expect(res.code).equal(0);
expect(res.data).to.be.an('object');
expect(res.data).to.have.deep.property('list').that.is.an('array');
res.data.list.forEach(list => {
expect(list).to.have.deep.property('roleId').that.is.a('string');
expect(list).to.have.deep.property('roleName').that.is.a('string');
expect(list).to.have.deep.property('ce').that.is.a('number');
expect(list).to.have.deep.property('headHid').that.is.a('number');
expect(list).to.have.deep.property('sHid').that.is.a('number');
expect(list).to.have.deep.property('lv').that.is.a('number');
expect(list).to.have.deep.property('title').that.is.a('number');
expect(list).to.have.deep.property('loginTime').that.is.a('number');
expect(list).to.have.deep.property('job').that.is.a('number');
// expect(list).to.have.deep.property('auth').that.is.a('number');
// expect(list).to.have.deep.property('honourWeekly').that.is.a('number');
});
done();
});
}
});
});