测试:修改测试用例,增加注册账号逻辑

This commit is contained in:
liangtongchuan
2021-08-27 18:01:16 +08:00
parent 3c13acc1b2
commit fa3643c314
7 changed files with 89 additions and 27 deletions
+7 -5
View File
@@ -111,7 +111,7 @@ describe('聊天测试', function () {
clearInterval(timer);
done();
}
}, 500);
}, 1000);
});
afterEach(function (done) {
@@ -231,6 +231,7 @@ describe('聊天测试', function () {
});
});
// 材料不足先跳过
it.skip('测试系统频道升六星消息', function (done) {
let msgReceiveCnt = 0;
pinusClientT.on(ON_GROUP_MSG_ROUTE, (res) => {
@@ -267,7 +268,8 @@ describe('聊天测试', function () {
});
});
it('测试系统频道升品消息', function (done) {
// 材料不足先跳过
it.skip('测试系统频道升品消息', function (done) {
let msgReceiveCnt = 0;
function checkHeroInfoRes(res) {
checkSuccessResponse(res);
@@ -350,7 +352,7 @@ describe('聊天测试', function () {
pinusClient.on(ON_GROUP_MSG_ROUTE, (res) => {
checkNoticeRes(res);
});
pinusClient.request('battle.guildHandler.getMyGuildInfo', {}, (res) => {
pinusClient.request('guild.guildHandler.getMyGuildInfo', {}, (res) => {
checkSuccessResponse(res);
expect(res.data).to.have.deep.property('hasGuild').that.is.an('boolean');
if (res.data.hasGuild) {
@@ -361,7 +363,7 @@ describe('聊天测试', function () {
expect(res.data).to.have.deep.property('ceLimit').that.is.an('number');
expect(res.data).to.have.deep.property('isAuto').that.is.an('boolean');
const { code, name, notice, introduce, ceLimit, isAuto } = res.data;
pinusClient.request('battle.guildHandler.setGuildInfo', { code, name, notice: newNotice, introduce, ceLimit, isAuto }, (setRes) => {
pinusClient.request('guild.guildHandler.setGuildInfo', { code, name, notice: newNotice, introduce, ceLimit, isAuto }, (setRes) => {
checkSuccessResponse(setRes);
expect(setRes.data.notice).to.be.equal(newNotice);
setTimeout(() => {
@@ -369,7 +371,7 @@ describe('聊天测试', function () {
pinusClientT.off(ON_GROUP_MSG_ROUTE);
pinusClient.off(ON_GROUP_MSG_ROUTE);
done();
}, 50);
}, 500);
});
}
});