tests: Fix race in change_user_name.js

This commit is contained in:
Richard Hansen 2021-04-01 21:49:15 -04:00 committed by webzwo0i
parent 58dac4c0fc
commit 27e5373050

View file

@ -10,10 +10,12 @@ describe('change username value', function () {
this.timeout(10000);
await helper.toggleUserList();
await helper.setUserName('😃');
// Give the server an opportunity to write the new name.
await new Promise((resolve) => setTimeout(resolve, 1000));
// get a new pad, but don't clear the cookies
await helper.aNewPad({clearCookies: false});
await helper.toggleUserList();
expect(helper.usernameField().val()).to.be('😃');
await helper.waitForPromise(() => helper.usernameField().val() === '😃');
});
it('Own user name is shown when you enter a chat', async function () {