-
-
Notifications
You must be signed in to change notification settings - Fork 763
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
Showing
2 changed files
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.conversejs { | ||
.chatbox { | ||
.chat-head { | ||
.button-color{ | ||
color: var(--chat-head-text-color) !important; | ||
} | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* global mock */ | ||
|
||
describe("A Call Button", function () { | ||
|
||
it("has been shown in the toolbar", | ||
mock.initConverse(['chatBoxesFetched'], {}, async function (_converse) { | ||
|
||
await mock.waitForRoster(_converse, 'current'); | ||
await mock.openControlBox(_converse); | ||
const contact_jid = mock.cur_names[2].replace(/ /g,'.').toLowerCase() + '@montague.lit'; | ||
spyOn(_converse.api, "trigger").and.callThrough(); | ||
// First check that the button does show | ||
await mock.openChatBoxFor(_converse, contact_jid); | ||
const view = _converse.chatboxviews.get(contact_jid); | ||
const toolbar = view.querySelector('.chat-toolbar'); | ||
const call_button = toolbar.querySelector('converse-jingle-toolbar-button'); | ||
// Now check that the state changes | ||
// toggleJingleCallStatus | ||
const chatbox = view.model; | ||
call_button.click(); | ||
expect(chatbox.get('jingle_status') === _converse.JINGLE_CALL_STATUS.PENDING); | ||
call_button.click(); | ||
})); | ||
}); |