Commit 8a4c7130 authored by JC Brand's avatar JC Brand

Fix failing tests

parent 17e9f560
...@@ -2158,7 +2158,7 @@ ...@@ -2158,7 +2158,7 @@
await new Promise(resolve => view.model.once('change:subject', resolve)); await new Promise(resolve => view.model.once('change:subject', resolve));
expect(sizzle('.chat-event:last').pop().textContent.trim()).toBe('Topic set by ralphm'); expect(sizzle('.chat-event:last').pop().textContent.trim()).toBe('Topic set by ralphm');
expect(sizzle('.chat-topic:last').pop().textContent.trim()).toBe(text); expect(sizzle('.chat-topic:last').pop().textContent.trim()).toBe(text);
expect(view.el.querySelector('.chatroom-description').textContent.trim()).toBe(text); expect(view.el.querySelector('.chat-head__desc').textContent.trim()).toBe(text);
stanza = u.toStanza( stanza = u.toStanza(
`<message xmlns="jabber:client" to="jc@opkode.com/_converse.js-60429116" type="groupchat" from="jdev@conference.jabber.org/ralphm"> `<message xmlns="jabber:client" to="jc@opkode.com/_converse.js-60429116" type="groupchat" from="jdev@conference.jabber.org/ralphm">
...@@ -2172,7 +2172,7 @@ ...@@ -2172,7 +2172,7 @@
expect(sizzle('.chat-msg__subject', view.el).pop().textContent.trim()).toBe('This is a message subject'); expect(sizzle('.chat-msg__subject', view.el).pop().textContent.trim()).toBe('This is a message subject');
expect(sizzle('.chat-msg__text').length).toBe(1); expect(sizzle('.chat-msg__text').length).toBe(1);
expect(sizzle('.chat-msg__text').pop().textContent.trim()).toBe('This is a message'); expect(sizzle('.chat-msg__text').pop().textContent.trim()).toBe('This is a message');
expect(view.el.querySelector('.chatroom-description').textContent.trim()).toBe(text); expect(view.el.querySelector('.chat-head__desc').textContent.trim()).toBe(text);
// Removes current topic // Removes current topic
stanza = u.toStanza( stanza = u.toStanza(
...@@ -2181,7 +2181,7 @@ ...@@ -2181,7 +2181,7 @@
</message>`); </message>`);
_converse.connection._dataRecv(test_utils.createRequest(stanza)); _converse.connection._dataRecv(test_utils.createRequest(stanza));
await new Promise(resolve => view.model.once('change:subject', resolve)); await new Promise(resolve => view.model.once('change:subject', resolve));
expect(view.el.querySelector('.chatroom-description').textContent.trim()).toBe(""); expect(view.el.querySelector('.chat-head__desc').textContent.trim()).toBe("");
expect(view.el.querySelector('.chat-info:last-child').textContent.trim()).toBe("Topic cleared by ralphm"); expect(view.el.querySelector('.chat-info:last-child').textContent.trim()).toBe("Topic cleared by ralphm");
done(); done();
})); }));
......
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