diff --git a/src/plugins/chatview/heading.js b/src/plugins/chatview/heading.js index 61eff2e8ce..f8b202984f 100644 --- a/src/plugins/chatview/heading.js +++ b/src/plugins/chatview/heading.js @@ -57,6 +57,7 @@ export default class ChatHeading extends CustomElement { * @returns {Promise>} */ async getHeadingButtons () { + debugger; const buttons = [ /** @type {import('./types').HeadingButtonAttributes} */ { diff --git a/src/plugins/chatview/templates/chat-head.js b/src/plugins/chatview/templates/chat-head.js index 8cbb597bf7..c96c349a54 100644 --- a/src/plugins/chatview/templates/chat-head.js +++ b/src/plugins/chatview/templates/chat-head.js @@ -17,7 +17,6 @@ export default (el) => { const i18n_profile = __("The User's Profile Image"); const display_name = el.model.getDisplayName(); - debugger; const avatar = html` document.querySelector("converse-minimized-chats")); diff --git a/src/plugins/omemo/tests/omemo.js b/src/plugins/omemo/tests/omemo.js index 7e7384f2d7..5de2495f6a 100644 --- a/src/plugins/omemo/tests/omemo.js +++ b/src/plugins/omemo/tests/omemo.js @@ -1109,6 +1109,7 @@ describe("The OMEMO module", function() { it("shows OMEMO device fingerprints in the user details modal", mock.initConverse(['chatBoxesFetched'], {}, async function (_converse) { + await mock.waitUntilBlocklistInitialized(_converse); await mock.waitForRoster(_converse, 'current', 1); await mock.waitUntilDiscoConfirmed( _converse, _converse.bare_jid, diff --git a/src/shared/tests/mock.js b/src/shared/tests/mock.js index 94938a53c3..67d060fd7a 100644 --- a/src/shared/tests/mock.js +++ b/src/shared/tests/mock.js @@ -109,6 +109,33 @@ function closeControlBox () { u.isVisible(view) && view.querySelector(".controlbox-heading__btn.close")?.click(); } +async function waitUntilBlocklistInitialized (_converse, blocklist=[]) { + window.sessionStorage.removeItem('converse.blocklist-romeo@montague.lit-fetched'); + + const { api } = _converse; + await mock.waitUntilDiscoConfirmed( + _converse, + _converse.domain, + [{ 'category': 'server', 'type': 'IM' }], + ['urn:xmpp:blocking'] + ); + const connection = api.connection.get(); + const IQ_stanzas = connection.IQ_stanzas; + const sent_stanza = await u.waitUntil(() => IQ_stanzas.find((s) => s.querySelector('iq blocklist'))); + + connection._dataRecv(mock.createRequest(stx` + + + ${blocklist.map((jid) => stx``)} + + `)); + + return await api.waitUntil('blocklistInitialized'); +} + async function waitUntilBookmarksReturned ( _converse, bookmarks=[], @@ -865,6 +892,7 @@ Object.assign(mock, { view_mode, waitForReservedNick, waitForRoster, + waitUntilBlocklistInitialized, waitUntilBookmarksReturned, waitUntilDiscoConfirmed });