tests: Fix `chat.js` tests to accommodate new sendkeys

rhansen-sendkeys
Richard Hansen 2021-08-21 04:51:54 -04:00 committed by SamTV12345
parent 9ff6e82c72
commit 216f5af6a9
1 changed files with 2 additions and 6 deletions

View File

@ -25,9 +25,7 @@ describe('Chat messages and UI', function () {
const username = helper.chatTextParagraphs().children('b').text(); const username = helper.chatTextParagraphs().children('b').text();
const time = helper.chatTextParagraphs().children('.time').text(); const time = helper.chatTextParagraphs().children('.time').text();
// TODO: The '\n' is an artifact of $.sendkeys('{enter}'). Figure out how to get rid of it expect(helper.chatTextParagraphs().text()).to.be(`${username}${time} ${chatValue}`);
// without breaking the other tests that use $.sendkeys().
expect(helper.chatTextParagraphs().text()).to.be(`${username}${time} ${chatValue}\n`);
await helper.hideChat(); await helper.hideChat();
}); });
@ -48,9 +46,7 @@ describe('Chat messages and UI', function () {
const username = chat.children('b').text(); const username = chat.children('b').text();
const time = chat.children('.time').text(); const time = chat.children('.time').text();
// TODO: Each '\n' is an artifact of $.sendkeys('{enter}'). Figure out how to get rid of them expect(chat.text()).to.be(`${username}${time} \n${chatValue}`);
// without breaking the other tests that use $.sendkeys().
expect(chat.text()).to.be(`${username}${time} \n${chatValue}\n`);
}); });
it('makes chat stick to right side of the screen via settings, ' + it('makes chat stick to right side of the screen via settings, ' +