chat tests: Asyncify
parent
0fae34009d
commit
020df75677
|
@ -8,7 +8,7 @@ describe('chat-load-messages', function () {
|
||||||
this.timeout(60000);
|
this.timeout(60000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('adds a lot of messages', function (done) {
|
it('adds a lot of messages', async function () {
|
||||||
const chrome$ = helper.padChrome$;
|
const chrome$ = helper.padChrome$;
|
||||||
const chatButton = chrome$('#chaticon');
|
const chatButton = chrome$('#chaticon');
|
||||||
chatButton.click();
|
chatButton.click();
|
||||||
|
@ -25,9 +25,8 @@ describe('chat-load-messages', function () {
|
||||||
chatInput.sendkeys(`msg${num}`);
|
chatInput.sendkeys(`msg${num}`);
|
||||||
chatInput.sendkeys('{enter}');
|
chatInput.sendkeys('{enter}');
|
||||||
}
|
}
|
||||||
helper.waitFor(() => chatText.children('p').length === messages, 60000).always(() => {
|
await helper.waitForPromise(() => chatText.children('p').length === messages, 60000);
|
||||||
helper.newPad(done, padName);
|
await new Promise((resolve) => helper.newPad(() => resolve(), padName));
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('checks initial message count', function (done) {
|
it('checks initial message count', function (done) {
|
||||||
|
|
Loading…
Reference in New Issue