Fix failing test.
Looks like Chromium strips the forward slash from `<br/>` when printing innerHTML.
This commit is contained in:
parent
dbe88535f1
commit
c8eea72831
@ -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 @@
|
|||||||
_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 @@
|
|||||||
_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))
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user