Commit c8eea728 authored by JC Brand's avatar JC Brand

Fix failing test.

Looks like Chromium strips the forward slash from `<br/>` when printing
innerHTML.
parent dbe88535
...@@ -953,7 +953,7 @@ ...@@ -953,7 +953,7 @@
}).then(() => { }).then(() => {
const view = _converse.chatboxviews.get(contact_jid); const view = _converse.chatboxviews.get(contact_jid);
chat_content = view.el.querySelector('.chat-content'); chat_content = view.el.querySelector('.chat-content');
expect(chat_content.querySelector('.chat-msg__text').innerHTML).toBe('Hey<br/>Have you heard the news?'); expect(chat_content.querySelector('.chat-msg__text').innerHTML).toBe('Hey<br>Have you heard the news?');
stanza = Strophe.xmlHtmlNode( stanza = Strophe.xmlHtmlNode(
"<message from='"+contact_jid+"'"+ "<message from='"+contact_jid+"'"+
...@@ -964,7 +964,7 @@ ...@@ -964,7 +964,7 @@
_converse.connection._dataRecv(test_utils.createRequest(stanza)); _converse.connection._dataRecv(test_utils.createRequest(stanza));
return test_utils.waitUntil(() => view.model.messages.length); return test_utils.waitUntil(() => view.model.messages.length);
}).then(() => { }).then(() => {
expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br/><br/>Have you heard the news?'); expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br><br>Have you heard the news?');
stanza = Strophe.xmlHtmlNode( stanza = Strophe.xmlHtmlNode(
"<message from='"+contact_jid+"'"+ "<message from='"+contact_jid+"'"+
" type='chat'"+ " type='chat'"+
...@@ -974,7 +974,7 @@ ...@@ -974,7 +974,7 @@
_converse.connection._dataRecv(test_utils.createRequest(stanza)); _converse.connection._dataRecv(test_utils.createRequest(stanza));
return test_utils.waitUntil(() => view.model.messages.length); return test_utils.waitUntil(() => view.model.messages.length);
}).then(() => { }).then(() => {
expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br/>Have you heard<br/>the news?'); expect(chat_content.querySelector('.message:last-child .chat-msg__text').innerHTML).toBe('Hey<br>Have you heard<br>the news?');
done(); done();
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL)) }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL))
})); }));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment