tests: Add missing awaits to change_user_name.js

Also increase the timeouts.
This commit is contained in:
Richard Hansen 2021-03-31 22:06:00 -04:00 committed by webzwo0i
parent bbf89dfcf9
commit d15ff9ce8d

View file

@ -7,27 +7,22 @@ describe('change username value', function () {
}); });
it('Remembers the user name after a refresh', async function () { it('Remembers the user name after a refresh', async function () {
this.timeout(1500); this.timeout(10000);
helper.toggleUserList(); await helper.toggleUserList();
helper.setUserName('😃'); await helper.setUserName('😃');
// get a new pad, but don't clear the cookies
helper.newPad({ // get a new pad, but don't clear the cookies await helper.aNewPad({clearCookies: false});
clearCookies: false, await helper.toggleUserList();
cb() {
helper.toggleUserList();
expect(helper.usernameField().val()).to.be('😃'); expect(helper.usernameField().val()).to.be('😃');
},
});
}); });
it('Own user name is shown when you enter a chat', async function () { it('Own user name is shown when you enter a chat', async function () {
this.timeout(1500); this.timeout(10000);
helper.toggleUserList(); await helper.toggleUserList();
helper.setUserName('😃'); await helper.setUserName('😃');
helper.showChat(); await helper.showChat();
helper.sendChatMessage('O hi{enter}'); await helper.sendChatMessage('O hi{enter}');
await helper.waitForPromise(() => { await helper.waitForPromise(() => {
// username:hours:minutes text // username:hours:minutes text