Commit c759112c authored by JC Brand's avatar JC Brand

Fix failing test

parent 607d7986
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
const view = _converse.chatboxviews.get('controlbox'); const view = _converse.chatboxviews.get('controlbox');
spyOn(view, 'renderControlBoxPane').and.callThrough(); spyOn(view, 'renderControlBoxPane').and.callThrough();
_converse.api.user.login('romeo@montague.lit', 'secret'); _converse.api.user.login('romeo@montague.lit/orchard', 'secret');
const sent_stanzas = _converse.connection.sent_stanzas; const sent_stanzas = _converse.connection.sent_stanzas;
let stanza = await test_utils.waitUntil(() => let stanza = await test_utils.waitUntil(() =>
sent_stanzas.filter(s => (s.tagName === 'enable')).pop()); sent_stanzas.filter(s => (s.tagName === 'enable')).pop());
......
...@@ -217,7 +217,7 @@ converse.plugins.add('converse-smacks', { ...@@ -217,7 +217,7 @@ converse.plugins.add('converse-smacks', {
const stanza_string = Strophe.serialize(stanza); const stanza_string = Strophe.serialize(stanza);
_converse.session.save( _converse.session.save(
'unacked_stanzas', 'unacked_stanzas',
_converse.session.get('unacked_stanzas').concat([stanza_string]) (_converse.session.get('unacked_stanzas') || []).concat([stanza_string])
); );
const max_unacked = _converse.smacks_max_unacked_stanzas; const max_unacked = _converse.smacks_max_unacked_stanzas;
if (max_unacked > 0) { if (max_unacked > 0) {
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL)); }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
}; };
if (_.get(settings, 'auto_login') !== false) { if (_.get(settings, 'auto_login') !== false) {
_converse.api.user.login('romeo@montague.lit', 'secret'); _converse.api.user.login('romeo@montague.lit/orchard', 'secret');
await _converse.api.waitUntil('afterResourceBinding'); await _converse.api.waitUntil('afterResourceBinding');
} }
window.converse_disable_effects = true; window.converse_disable_effects = true;
......
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