-
-
Notifications
You must be signed in to change notification settings - Fork 778
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
93bfa20
commit 06c9f4c
Showing
5 changed files
with
11 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,28 +143,5 @@ describe("Groupchats", function () { | |
`<c hash="sha-1" node="https://conversejs.org" ver="TfHz9vOOfqIG0Z9lW5CuPaWGnrQ=" xmlns="http://jabber.org/protocol/caps"/>`+ | ||
`</presence>`); | ||
})); | ||
|
||
it("Original URL is displayed alongside the Geo Coordinates when sending a OpenStreetMap url as a chat message", | ||
mock.initConverse([], {}, async function (_converse) { | ||
const muc_jid = '[email protected]'; | ||
await mock.openAndEnterChatRoom(_converse, muc_jid, 'romeo'); | ||
const model = _converse.chatboxes.get(muc_jid); | ||
expect(model.session.get('connection_status')).toBe(converse.ROOMSTATUS.ENTERED); | ||
model.sendMessage({'body': 'https://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=43.00556%2C-81.21649%3B43.00422%2C-81.22377#map=17/43.00509/-81.22035'}); | ||
|
||
const stanza = u.toStanza(` | ||
<message xmlns='jabber:client' | ||
from='${muc_jid}' | ||
type='error' | ||
to='${_converse.bare_jid}'> | ||
<error type='cancel'> | ||
<not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> | ||
</error> | ||
</message>`); | ||
_converse.connection._dataRecv(mock.createRequest(stanza)); | ||
|
||
await u.waitUntil(() => model.messages.last()?.get('body')); | ||
expect(model.messages.last().get('message')).toBe('geo:43.00509,-81.22035\nhttps://www.openstreetmap.org/directions?engine=fossgis_osrm_car&route=43.00556%2C-81.21649%3B43.00422%2C-81.22377#map=17/43.00509/-81.22035') | ||
})); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters